Using ARM clang / linker ver 6.2 I am trying to put a variable in unitialised rw memory, so that it does not get zeroed at reset.
Does anyone have any example of how to do this? the example shown below gets zeroed on reset
I have tried defining sections in the scatter file and then attribute in 'C' module -
static volatile measurement_entry_t measurement_queue[MAX_STORE_MEASUREMENTS] __attribute__((section(".mstore"),aligned(4), used));
Can anyone detail how i may add this to the scatter file which at my last attempt is -
LR_IROM1 0x08000000 0x00100000 { ; load region size_region ER_IROM1 0x08000000 0x00100000 { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) .ANY (+XO) } RW_IRAM1 0x20000000 0x000B0000 { ; RW data .ANY (+RW +ZI) } ER_MEASURE_DATA 0x200B0000 UNINIT 0x00010000 { ; 64K unitialised space .ANY(.mstore) }}