From 78f1246b71ced612b97528bfb8b40a0f7000783c Mon Sep 17 00:00:00 2001 From: sjlongland Date: Sat, 26 Sep 2015 11:45:28 +0000 Subject: [PATCH] stm32_flash: Fill EEPROM section with 0xff. 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/codec2-dev/stm32/stm32_flash.ld b/codec2-dev/stm32/stm32_flash.ld index 09acaf3f..7ecd81a9 100644 --- a/codec2-dev/stm32/stm32_flash.ld +++ b/codec2-dev/stm32/stm32_flash.ld @@ -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 : -- 2.25.1