Preserve a section of FLASH memory during programming
Following in the directions of this post, I am able to reserve and write to (and read back) from a section of FLASH dedicated to calibration data. However, when I reprogram the device, the IDE wipes the whole memory clean before programming and we lose all the data. Since we are in a debugging cycle, we are constantly reprogramming and have to write the calibration back as a first step every time. Is there a way to tell the IDE to only erase a certain region of memory corresponding to the program data? Thanks.
Modified linker memory definitions:
/* Memories definition */
MEMORY
{
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 1792K
TABLE (rwx) : ORIGIN = 0x81C0000, LENGTH = 128K
DATA (rwx) : ORIGIN = 0x81E0000, LENGTH = 128K
}
What we see when programming:
Erasing memory corresponding to segment 0:
Erasing internal memory sector 0
Erasing memory corresponding to segment 1:
Erasing internal memory sector 14
Erasing memory corresponding to segment 2:
Erasing internal memory sector 15
Download in Progress:
