report timeouts during the SPIM test in the loader

This commit is contained in:
bunnie 2024-05-22 18:10:32 +08:00
parent 34e7474b80
commit 818372a604

View file

@ -267,7 +267,9 @@ impl SwapHal {
// allocate the buf
let mut buf = RawPage { data: [0u8; 4096] };
// fetch the header
flash_spim.mem_read(SWAP_IMG_START as u32, &mut buf.data, false);
if !flash_spim.mem_read(SWAP_IMG_START as u32, &mut buf.data, false) {
println!("Timeout reading FLASH_SPIM");
};
// compute offsets for swap
let ram_size_actual = crate::swap::derive_usable_swap(swap.ram_size as usize);