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.
Problem:
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.
The ST Community came to my aid. Answer is to use (NOLOAD) in the linker file to tell the compiler not to put initialization data in the .elf file. Details can be found here: https://mcuoneclipse.com/2014/04/19/gnu-linker-can-you-not-initialize-my-variable/