sim: Show address for overwrite error
When trying to write to the flash to a non-FF location, put the
location of the failure in the error message to help diagnose the
problem.
@@ -95,7 +95,7 @@ impl Flash {
let mut sub = &mut self.data[offset .. offset + payload.len()];
if sub.iter().any(|x| *x != 0xFF) {
- bail!(ewrite("Write to non-FF location"));
+ bail!(ewrite(format!("Write to non-FF location: offset: {:x}", offset)));
}
sub.copy_from_slice(payload);
