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

cargo embed --release causes defmt version mismatch #57

Closed
nvsd opened this issue May 2, 2023 · 4 comments · Fixed by #58
Closed

cargo embed --release causes defmt version mismatch #57

nvsd opened this issue May 2, 2023 · 4 comments · Fixed by #58

Comments

@nvsd
Copy link

nvsd commented May 2, 2023

when running cargo embed --release I get the error

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

Which is pretty weird because those versions seem wrong anyways?

Not quite sure what's going on here.

@nvsd nvsd changed the title cargo embed --release caused defmt version mismatch cargo embed --release causes defmt version mismatch May 2, 2023
@9names
Copy link
Member

9names commented May 2, 2023

Cargo-embed has an error message mentioning probe-run? I never noticed that before.
Anyway, this is documented here rp-rs/rp-hal#581

I thought we fixed it in the template...

@nvsd
Copy link
Author

nvsd commented May 2, 2023

Sorry, just to clarify I'm talking about cargo embed specifically. It seems like the fixes in the template were focused around probe run only.

I got the fix from a probe-rs matrix user which is to run cargo install --locked --force cargo-embed.

I'm happy to open a PR to update the readme I'm not quite sure where or how you'd like to word that though considering it's temporary and could be fixed any day now.

@jannic
Copy link
Member

jannic commented May 2, 2023

I'd just update the example to read cargo install --locked cargo-embed. Even if the fix is only needed temporarily, using the --locked flag seems to be a good idea in general, as discussed on matrix.

Not 100% sure about the --force flag, but I think I won't add it to the README. You only need it if you already installed the binary without the --locked flag, and you get a helpful message in that case: Ignored package cargo-embed v0.18.0 is already installed, use --force to override.

@nvsd
Copy link
Author

nvsd commented May 2, 2023

Ok, will do that. Thanks again @jannic for all of the help here and on Matrix.

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

Successfully merging a pull request may close this issue.

3 participants