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.

CCSv5 cl430 issue - linker ignores --stack_size directive .stack always==0x40

Other Parts Discussed in Thread: MSP430G2553

Scratching my head on this one...

I'm specifying stack size in project linker options, and I'm watching it generating the correct compiler / linker command line "--stack_size==myValue" option, but when I look in the .map file, .stack remains 0x40.

Here's the command line:

"C:/ti/ccsv5/tools/compiler/msp430/bin/cl430" -vmsp --abi=coffabi -O4 --opt_for_speed=0 --define=__MSP430G2553__ --diag_warning=225 --display_error_number --single_inline --printf_support=minimal -z -m"myApplication.map" --stack_size=70 --heap_size=0 -i"C:/ti/ccsv5/ccs_base/msp430/include" -i"C:/ti/ccsv5/tools/compiler/msp430/lib" -i"C:/ti/ccsv5/tools/compiler/msp430/include" --reread_libs --warn_sections --no_symtable --rom_model -o "myApplication.out" -l"./configPkg/linker.cmd"  my-object-files-here  -l"libc.a" "../lnk_msp430g2553.cmd"  

yields:

warning #10341-D: The --symbol_map option is not supported when performing link-time optimization. All --symbol_map options will be ignored. 'Finished building target: WDI_Ears.out'

ideas? Is --stack-size a 'symbol_map' option??

  • Scott Watson said:
    Is --stack-size a 'symbol_map' option

    No.  I don't see any options in what you've shown that would produce a --symbol_map message.  I am not able to reproduce the problem.

    Note that by setting stack size to 70, you're setting it to 0x46.  Was that intended?  Could you post your linker map file (myApplication.map), or at least the fragment showing the stack section?

  • Sure, posted below and regarding the choice of 70,  I was just setting to numbers that I could recognize easily in the map, I actually need to make the .stack section larger than the default of 0x40. Just for grins I've been trying sizers larger and smaller.
    We're 'filling' the section w/ 0xbeef to get a feeling for how much stack we're using. Thanks for the help.
    
    

    output attributes/
    section page origin length input sections
    -------- ---- ---------- ---------- ----------------
    xdc.meta 0 00000000 000000fb COPY SECTION
    00000000 000000fb main_p430.o430 (xdc.meta)

    .bss 0 00000200 00000154 UNINITIALIZED
    00000200 00000136 main.obj (.bss)
    00000336 00000011 Ear.obj (.bss)
    00000347 00000001 --HOLE--
    00000348 00000004 rts430.lib : _lock.obj (.bss)
    0000034c 00000004 : rand.obj (.bss)
    00000350 00000004 ti.targets.msp430.rts430.a430 : boot.o430 (.bss)

    .stack 0 000003c0 00000040
    000003c0 00000002 ti.targets.msp430.rts430.a430 : boot.o430 (.stack) [fill = beef]
    000003c2 0000003e --HOLE-- [fill = beef]

  • Mystery Solved!

    Note that this is a multi-developer project and we're using Grace (but I've never used it) to configure the peripherals, there is also a Program section, and an associated Program.stack:

    /* set stack and heap sizes as appropriate for MSP430 */
    Program.sysStack = 0;
    Program.stack = 64;
    Program.heap = 0;
    Program.argSize = 0;
    
    

    Grace OVERRIDES the settings in Code Composer - so problem solved. Now - is the preferred solution to use Grace, or delete the Program section from the main.cfg file use Code Composer.

    For now, I'll stick with letting Grace handle it, since it works!

    THANKS for the quick response, regardless!