Skip to content

Commit

Permalink
RSDK-5805 - support remembering serial port for espflash (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
gvaradarajan authored Jan 17, 2024
1 parent a17f70e commit 786eccc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions micro-rdk-installer/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ pub enum Error {
MonitorError(String),
#[error("Unimplemented command: {0}")]
UnimplementedError(String),
#[error("Serial config error: {0}")]
SerialConfigError(String),
#[error("No command received")]
NoCommandError,
}
Expand Down
4 changes: 2 additions & 2 deletions micro-rdk-installer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ fn flash(
port: None,
no_stub: false,
};
let conf = Config::default();
let conf = Config::load().map_err(|err| Error::SerialConfigError(err.to_string()))?;
log::info!("Connecting...");
let mut flasher = connect(&connect_args, &conf).map_err(|_| Error::FlashConnect)?;
let mut f = File::open(binary_path).map_err(Error::FileError)?;
Expand Down Expand Up @@ -265,7 +265,7 @@ fn monitor_esp32(baud_rate: Option<u32>, log_file_path: Option<String>) -> Resul
port: None,
no_stub: false,
};
let conf = Config::default();
let conf = Config::load().map_err(|err| Error::SerialConfigError(err.to_string()))?;
log::info!("Connecting...");
let flasher = connect(&connect_args, &conf).map_err(|_| Error::FlashConnect)?;
let pid = flasher.get_usb_pid().map_err(Error::EspFlashError)?;
Expand Down

0 comments on commit 786eccc

Please sign in to comment.