mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-21 09:14:34 +00:00
print errors on slot initialization instead of crashing
these errors mostly trigger when transitioning between board types during testing
This commit is contained in:
parent
df9ae96263
commit
72e8c1a6fa
1 changed files with 6 additions and 1 deletions
|
|
@ -84,7 +84,12 @@ pub fn check_slots(board_type: &bao1x_api::BoardTypeCoding) {
|
||||||
for chunk in storage.chunks_mut(SLOT_ELEMENT_LEN_BYTES) {
|
for chunk in storage.chunks_mut(SLOT_ELEMENT_LEN_BYTES) {
|
||||||
chunk.copy_from_slice(&trng.generate_key());
|
chunk.copy_from_slice(&trng.generate_key());
|
||||||
}
|
}
|
||||||
slot_mgr.write(&mut rram, key_range, &storage).unwrap();
|
match slot_mgr.write(&mut rram, key_range, &storage) {
|
||||||
|
Ok(_) => {}
|
||||||
|
Err(e) => {
|
||||||
|
crate::println!("Couldn't initialize slot {:?}: {:?}", key_range, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// once all values are written, advance the IN_SYSTEM_BOOT_SETUP_DONE state
|
// once all values are written, advance the IN_SYSTEM_BOOT_SETUP_DONE state
|
||||||
// safety: the offset is correct because we're pulling it from our pre-defined constants and
|
// safety: the offset is correct because we're pulling it from our pre-defined constants and
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue