Hello,
I want to create ram variables that I do not want to be initialise at Boot. I wonder how to do it. I defined the location in the following c file.
#pragma LOCATION (dumpPC,0x2400);
volatile unsigned long dumpPC; // 0x2400 - dumpPC; R0
#pragma LOCATION (dumpSP,0x2404);
volatile unsigned long dumpSP; // 0x2404 - dumpSP; R1
#pragma LOCATION (dumpSR,0x2408);
Then I modified my lnk_msp430f5529.cmd:
/* RAM_RSV : origin = 0x2400, length = 0x0080 */
RAM : origin = 0x2480, length = 0x1F80
USBRAM : origin = 0x1C00, length = 0x0800
...
// .RAM_RSV : {} > RAM_RSV /* Reserved RAM */
.bss : {} > RAM /* GLOBAL & STATIC VARS */
.data : {} > RAM /* GLOBAL & STATIC VARS */
.sysmem : {} > RAM /* DYNAMIC MEMORY ALLOCATION AREA */
.stack : {} > RAM (HIGH) /* SOFTWARE SYSTEM STACK */
But the linker always creates a BOUND and generate an init table for each variable. I do not want those variables to be re-init on reset.
__TI_cinit_table @ 000071d2 records: 7, size/record: 8, table size: 56
TI.bound:dumpPC: load addr=000071ae, load size=00000006 bytes, run addr=00002400, run size=00000004 bytes, compression=zero_init
.TI.bound:log_options: load addr=000071b4, load size=00000006 bytes, run addr=00002448, run size=00000004 bytes, compression=zero_init
.TI.bound:por_counter: load addr=000071ba, load size=00000006 bytes, run addr=00002444, run size=00000002 bytes, compression=zero_init
.TI.bound:por_entry: load addr=000071c0, load size=00000006 bytes, run addr=00002446, run size=00000001 bytes, compression=zero_init
.TI.bound:por_signature: load addr=000071c6, load size=00000006 bytes, run addr=00002478, run size=00000004 bytes, compression=zero_init
.bss: load addr=000071cc, load size=00000006 bytes, run addr=00002480, run size=000003d5 bytes, compression=zero_init
Regards,