Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current defmt version is broken #581

Closed
jannic opened this issue Apr 12, 2023 · 7 comments
Closed

Current defmt version is broken #581

jannic opened this issue Apr 12, 2023 · 7 comments

Comments

@jannic
Copy link
Member

jannic commented Apr 12, 2023

If you run into the following error, it is caused by a breaking change of the defmt crate in version 0.3.5:

Error: defmt wire format version mismatch: firmware is using 4, `probe-run` supports 3
suggestion: `cargo install` a different version of `probe-run` that supports defmt 4

Unfortunately, the latest version of probe-run is also broken, an update would cause this error:

Error: unable to determine reset handler

So for now, the best workaround is to stay with older versions of probe-run and defmt.
Run:

cargo install probe-run --version=0.3.6 --locked

And add this to your Cargo.toml

defmt = "=0.3.2"

(Version 0.3.3 would be better if it wasn't yanked for some reason. 😞)

@jannic jannic pinned this issue Apr 12, 2023
@jannic
Copy link
Member Author

jannic commented Apr 12, 2023

@Ragarnoy
Copy link

do any of the two prs fix the issue?

@jannic
Copy link
Member Author

jannic commented Apr 12, 2023

Those are two different issues, both with their own fix. Depending on what you want to do, one might be sufficient. Eg. if you update your firmware to use the most recent defmt version, you don't need support for the older one. So the fix for the reset handler issue in probe-run would be sufficient.

@9names
Copy link
Member

9names commented Apr 13, 2023

cargo install probe-run --version=0.3.6

Since we've already had unintended dependency breakage, best make it

cargo install probe-run --version=0.3.6 --locked

to ensure that nothing else new and broken gets pulled in

@jannic
Copy link
Member Author

jannic commented Apr 13, 2023

Good point. It doesn't matter for the dependency in question, as probe-run does depend on an exact version of defmt-decoder. But of course a similar breakage could happen with some other dependency. I added the flag.

@elpiel
Copy link

elpiel commented Apr 19, 2023

If anyone wants to help and test the Handle reset vector PR in order to be approved and merged faster, please consider commenting in the PR after testing with the changes:

cargo install probe-run --git https://github.com/knurling-rs/probe-run.git --rev 884e799dd7fb0cf6d64619a23a3807ca2ccb47e9

@jannic
Copy link
Member Author

jannic commented May 14, 2023

Fixes for both mentioned issues have been released.

@jannic jannic closed this as completed May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants