bugfix: pass hex files to xtask with correct path

This commit is contained in:
Lotte Steenbrink 2021-01-26 10:31:58 +01:00
parent aaab45189d
commit 94b7dcf756
2 changed files with 5 additions and 1 deletions

View file

@ -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(),
_ => {

View file

@ -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