Skip to content

Commit

Permalink
Merge #747
Browse files Browse the repository at this point in the history
747: Bump wire version r=Urhengulas a=therealfrauholle

The changes introduced in #742 add the field `crate_name` to the wire format. As far as I understand this requires a bump of the defmt version.

Also, is this a reason to yank version 0.3.5? This problem caused me quite some headache today and I hope this spares others from going through the same pain.

Co-authored-by: Finn Hermeling <[email protected]>
Co-authored-by: Urhengulas <[email protected]>
  • Loading branch information
3 people authored Apr 5, 2023
2 parents 064ba39 + 22ef5bf commit 329bee6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

- [#747]: Bump wire version

[#747]: https://github.com/knurling-rs/defmt/pull/747

## [v0.3.3] - 2023-03-29

- [#745]: Release `defmt-v0.3.3`, `defmt-decoder-v0.3.5`, `defmt-macros v0.3.4`, `defmt-parser v0.3.2`, `defmt-print v0.3.5` and `panic-probe v0.3.1`
Expand Down
2 changes: 1 addition & 1 deletion decoder/src/elf2table/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ pub fn parse_impl(elf: &[u8], check_version: bool) -> Result<Option<Table>, anyh
fn check_version(version: &str) -> Result<(), String> {
if version != DEFMT_VERSION {
let msg = format!(
"defmt wire format version mismatch: firmware is using {}, `probe-run` supports {}\nsuggestion: `cargo install` a different version of `probe-run` that supports defmt {}",
"defmt wire format version mismatch: firmware is using {}, `probe-run` supports {}\nsuggestion: use a newer version of `defmt` or `cargo install` a different version of `probe-run` that supports defmt {}",
version, DEFMT_VERSION, version
);

Expand Down
2 changes: 1 addition & 1 deletion decoder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#![cfg_attr(docsrs, doc(cfg(unstable)))]
#![doc(html_logo_url = "https://knurling.ferrous-systems.com/knurling_logo_light_text.svg")]

pub const DEFMT_VERSION: &str = "3";
pub const DEFMT_VERSION: &str = "4";

mod decoder;
mod elf2table;
Expand Down
2 changes: 1 addition & 1 deletion defmt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extern crate alloc;
#[used]
#[cfg_attr(target_os = "macos", link_section = ".defmt,end.VERSION")]
#[cfg_attr(not(target_os = "macos"), link_section = ".defmt.end")]
#[export_name = "_defmt_version_ = 3"]
#[export_name = "_defmt_version_ = 4"]
static DEFMT_VERSION: u8 = 0;

#[used]
Expand Down
4 changes: 2 additions & 2 deletions xtask/src/backcompat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ use crate::{ALL_ERRORS, ALL_SNAPSHOT_TESTS, SNAPSHOT_TESTS_DIRECTORY};
const DISABLED: bool = false;

// use this format: PR <number> - <what feature / change broke compatibility>
// PR #569 - defmt::println!
const REVISION_UNDER_TEST: &str = "8a6e8eebe40f943d9b0ba8725cd6da033b9c399e";
// PR #747 - Bump wire format
const REVISION_UNDER_TEST: &str = "0e92d3a88aa472377b964979f522829d961d8986";

// the target name is in `firmware/qemu/.cargo/config.toml` but it'd be hard to extract it from that file
const RUNNER_ENV_VAR: &str = "CARGO_TARGET_THUMBV7M_NONE_EABI_RUNNER";
Expand Down

0 comments on commit 329bee6

Please sign in to comment.