Fix `block_erase` addresses - Instead of sending a different address for each block that was to be erased, we mistakenly always sent the address of the first block (and since you can't overwrite unerased flash, this caused flashes to fail to update the storage). Bug: 293946589 Change-Id: I57f66674f0bcced46572f1ad91feb3cf176dd859
diff --git a/sw/host/opentitanlib/src/spiflash/flash.rs b/sw/host/opentitanlib/src/spiflash/flash.rs index 0012797..eda6f4e 100644 --- a/sw/host/opentitanlib/src/spiflash/flash.rs +++ b/sw/host/opentitanlib/src/spiflash/flash.rs
@@ -292,7 +292,7 @@ }; spi.run_eeprom_transactions(&mut [ Transaction::Command(MODE_111.cmd(SpiFlash::WRITE_ENABLE)), - Transaction::Command(MODE_111.cmd_addr(opcode, address, self.address_mode)), + Transaction::Command(MODE_111.cmd_addr(opcode, addr, self.address_mode)), Transaction::WaitForBusyClear, ])?; progress(addr, sector_size);