Open kiranshila opened 2 years ago
Hi @kiranshila, thank you for raising the issue.
I assume the problem is that probe-rs
defaults to using the probe_rs::WireProtocol::Jtag
, while you want to use Swd
. And probe-run
currently doesn't have a flag to to configure the protocol.
Could you please install following branch where I am setting the protocol to SWD, to test if it works then?
$ cargo install --git https://github.com/knurling-rs/probe-run --branch swd-protocol
If that fixes the problem we can easily add a new flag to configure that.
Hmm, still no dice, I'm getting the same error
I would suggest checking the logs of both programs and see where behavior diverges between probe-run and cargo-flash. with probe-run, pass -vv
to it to see the logs from the probe_rs
crate. for cargo-flash
, I guess setting the RUST_LOG=probe_rs=trace
env var should do the trick.
at least with SWD, there's quite a bit of communication with the probe before the 'flash' operation. if JTAG is similar, then I would expect a protocol mismatch (if that's indeed the issue) to fail much earlier than during the 'flash write', i.e. I would expect to see a different error message.
it could be that cargo-flash is doing some additional manipulation of flash write protection bits. at least with the nrf52840 that was necessary to unlock the flash before writing to it for the first time (chip was locked out of factory); these day that step is done in probe-rs
so both cargo-flash
and probe-run
do the right thing with that chip.
I'm trying to get probe-run to work and can't for the life of me figure out what's going wrong. I have an ATSAMD21E17A which communicates well with other tools (i.e. probe.rs) but it refuses to flash with probe-run.
To Reproduce If I try to burn my project with
It works as expected. However with probe-run
I see the same behavior if I remove the
--protocol
bit fromcargo flash
. I'm not sure if probe-run is falling back to JTAG or what.config.toml
Probe details
Operating System: Arch