Fallback to total RAM or FLASH size if otherwise not present.
This commit is contained in:
parent
f6c5f039c8
commit
4da8ed471b
1 changed files with 2 additions and 2 deletions
|
@ -762,10 +762,10 @@ fn bytes_find(haystack: &[u8], needle: &[u8]) -> Option<usize> {
|
|||
fn gen_memory_x(out_dir: &PathBuf, chip: &Chip) {
|
||||
let mut memory_x = String::new();
|
||||
|
||||
let flash_bytes = chip.flash.regions.get("BANK_1").unwrap().bytes.unwrap();
|
||||
let flash_bytes = chip.flash.regions.get("BANK_1").unwrap().bytes.unwrap_or(chip.flash.bytes);
|
||||
let flash_origin = chip.flash.regions.get("BANK_1").unwrap().base;
|
||||
|
||||
let ram_bytes = chip.ram.regions.get("SRAM").unwrap().bytes.unwrap();
|
||||
let ram_bytes = chip.ram.regions.get("SRAM").unwrap().bytes.unwrap_or(chip.ram.bytes);
|
||||
let ram_origin = chip.ram.regions.get("SRAM").unwrap().base;
|
||||
|
||||
write!(memory_x, "MEMORY\n{{\n").unwrap();
|
||||
|
|
Loading…
Reference in a new issue