From 94b7dcf7562be82c39b6b4821839fcb2f758184f Mon Sep 17 00:00:00 2001 From: Lotte Steenbrink Date: Tue, 26 Jan 2021 10:31:58 +0100 Subject: [PATCH] bugfix: pass hex files to xtask with correct path --- xtask/src/main.rs | 5 ++++- xtask/src/tasks.rs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/xtask/src/main.rs b/xtask/src/main.rs index bcf4759..aca5dac 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -14,7 +14,10 @@ fn main() -> color_eyre::Result<()> { match &args[..] { ["change-channel", channel] => tasks::change_channel(channel), - ["dongle-flash", hex] => tasks::dongle_flash(hex), + ["dongle-flash", hex] => { + let hexpath = env::current_dir()?.join(hex); + tasks::dongle_flash(hexpath.to_str().unwrap()) + }, ["serial-term"] => tasks::serial_term(), ["usb-list"] => tasks::usb_list(), _ => { diff --git a/xtask/src/tasks.rs b/xtask/src/tasks.rs index acd994b..5fd6c1b 100644 --- a/xtask/src/tasks.rs +++ b/xtask/src/tasks.rs @@ -77,6 +77,7 @@ if the red LED was blinking and you got this message then the device wasn't corr let ihex = if is_hex { path.to_owned() } else { + // TODO move to own function // ELF -> IHEX // here we map the ELF loadable segments -- these correspond to sections like `.text`, `.rodata` // and `.data` (initial values) -- to ihex records