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.
I'm compiling my MSP430 C files with the following CC opts:
cl430 --abi=eabi -c -vmspx --code_model=small --data_model=small
But when I try to link I get the following linker warning:
warning: creating output section ".data" without a SECTIONS specification
It seems that all my initialized global variables are being placed in the .data section but none of the provided MSP430 linker command files are placing the .data section.
I don't have this problem with COFF (ie remove the --abi=eabi from the CC opts) .
What am I doing wrong?
Alan DeMars
EABI does change the set of data sections generated by the compiler, and all linker command files need to be updated to allocate .data
If you don't update the linker command file, the linker should still be able to find a place for it, but it might not be where you want.
You are correct that the sample linker command files that ship with the compiler weren't updated, and they should have been.
I have filed SDSCM00042839 to track this issue.
We are also updating the documentation to cover this topic.
All the various MSP430 device-specific linker command files shipped with CCS need to be updated as well.
.data is not a new section. It is the usual section for data in hand-coded assembly. However, the MSP compiler will never generate a use of the .data section in COFF ABI (unless the user explicitly uses DATA_SECTION). Thus, the linker command file should be prepared to place .data even for COFF ABI.
Here is the list of target content sections that are generated by the MSP compiler for EABI mode but not COFF ABI mode: