Add sim support for flash erased at 0
This extends the simulator to be able to test the bootloader in devices
which use flash technologies that erase flash at 0 instead of 0xff.
Two MCU devices that have this "property" are the STM32L0x and STM32L1x
lines from ST.
Signed-off-by: Fabio Utzig <utzig@apache.org>
diff --git a/sim/mcuboot-sys/csupport/flash_map.h b/sim/mcuboot-sys/csupport/flash_map.h
index 506f266..7622dd0 100644
--- a/sim/mcuboot-sys/csupport/flash_map.h
+++ b/sim/mcuboot-sys/csupport/flash_map.h
@@ -126,6 +126,11 @@
uint8_t flash_area_align(const struct flash_area *);
/*
+ * What is value is read from erased flash bytes.
+ */
+uint8_t flash_area_erased_val(const struct flash_area *);
+
+/*
* Given flash area ID, return info about sectors within the area.
*/
int flash_area_get_sectors(int fa_id, uint32_t *count,