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

Draft: Adding defmt-1.0 #909

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/cargo-semver-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@ jobs:
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
feature-group: default-features
manifest-path: defmt
- name: Semver check host crates
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
feature-group: default-features
manifest-path: decoder
- name: Semver check host crates
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
feature-group: default-features
manifest-path: decoder/defmt-json-schema
- name: Semver check host crates
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
feature-group: default-features
manifest-path: parser
- name: Semver check firmware crates
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
Expand Down
85 changes: 69 additions & 16 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ We have several packages which live in this repository. Changes are tracked sepa

> A highly efficient logging framework that targets resource-constrained devices, like microcontrollers

[defmt-next]: https://github.com/knurling-rs/defmt/compare/defmt-v0.3.10...main
[defmt-next]: https://github.com/knurling-rs/defmt/compare/defmt-v1.0.0...main
[defmt-v1.0.0]: https://github.com/knurling-rs/defmt/releases/tag/defmt-v1.0.0
[defmt-v0.3.100]: https://github.com/knurling-rs/defmt/releases/tag/defmt-v0.3.100
[defmt-v0.3.10]: https://github.com/knurling-rs/defmt/releases/tag/defmt-v0.3.10
[defmt-v0.3.9]: https://github.com/knurling-rs/defmt/releases/tag/defmt-v0.3.9
[defmt-v0.3.8]: https://github.com/knurling-rs/defmt/releases/tag/defmt-v0.3.8
Expand All @@ -49,6 +51,14 @@ We have several packages which live in this repository. Changes are tracked sepa

### [defmt-next]

### [defmt-v1.0.0] (2025-01-01)

