Skip to content

Commit

Permalink
SFT-4639: Fix simulator crash.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeandudey committed Jan 7, 2025
1 parent 58768f8 commit 61d51e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion extmod/foundation-rust/src/flash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ static mut FLASH: Lazy<
use embedded_storage_fs::File;

// NOTE: It is fine to panic here as this code is for the simulator.
let file = File::open("spi_flash.bin", 1000)
//
// The capacity is 8 MiB as in the hardware.
let file = File::open("spi_flash.bin", 8 * 1024 * 1024)
.expect("Could not open SPI flash file");
RefCell::new(RedundantRead::new(file, 3))
});
Expand Down

0 comments on commit 61d51e7

Please sign in to comment.