Skip to content

Commit

Permalink
Fix espflash::write_bin
Browse files Browse the repository at this point in the history
The problem with `write_bin` is that `board_info`, that was used instead of `print_board_info`, tries to open a new connection to the serial port and because a connection is made at the start of `write_bin`, when `board_info` gets called, it fails because the port is already being used
  • Loading branch information
Rimpampa authored and jessebraham committed Feb 15, 2023
1 parent 5095641 commit 32bb951
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion espflash/src/bin/espflash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ fn save_image(args: SaveImageArgs) -> Result<()> {

fn write_bin(args: WriteBinArgs, config: &Config) -> Result<()> {
let mut flasher = connect(&args.connect_args, config)?;
board_info(&args.connect_args, config)?;
print_board_info(&mut flasher)?;

let mut f = File::open(&args.bin_file).into_diagnostic()?;
let size = f.metadata().into_diagnostic()?.len();
Expand Down

0 comments on commit 32bb951

Please sign in to comment.