Hello all,
Hopefully just a quick question. I would like to pragma some initialized data into RAM and not have an entry generated in the .cinit table, but instead load the data from a different region in flash. Is this possible?
For example:
#pragma DATA_SECTION(test_var, ".test_var_section");
unsigned int test_var[100] = {0,1,2,3,4...99};
.test_var_section LOAD = FLASH, RUN = RAM
{
*(.test_var_section)
}
The above statements will generate a .cinit entry and allocate the data in ram.
What I would like to do is RUN the data from RAM and initialize it from a different region of flash as specified in the Linker Command File.
The problem comes during linking, when the LOAD rule is ignored becuase the .test_var_section has been created as an un-initalized section.
Looking at the assemlbly, a .cinit section has been created to hold the initialized values and a un-initialize section has been used to instantiate the data. This causes a problem when trying to move the data with the above pragma.
Is there any way ,other than writing assembly code, to bypass the creation of the .cinit entry used for initialization, and instead use the flash region specified in the Linker Command File.
Thanks,
Paul