AnsweredAssumed Answered

preserving internal EEPROM when flashing

Question asked by schmid.m on Jan 10, 2018
Latest reply on Jan 12, 2018 by schmid.m

Hello,

I changed my linker file for flashing some initial values to the internal EEPROM of my stm32l0.

MEMORY
{
...
EEPROM (rw)      : ORIGIN = 0x80803E8, LENGTH = 1044
}

/* Define output sections */
SECTIONS
{
  .eepromAPN :
  {
    /*. = ALIGN(4);*/
    KEEP(*(.eepromAPN.number)) /* numberofApns */
    KEEP(*(.eepromAPN*)) /* APNs */
    /*. = ALIGN(4);*/
  } >EEPROM

...

}

this is implemented and working nicely. but:

whenever I reflash the controller, all other EEPROM parts (between 0x8080000 and 0x80803E8) are erased.

they were not reset before these changes to the linker file.

how can I prevent this? I have some important calibration data in the EEPROM, which MUST be unchanged when flashing.

Thanks,

Michael

Outcomes