This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430g2231 compilation error

Other Parts Discussed in Thread: MSP430G2231

Hello,

I am Anala. I am using MSP430g2231 processor. I am trying to establish a serial communication between my PC and processor via UART using TI sample codes.

But i am not able to receive any information from my PC.i can only transmit from processor.

Also i was trying to transmit a floating point number to PC,but it is showing some error.

if i use the below statement,

sprintf(times, "%.2f" ,total_amount);   

i get errors,

Severity and Description	Path	Resource	Location	Creation Time	Id
errors encountered during linking; "gg.out" not built gg line 0 1327918031406 480

Severity and Description	Path	Resource	Location	Creation Time	Id
placement fails for object ".text", size 0xabc (page 0). Available ranges: FLASH size: 0x7e0 unused: 0x76e max hole: 0x76e gg line 0 1327918031406 479

 

and if i write ;

sprintf(times[ ], "%.2f" ,total_amount);  

Severity and Description	Path	Resource	Location	Creation Time	Id
expected an expression gg serial.c line 122 1327919422187 481

please help me to solve my problem.
  • Hi Anala,

    The MSP430G2231 unfortunately has only a USI port which does not support UART.  This only supports SPI or I2C.  Please see the following two references.

    http://www.ti.com/lit/sg/slab034u/slab034u.pdf

    http://www.ti.com/product/msp430g2231

    Also note that the MSP430 family is does not support floating point.

    Sorry for the inconvenience.

    Best Regards,
    Lisa

  • Thank you Lisa,

    But i tried TI sample programs for UART communication using Timers. I am able to transmit data via UART.the problem is with Reception.

    Also suggest any other alternate mean for displaying a floating point number,because it is the main part of my project.

    Regards,

    Anala. 

  • Hi Anala,

    SPI communication can go over "UART" ports.  This is why you may see data.

    My suggestions

    - check that there are no port conflicts --- ie the USI port is being used by something else

    - check that all settings are matched - speed, 3 vs 4 wire, etc

    - if you still have problems, please post to the MSP forum as they will be better able to help debug such peripheral issues

    Best Regards,
    Lisa