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.

RE: How to output "Hello World" using CCSv5 and MSP430

Other Parts Discussed in Thread: CCSTUDIO

I am following the instructions at http://processors.wiki.ti.com/index.php/Printf_support_for_MSP430_CCSTUDIO_compiler and I am getting exactly this redefinition problem, but with fputs:

#10056 symbol "fputs" redefined: first defined in "./main.obj"; redefined in"C:\ti\ccsv5\tools\compiler\msp430_4.1.5\lib\rts430x_lc_sd_eabi.lib<fputs.obj>"

I have tried all combinations of Library Function Assumptions in the compiler settings and all combinations of RTS settings in the linker settings.  I have also tried changing the linker command-line pattern to put the ${inputs} before the ${flags} and am getting the error in the linker command file that the other poster mentioned above.

Can someone at T.I. please suggest a fix for this?

  • Hi William,

    I think this unfortunately slipped a bit being attached to an old thread.    I have created a new thread for you.

    Can you please provide more details?   Look specifically for double definitions of fputs.   Also I would use printf ....  and check the stack and heap.

    Best Regards,
    Lisa 

  • Lisa,

    I am following the instructions in the wiki article, which says to override fputs() by defining my own version thereof.  The linker should choose mine over the one in the library (and this behaviour is a fundamental tenet of a linker system), but instead chokes.  The issues discussed the participants in the original thread were never addressed.  There's a bug in the implementation of the linker or the environment.  I think it would be possible to work around this if one could separate the linker flags from the linker sources, and put them in a different order on the command line, but CCS doesn't appear to allow this.

    The stack and heap are large (over 1024 bytes each), but don't even enter into the discussion because CCS never even gets to generating an executable image that can run and use the stack and heap.

    This issue needs to be escalated.

    Thanks,

         William

  • Hi William,

    could you please check something.   Have a look at the build console to see in what order files are being passed to the linker. The file which defines fputs must appear on the command line before the rts lib. You  can control the link order if necessary using the Project Properties->Build->Link order tab. 

    Please keep us informed.

    Best Regards,
    Lisa 

  • Hi William,

    just thought I would check for any updates with your enquiry.

    Best Regards,

    Lisa 

  • Thanks for the follow-up.

    The issue is that CCS includes -i"C:/ti/ccsv5/tools/compiler/msp430_4.1.5/lib" in the ${flags}, which puts it before the ${inputs}.  If I try moving ${inputs} before ${flags} as the previous poster in the original thread tried, other errors are generated.

    To resolve this, CCS needs to permit separation of the ${flags} into two parts--the flags and the included libraries, so that the libraries can be linked last.  Is there a way to do this?

  • I'm facing the exact same Problem....

    Did somebody find a solution?