stm32_flash: Fill EEPROM section with 0xff.
authorsjlongland <sjlongland@01035d8c-6547-0410-b346-abe4f91aad63>
Sat, 26 Sep 2015 11:45:28 +0000 (11:45 +0000)
committersjlongland <sjlongland@01035d8c-6547-0410-b346-abe4f91aad63>
Sat, 26 Sep 2015 11:45:28 +0000 (11:45 +0000)
Filling it with 0x00 (the default) makes the virtual EEPROM code think
the sectors are depleted.

git-svn-id: https://svn.code.sf.net/p/freetel/code@2395 01035d8c-6547-0410-b346-abe4f91aad63

codec2-dev/stm32/stm32_flash.ld

index 09acaf3f71af3c3ee07dddadfa684a9b15e2fecb..7ecd81a9ce2bce98444083e5322288932efaeb02 100644 (file)
@@ -35,9 +35,11 @@ SECTIONS
   .eeprom :
   {
     . = ALIGN(4);
-    *(.eeprom)         /* special section for persistent data */
+    KEEP(*(.eeprom))   /* special section for persistent data */
+    . = ORIGIN(EEPROM) + LENGTH(EEPROM) - 1;
+    BYTE(0xFF)
     . = ALIGN(4);
-  } >EEPROM
+  } >EEPROM = 0xff
 
 
   .text :