boot: flash-erase-zero (#3344)
Allow compatibility with devices whose flash erase set bytes to 0x00 instead of 0xFF, using a new flash-erase-zero feature. See issue #3342.
This commit is contained in:
@@ -47,6 +47,7 @@ ed25519-dalek = { version = "2", default-features = false, features = ["std", "r
|
||||
[features]
|
||||
ed25519-dalek = ["dep:ed25519-dalek", "_verify"]
|
||||
ed25519-salty = ["dep:salty", "_verify"]
|
||||
flash-erase-zero = []
|
||||
|
||||
#Internal features
|
||||
_verify = []
|
||||
|
||||
@@ -14,7 +14,11 @@ mod test_flash;
|
||||
|
||||
// The expected value of the flash after an erase
|
||||
// TODO: Use the value provided by NorFlash when available
|
||||
#[cfg(not(feature = "flash-erase-zero"))]
|
||||
pub(crate) const STATE_ERASE_VALUE: u8 = 0xFF;
|
||||
#[cfg(feature = "flash-erase-zero")]
|
||||
pub(crate) const STATE_ERASE_VALUE: u8 = 0x00;
|
||||
|
||||
pub use boot_loader::{BootError, BootLoader, BootLoaderConfig};
|
||||
pub use firmware_updater::{
|
||||
BlockingFirmwareState, BlockingFirmwareUpdater, FirmwareState, FirmwareUpdater, FirmwareUpdaterConfig,
|
||||
|
||||
Reference in New Issue
Block a user