Part Number: MSPM0G1507
Hi,
We are using MSPM0G1507SPTR. We are considering implementing our own memory initialization in the startup code instead of relying fully on _c_int00().
In the linker command file, we tried to use LOADADDR(.data) to get the FLASH load address of the .data section, but it caused a linker error.
Our understanding is that LOADADDR() is GCC linker script syntax and cannot be used in a TI linker command file.
For TI linker command files, should we use LOAD_START(), RUN_START(), RUN_END(), etc. instead?
For example, is the following approach correct?
.data : palign(8)
{
*(.data)
*(.data.*)
} load = FLASH, run = SRAM,
LOAD_START(_sidata),
RUN_START(_sdata),
RUN_END(_edata)
.bss : palign(8)
{
*(.bss)
*(.bss.*)
} run = SRAM,
RUN_START(_sbss),
RUN_END(_ebss)
In this case, we plan to copy .data from _sidata to _sdata–_edata and clear .bss from _sbss to _ebss in our startup code. Could you please confirm if this understanding is correct?
Thanks,
Conor