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.
Tool/software: TI C/C++ Compiler
I have a project which I am porting from CCS5.4 (compiler 4.1.5) to CCS9.2. I've already a fixed a few issues related to this move, but this one has me stumped. My command file defines two flash segments corresponding to the 5527 flash.
FLASH : origin = 0x4400, length = 0xBB80
FLASH2 : origin = 0x10000,length = 0xC400
The sections .text and .cinit are allocated to these segments as follows:
.cinit : {} > FLASH
.text : {}>> FLASH | FLASH2
The problem is that I've reached the point where the .text has filled up the FLASH segment and started to use the FLASH2 segment. Because the FLASH segment is full, the linker fails to allocate space for .cinit section. How do I tell the linker to prioritize placing the .cinit section in FLASH and move .text to FLASH2 as needed? There is plenty of room in FLASH2.
Are you letting CCS handle the linker file? The standard lnk_msp430f5529.cmd (I didn't mess with it, anyway) has:
#ifndef __LARGE_CODE_MODEL__ .text : {} > FLASH /* Code */ #else .text : {} >> FLASH2 | FLASH /* Code */ #endif
which, if you set "Build Options->Build->Compiler->Processor Options->Code memory model" to "large", uses upper flash preferentially.
I see. Rather than prioritize which sections go into a segment, this prioritize which segments a section goes into. Not the solution I was expecting, but it works. Thank you.
**Attention** This is a public forum