Tool/software: TI C/C++ Compiler
I am placing an array in the Flash memory block but when I declare my variable it needs to be declared as a const otherwise at runtime the program aborts.
Here is what I'm doing:
#pragma DATA_SECTION(myArray, .mySection)
myArray[1024]; //This causes abort
const myArray[1024] = {0}; //does not cause issues but I would like to see if I can keep this location non-volatile so I was trying not to initialize.
my linker command file looks as such:
MEMORY
{
FLASH (RX) : origin = 0x00000000, length = 0x000F0000
myFLASH(RW) : origin = 0x000F0000, length = 0x00010000
SRAM (RWX) : origin = 0x20000000, length = 0x00040000
}
/* Section allocation in memory */
SECTIONS
{
.text : > FLASH
.const : > FLASH
.cinit : > FLASH
.pinit : > FLASH
.init_array : > FLASH
.mySection : > myFLASH
.
.
.