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
Hi there-
This might be a silly question, but the TI examples didn't exactly spell this out.
I know in GCC, if we want to store a variable in a specific segment such as say ".infomem", you can add __attribute__((section(".infomem"))) and voila, you're done. Just access the variable using normal C operations.
On the FR2433 you'd still have to disable Data FRAM write protection but that's no big deal.
Is there a similar way (when using the TI Optimizing C/C++ compiler instead of GCC) to allow you to declare variables as living inside infomem, so you can read (and, when DFWP is disabled, write) with simple C primitives?
Nevermind, the linker script answers my questions:
SECTIONS { GROUP(ALL_FRAM) { GROUP(READ_WRITE_MEMORY) { .TI.persistent : {} /* For #pragma persistent */ } GROUP(READ_ONLY_MEMORY) { .cinit : {} /* Initialization tables */ .pinit : {} /* C++ constructor tables */ .binit : {} /* Boot-time Initialization tables */ .init_array : {} /* C++ constructor tables */ .mspabi.exidx : {} /* C++ constructor tables */ .mspabi.extab : {} /* C++ constructor tables */ .const : {} /* Constant data */ } GROUP(EXECUTABLE_MEMORY) { .text : {} /* Code */ } } > FRAM
Likewise, infoA is NOLOAD:
.infoA (NOLOAD) : {} > INFOA /* MSP430 INFO FRAM Memory segments */
**Attention** This is a public forum