* [#909] First 1.0 stable release :tada:

### [defmt-v0.3.100] (2025-01-01)

* [#909] Re-exports defmt-1.0.0

### [defmt-v0.3.10] (2024-11-29)

* [#902] Minor change to Format impl for `core::panic::PanicInfo`, eliding a lifetime specifier to satisfy Clippy 1.83.
Expand Down Expand Up @@ -378,7 +388,8 @@ Initial release

> Macros for [defmt](#defmt)

[defmt-macros-next]: https://github.com/knurling-rs/defmt/compare/defmt-macros-v0.4.0...main
[defmt-macros-next]: https://github.com/knurling-rs/defmt/compare/defmt-macros-v1.0.0...main
[defmt-macros-v1.0.0]: https://github.com/knurling-rs/defmt/releases/tag/defmt-macros-v1.0.0
[defmt-macros-v0.4.0]: https://github.com/knurling-rs/defmt/releases/tag/defmt-macros-v0.4.0
[defmt-macros-v0.3.10]: https://github.com/knurling-rs/defmt/releases/tag/defmt-macros-v0.3.10
[defmt-macros-v0.3.9]: https://github.com/knurling-rs/defmt/releases/tag/defmt-macros-v0.3.9
Expand All @@ -400,6 +411,10 @@ Initial release

### [defmt-macros-next]

### [defmt-macros-v1.0.0] (2025-01-01)

* [#909] First 1.0 stable release :tada:

### [defmt-macros-v0.4.0] (2024-11-29)

* [#899] Just a major version bump to stop it being used by older defmt versions.
Expand Down Expand Up @@ -448,7 +463,8 @@ Initial release

> A tool that decodes defmt logs and prints them to the console

[defmt-print-next]: https://github.com/knurling-rs/defmt/compare/defmt-print-v0.3.13...main
[defmt-print-next]: https://github.com/knurling-rs/defmt/compare/defmt-print-v1.0.0...main
[defmt-print-v1.0.0]: https://github.com/knurling-rs/defmt/releases/tag/defmt-print-v1.0.0
[defmt-print-v0.3.13]: https://github.com/knurling-rs/defmt/releases/tag/defmt-print-v0.3.13
[defmt-print-v0.3.12]: https://github.com/knurling-rs/defmt/releases/tag/defmt-print-v0.3.12
[defmt-print-v0.3.11]: https://github.com/knurling-rs/defmt/releases/tag/defmt-print-v0.3.11
Expand All @@ -468,6 +484,10 @@ Initial release

### [defmt-print-next]

### [defmt-print-v1.0.0] (2025-01-01)

* [#909] First 1.0 stable release :tada:

### [defmt-print-v0.3.13] (2024-11-27)

* [#807] Add `watch_elf` flag to allow ELF file reload without restarting `defmt-print`
Expand Down Expand Up @@ -518,7 +538,8 @@ Initial release

> Decodes defmt log frames

[defmt-decoder-next]: https://github.com/knurling-rs/defmt/compare/defmt-decoder-v0.4.0...main
[defmt-decoder-next]: https://github.com/knurling-rs/defmt/compare/defmt-decoder-v1.0.0...main
[defmt-decoder-v1.0.0]: https://github.com/knurling-rs/defmt/releases/tag/defmt-decoder-v1.0.0
[defmt-decoder-v0.4.0]: https://github.com/knurling-rs/defmt/releases/tag/defmt-decoder-v0.4.0
[defmt-decoder-v0.3.11]: https://github.com/knurling-rs/defmt/releases/tag/defmt-decoder-v0.3.11
[defmt-decoder-v0.3.10]: https://github.com/knurling-rs/defmt/releases/tag/defmt-decoder-v0.3.10
Expand All @@ -541,6 +562,9 @@ Initial release

### [defmt-decoder-next]

### [defmt-decoder-v1.0.0] (2025-01-01)

* [#909] First 1.0 stable release :tada:
* [#902] Minor change to `impl StreamDecoder` for `Raw` and `Rzcobs`, eliding a lifetime specifier to satisfy Clippy 1.83. No observable change.

### [defmt-decoder-v0.4.0] (2024-11-27)
Expand Down Expand Up @@ -592,7 +616,8 @@ Initial release

> Parsing library for defmt format strings

[defmt-parser-next]: https://github.com/knurling-rs/defmt/compare/defmt-parser-v0.4.0...main
[defmt-parser-next]: https://github.com/knurling-rs/defmt/compare/defmt-parser-v1.0.0...main
[defmt-parser-v1.0.0]: https://github.com/knurling-rs/defmt/releases/tag/defmt-parser-v1.0.0
[defmt-parser-v0.4.1]: https://github.com/knurling-rs/defmt/releases/tag/defmt-parser-v0.4.1
[defmt-parser-v0.4.0]: https://github.com/knurling-rs/defmt/releases/tag/defmt-parser-v0.4.0
[defmt-parser-v0.3.4]: https://github.com/knurling-rs/defmt/releases/tag/defmt-parser-v0.3.4
Expand All @@ -607,6 +632,10 @@ Initial release

### [defmt-parser-next]

### [defmt-parser-v1.0.0] (2025-01-01)

* [#909] First 1.0 stable release :tada:

### [defmt-parser-v0.4.1] (2024-11-27)

* [#897] Added its own README
Expand Down Expand Up @@ -637,7 +666,8 @@ Initial release

> Transmit defmt log messages over the RTT (Real-Time Transfer) protocol

[defmt-rtt-next]: https://github.com/knurling-rs/defmt/compare/defmt-rtt-v0.4.1...main
[defmt-rtt-next]: https://github.com/knurling-rs/defmt/compare/defmt-rtt-v1.0.0...main
[defmt-rtt-v1.0.0]: https://github.com/knurling-rs/defmt/releases/tag/defmt-rtt-v1.0.0
[defmt-rtt-v0.4.1]: https://github.com/knurling-rs/defmt/releases/tag/defmt-rtt-v0.4.1
[defmt-rtt-v0.4.0]: https://github.com/knurling-rs/defmt/releases/tag/defmt-rtt-v0.4.0
[defmt-rtt-v0.3.2]: https://github.com/knurling-rs/defmt/releases/tag/defmt-rtt-v0.3.2
Expand All @@ -648,6 +678,9 @@ Initial release

### [defmt-rtt-next]

### [defmt-rtt-v1.0.0] (2025-01-01)

* [#909] First 1.0 stable release :tada:
* [#902] Use `core::ptr::addr_of_mut!` instead of `&mut` on mutable statics. No observable change.
* [#901] `defmt-rtt`: Update to critical-section 1.2

Expand Down Expand Up @@ -676,12 +709,16 @@ Initial release

> Transmit defmt log messages over the ITM (Instrumentation Trace Macrocell) stimulus port

[defmt-itm-next]: https://github.com/knurling-rs/defmt/compare/defmt-itm-v0.3.0...main
[defmt-itm-next]: https://github.com/knurling-rs/defmt/compare/defmt-itm-v0.4.0...main
[defmt-itm-v0.4.0]: https://github.com/knurling-rs/defmt/releases/tag/defmt-itm-v0.4.0
[defmt-itm-v0.3.0]: https://github.com/knurling-rs/defmt/releases/tag/defmt-itm-v0.3.0
[defmt-itm-v0.2.0]: https://github.com/knurling-rs/defmt/releases/tag/defmt-itm-v0.2.0

### [defmt-itm-next]

### [defmt-itm-v0.4.0] (2025-01-01)

* [#909] Switch to using defmt-1.0
* [#902] Switch to using critical-section, and copy implementation over from defmt-rtt.

### [defmt-itm-v0.3.0] (2021-11-26)
Expand All @@ -694,11 +731,16 @@ Initial release

> Transmit defmt log messages over the semihosting (Instrumentation Trace Macrocell) stimulus port

[defmt-semihosting-next]: https://github.com/knurling-rs/defmt/compare/defmt-semihosting-v0.1.0...main
[defmt-semihosting-next]: https://github.com/knurling-rs/defmt/compare/defmt-semihosting-v0.2.0...main
[defmt-semihosting-v0.2.0]: https://github.com/knurling-rs/defmt/releases/tag/defmt-semihosting-v0.2.0
[defmt-semihosting-v0.1.0]: https://github.com/knurling-rs/defmt/releases/tag/defmt-semihosting-v0.1.0

### [defmt-semihosting-next]

### [defmt-semihosting-v0.2.0] (2025-01-01)

* [#909] Switch to using defmt-1.0

### [defmt-semihosting-v0.1.0] (2024-11-27)

Initial release
Expand All @@ -707,16 +749,21 @@ Initial release

> Panic handler that exits `probe-run` with an error code

[panic-probe-next]: https://github.com/knurling-rs/defmt/compare/panic-probe-v0.3.2...main
[panic-probe-v0.3.2]: https://github.com/knurling-rs/defmt/compare/panic-probe-v0.3.1...panic-probe-v0.3.2
[panic-probe-v0.3.1]: https://github.com/knurling-rs/defmt/compare/panic-probe-v0.3.0...panic-probe-v0.3.1
[panic-probe-v0.3.0]: https://github.com/knurling-rs/defmt/compare/panic-probe-v0.2.1...panic-probe-v0.3.0
[panic-probe-v0.2.1]: https://github.com/knurling-rs/defmt/compare/panic-probe-v0.2.0...panic-probe-v0.2.1
[panic-probe-v0.2.0]: https://github.com/knurling-rs/defmt/compare/panic-probe-v0.1.0...panic-probe-v0.2.0
[panic-probe-v0.1.0]: https://github.com/knurling-rs/defmt/compare/panic-probe-v0.0.0...panic-probe-v0.1.0
[panic-probe-next]: https://github.com/knurling-rs/defmt/compare/panic-probe-v1.0.0...main
[panic-probe-v1.0.0]: https://github.com/knurling-rs/defmt/releases/tag/panic-probe-v1.0.0
[panic-probe-v0.3.2]: https://github.com/knurling-rs/defmt/releases/tag/panic-probe-v0.3.1
[panic-probe-v0.3.1]: https://github.com/knurling-rs/defmt/releases/tag/panic-probe-v0.3.0
[panic-probe-v0.3.0]: https://github.com/knurling-rs/defmt/releases/tag/panic-probe-v0.2.1
[panic-probe-v0.2.1]: https://github.com/knurling-rs/defmt/releases/tag/panic-probe-v0.2.0
[panic-probe-v0.2.0]: https://github.com/knurling-rs/defmt/releases/tag/panic-probe-v0.1.0
[panic-probe-v0.1.0]: https://github.com/knurling-rs/defmt/releases/tag/panic-probe-v0.0.0

### [panic-probe-next]

### [panic-probe-v1.0.0] (2025-01-01)

* [#909] Switch to using defmt-1.0

### [panic-probe-v0.3.2] (2024-05-13)

### [panic-probe-v0.3.1] (2023-03-29)
Expand All @@ -737,7 +784,8 @@ Initial release

> A test harness for embedded devices

[defmt-test-next]: https://github.com/knurling-rs/defmt/compare/defmt-test-v0.3.2...main
[defmt-test-next]: https://github.com/knurling-rs/defmt/compare/defmt-test-v0.4.0...main
[defmt-test-v0.4.0]: https://github.com/knurling-rs/defmt/releases/tag/defmt-test-v0.4.0
[defmt-test-v0.3.2]: https://github.com/knurling-rs/defmt/releases/tag/defmt-test-v0.3.2
[defmt-test-v0.3.1]: https://github.com/knurling-rs/defmt/releases/tag/defmt-test-v0.3.1
[defmt-test-v0.3.0]: https://github.com/knurling-rs/defmt/releases/tag/defmt-test-v0.3.0
Expand All @@ -750,6 +798,10 @@ Initial release

### [defmt-test-next]

### [defmt-test-v0.4.0] (2025-01-01)

* [#909] Switch to using defmt-1.0

### [defmt-test-v0.3.2] (2024-03-05)

### [defmt-test-v0.3.1] (2023-10-11)
Expand Down Expand Up @@ -835,6 +887,7 @@ Initial release

---

[#909]: https://github.com/knurling-rs/defmt/pull/909
[#902]: https://github.com/knurling-rs/defmt/pull/902
[#901]: https://github.com/knurling-rs/defmt/pull/901
[#899]: https://github.com/knurling-rs/defmt/pull/899
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
exclude = ["firmware/*"]
exclude = ["firmware/*", "defmt-03"]
members = [
"decoder",
"decoder/defmt-json-schema",
Expand Down
4 changes: 2 additions & 2 deletions decoder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ license = "MIT OR Apache-2.0"
name = "defmt-decoder"
readme = "README.md"
repository = "https://github.com/knurling-rs/defmt"
version = "0.4.0"
version = "1.0.0-rc.1"

[dependencies]
byteorder = "1"
colored = "2"
defmt-parser = { version = "=0.4.1", path = "../parser" }
defmt-parser = { version = "=1.0.0-rc.1", path = "../parser" }
ryu = "1"
nom = "7"

Expand Down
50 changes: 50 additions & 0 deletions defmt-03/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[package]
authors = [ "The Knurling-rs developers" ]
categories = [
"embedded",
"no-std",
"development-tools::debugging",
"value-formatting",
]
description = "A highly efficient logging framework that targets resource-constrained devices, like microcontrollers"
edition = "2021"
keywords = [ "knurling", "logging", "logger", "formatting", "formatter" ]
license = "MIT OR Apache-2.0"
name = "defmt"
readme = "README.md"
repository = "https://github.com/knurling-rs/defmt"
homepage = "https://knurling.ferrous-systems.com/"
version = "0.3.100-rc.1"

[dependencies]
defmt10 = { package = "defmt", version = "1.0.0-rc.1", path = "../defmt" }

[features]
alloc = ["defmt10/alloc"]
avoid-default-panic = ["defmt10/avoid-default-panic"]
ip_in_core = ["defmt10/ip_in_core"]

# Encoding feature flags. These should only be set by end-user crates, not by library crates.
#
# If no encoding is selected, `defmt` will assume the encoding is "don't care" and
# will pick a default one. The current default is `encoding-rzcobs`. The default may change
# in minor releases, changing it is not considered a breaking change since all encodings
# are guaranteed to be supported by the corresponding `defmt-decoder` version.

# Raw encoding: All log frames are concatenated and sent over the wire with no framing or compression.
# This is the fastest CPU-wise, but may end up being slower if the limiting factor is wire speed.
encoding-raw = ["defmt10/encoding-raw"]

# rzCOBS encoding: Performs framing on the log frames using reverse-COBS, additionally applying a
# light compression for data known to contain many zero bytes, like defmt streams.
# The framing allows the decoder to recover from missing or corrupted data, and start decoding
# in the middle of a stream, for example when attaching to an already-running device.
encoding-rzcobs = ["defmt10/encoding-rzcobs"]

# WARNING: for internal use only, not covered by semver guarantees
unstable-test = [ "defmt10/unstable-test" ]

[package.metadata.docs.rs]
features = [ "alloc" ]
rustdoc-args = [ "--cfg=docsrs" ]
targets = [ "thumbv6m-none-eabi", "thumbv7em-none-eabihf" ]
Loading
Loading