jacobrosenthal / hf2-rs

Microsoft HF2 HID Flashing Format for UF2 Bootloaders
49 stars 14 forks source link

cargo hf2 panics with alternative target-dir #21

Open amiraeva opened 4 years ago

amiraeva commented 4 years ago

In my ~/.cargo/config I point my target-dir to an alternate directory (/tmp/cargo_build) and I get a panic in cargo hf2. Manually copying the contents of the build directory into a local folder named target is a workaround to this issue.

Finished release [optimized] target(s) in 0.03s
    Searching for a connected device with known vid/pid pair.
    Trying  Ok(Some("Adafruit Industries")) Ok(Some("Feather M0"))
    Flashing "/tmp/feather_m0/target/thumbv6m-none-eabi/release/examples/usb_echo"
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/amiraeva/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-hf2-0.2.0/src/main.rs:175:20
jacobrosenthal commented 3 years ago

Ideally someone could try out recently bumped cargo project dependency. Also cargo-metadata seems to be the goto instead of cargo project nowadays. That could be investigated