Skip to content

Commit

Permalink
test: Fix HIL write-bin test
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioGasquez committed Feb 26, 2025
1 parent 9f720c4 commit 882cac1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion espflash/src/bin/espflash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,9 @@ fn write_bin(args: WriteBinArgs, config: &Config) -> Result<()> {
let padded_bytes = 4 - (size % 4);
let mut buffer = Vec::with_capacity(size.try_into().into_diagnostic()?);
f.read_to_end(&mut buffer).into_diagnostic()?;
buffer.extend_from_slice(&vec![0xFF; padded_bytes as usize]);
if padded_bytes != 0 {
buffer.extend_from_slice(&vec![0xFF; padded_bytes as usize]);
}

flasher.write_bin_to_flash(
args.address,
Expand Down

0 comments on commit 882cac1

Please sign in to comment.