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.

MSP430 linker: how to force _c_int00 to be loaded at 0x1600?

Other Parts Discussed in Thread: MSP430F149

In the TI MSP430F149 / CCS4, how do I force the _c_int00 to be loaded at 0x1600?   I am using the v3.3 code generation tools.

In CCE, this worked in the link file:

.boot :>0x1600

{

-l rts430.lib(.text)

}

 But in CCS 4, that no longer works. I tried libc.a instead of rts430.lib, but that didn't work, either. NOT using large memory model -- just using MSP430F149.

The linker gives a warning:

no matching section -l rts430.lib<boot.obj>(.text)              SMaster120       line 0    1287173430693 1659

 

And the map file shows no boot section and _c_int00 is not at 0x1600.

 

 

  • This thread looks similar http://e2e.ti.com/support/development_tools/compiler/f/343/t/69518.aspx .  Though in that one, the problem just disappears.

    Thanks and regards,

    -George

  • Charles,

    I can recreate the behavior you reported concerning linker warning: "no matching section"

    Here is my analysis on what is happening:

    As you probably know, the compiler tools now do an automatic RTS library selection so the user does not have to worry about picking the correct RTS. When you create a new project in CCS, it defaults to automatic runtime library selection.

    If you take a look at the link command line in CCS console window when your project is being , it should be something like:

    "C:/Program Files/Texas Instruments/ccsv4/tools/compiler/msp430/bin/cl430" -vmsp -g --diag_warning=225 --printf_support=minimal -z -m"F149_test.map" --stack_size=80 --heap_size=80 --use_hw_mpy=16 --warn_sections -i"C:/Program Files/Texas Instruments/ccsv4/msp430/include" -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/msp430/lib" -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/msp430/include" --reread_libs --rom_model -o "F149_test.out"  "./fet140_1.obj" -l"libc.a" "../lnk_msp430f149.cmd"

    The --l”libc.a” is passed before the linker command file but is not getting resolved correctly for the linker, thereby resulting in the warning "no matching section" when it encounters it in the linker command file. I will submit this to our defect tracking system to get fixed for a future release.

    There are a couple of ways to work around this:

    1) Add rts430.lib to the --library option (C/C++ Build->Linker->File Search Path) and make sure it’s the first library in the list (so rts430.lib appears before libc.a in the command line)

    2) Add libc.a and lnk_msp430f149.cmd to the link order list (CCS Build->Link Order tab) and make sure the linker command file is first on the list

     Please let us know if this helps resolve the warning.

  • Aarti,

    Yes, thanks!  Option #1 removed the warning and did indeed put c_int00 at 0x1600.

     

    Thanks again,

    Chuck Heller

     

  • For reference, this is being tracked in defect # SDSCM00038385.