mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2025-01-23 14:28:18 +00:00
bugfix: pass hex files to xtask with correct path
This commit is contained in:
parent
aaab45189d
commit
94b7dcf756
2 changed files with 5 additions and 1 deletions
|
@ -14,7 +14,10 @@ fn main() -> color_eyre::Result<()> {
|
||||||
|
|
||||||
match &args[..] {
|
match &args[..] {
|
||||||
["change-channel", channel] => tasks::change_channel(channel),
|
["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(),
|
["serial-term"] => tasks::serial_term(),
|
||||||
["usb-list"] => tasks::usb_list(),
|
["usb-list"] => tasks::usb_list(),
|
||||||
_ => {
|
_ => {
|
||||||
|
|
|
@ -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 {
|
let ihex = if is_hex {
|
||||||
path.to_owned()
|
path.to_owned()
|
||||||
} else {
|
} else {
|
||||||
|
// TODO move to own function
|
||||||
// ELF -> IHEX
|
// ELF -> IHEX
|
||||||
// here we map the ELF loadable segments -- these correspond to sections like `.text`, `.rodata`
|
// here we map the ELF loadable segments -- these correspond to sections like `.text`, `.rodata`
|
||||||
// and `.data` (initial values) -- to ihex records
|
// and `.data` (initial values) -- to ihex records
|
||||||
|
|
Loading…
Reference in a new issue