Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all articles
Browse latest Browse all 22176

MSP430F5359: CGT-generated MSP430X images won't start if .bss is 985 bytes or more

$
0
0
Part Number: MSP430F5359

Tool/software:

(I apologize for an incomplete bug report; I'll add more data as I discover it.)

We are using the latest CGT (MSP430 C/C++ Compiler v21.6.1.LTS) and the libraries that came with the latest Code Composer Studio (CCS 2002) to create some MSP430 test programs and we've run into a problem.

We're compiling with the following qualifiers:

bin/cl430.exe --c11           \
--silicon_version=mspx        \
--use_hw_mpy=f5               \
--printf_support=nofloat      \
--c_src_interlist             \
--include_path=./include      \
--include_path=../ccs2002/ccs/ccs_base/msp430/include/ \
--output_file=hello_CGT_1.elf \
hello.c                       \
--run_linker                  \
--search_path=./lib/          \
--output_file=hello_CGT_2.elf \
--map_file=hello_CGT.map      \
lnk_msp430f5359.cmd

And what we're finding is that if our test program declares .bss items that total 985 bytes or more, the program never gets started. It appears to foul up somewhere in __TI_zero_init() as that tries to zero out the .bss region on program start-up. But if .bss totals 984 bytes or fewer, all goes well. Also, if we compile without the --silicon_version=mspx qualifier (so it becomes a 16 bit program rather than a 20 bit program), all goes well.

I can't yet tell you (yet) what arguments are being passed to __TI_zero_init() but I can tell you that if I modify the .txt file to NOP out the call to __TI_zero_init(), the program starts okay (except that .bss hasn't been initialized, of course). Reading the .txt file, the __TI_cinit_table (and its relatives) seems to contain valid data: the address it points to is the right place in RAM, it's invoking __TI_zero_init(), and its passing the correct initialization size.

Does anyone recognize this symptom?

I can post a version of my hello.c if it would help but my program's not doing anything special, just defining and accessing some global arrays that will be placed in .bss.


Viewing all articles
Browse latest Browse all 22176

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>