This is the 33rd changelog for Knurling-rs, our push to sustainably build better tooling for developing and debugging Rust software for embedded systems. Knurling-rs includes a suite of tools that make it easier to develop, log, debug, and test your embedded Rust libraries and applications!
Knurling-rs is supported by our sponsors on GitHub. If you're interested in seeing more projects like this, consider becoming a sponsor today!
Hello everyone! The
knurling-rs team is back with our first update of 2022. Next to highlighting recent changes, we want to take the opportunity to look back at 2021 and reflect what we achieved. Let's get started with that!
Looking back at 2021
During the course of 2021, 35 individuals contributed to the various knurling projects. Let's see what they've built!
defmt, our efficient, deferred formatting library for logging on embedded systems, saw two big releases
v0.3.0, from five in total.
On February 19, we released
v0.2.0. Next to many internal improvements, we added
defmt::Format implementations for many primitive and
std-library types (e.g.
core::time::Duration and many more) and introduced display hints for formatting data as binary, hexadecimal or ascii.
Counting all patch versions,
defmt v0.2 got more than 95000 downloads! Honestly, even we are pretty impressed with this.
Nine months later, on November 10, we released
v0.3.0. This was the result of many hours of work from the
knurling-rs team, but the biggest "Thank you" goes to our community member Dirbaio who worked tirelessly to drastically shrink the binary-size impact of
defmt. Next to this, the highlights of this release include the new compile-time log filter system
DEFMT_LOG, two new logging-macros
dbg!, more flexibility when implementing
defmt::Format and many more.
0.3.0 already got more than 10000 downloads and there are many more to come!
probe-run's year 2021 was even more turbulent than
defmt's. It featured ten releases, including the major
The output of
probe-run got prettier and more easy to understand. For example
probe-run highlights log-frames that point to your local code and it also shortens paths to your dependencies.
Additionally, using the new
--backtrace-limit options you can configure
probe-runs output more fine grained and intuitively.
Together the seven
v0.2.x releases of
probe-run got more than 2600 downloads, and the two
v0.3.x releases already got more than 1250!
What is next?
After the defmt 0.3 release, we sat down and gathered ideas, including the ones from our issue trackers and the knurling community survey 2021. Currently we are evaluating which of them to pursue in order cater our mission to improve the embedded Rust experience.
For two of these ideas we've written an RFC and would like your feedback on them!
Please comment if you like them, if you don't like them and also if something is unclear. All of this can be valuable input!
On the knurling-session side of things there is also some exciting content coming up.
In August, our Summer Student and now employee Aïssata Maiga wrote a new knurling Session for building a distance sensor for bikes. The sensor measures the distance of approaching objects and sends the data to a companion app on a mobile phone using Bluetooth Low Energy.
The firmware is written with RTIC and serves as an excellent intro to the framework. We plan to start the session for sponsors in Spring 2022.
And now we are already at the end of our review of 2021. We are looking forward what 2022 will bring and happy hacking!
probe-run support for Raspberry Pi silicon
Another exciting change, which landed end of December, is support for the Raspberry Pi chip
RP2040. From now on, nothing stands in your way of using
probe-run together with your raspberry-flavoured microcontroller.
$ probe-run --chip RP2040 --shorten-paths target/thumbv6m-none-eabi/debug/hello_pico (HOST) INFO flashing program (2 pages / 8.00 KiB) (HOST) INFO success! ──────────────────────────────────────────────────────────────────────────────── 0 INFO Hello, world! └─ hello_pico::__cortex_m_rt_main @ src/bin/hello_pico.rs:8 test 1 ERROR panicked at 'the disco', src/bin/hello_pico.rs:10:5 └─ panic_probe::print_defmt::print @ [panic-probe-0.3.0]/src/lib.rs:91 ──────────────────────────────────────────────────────────────────────────────── stack backtrace: 0: HardFaultTrampoline <exception entry> 1: lib::inline::__udf at ./asm/inline.rs:172:5 2: __udf at ./asm/lib.rs:49:17 3: cortex_m::asm::udf at [cortex-m-0.7.3]/src/asm.rs:43:5 4: rust_begin_unwind at [panic-probe-0.3.0]/src/lib.rs:72:9 5: core::panicking::panic_fmt at [rust]/library/core/src/panicking.rs:107:14 6: core::panicking::panic at [rust]/library/core/src/panicking.rs:48:5 7: hello_pico::__cortex_m_rt_main at src/bin/hello_pico.rs:10:5 8: main at src/bin/hello_pico.rs:6:1 9: Reset (HOST) ERROR the program panicked
But the congratulations for this shouldn't be directed to us, but to the folks at
probe-rs. On our side we just needed to upgrade to
probe-rs v0.12 and be happy to stand on the shoulders of giants.
- #647 Fail parsing of missing display hint
- #646 Fix formating of Arg::Ixx based integer hex values
- #643 more RTT buffer size docs
- #641 Release v0.3.1
- #639 Use fully qualified
defmt::unreachable!()in macros. Fixes #638.
- #636 fix CHANGELOG links
- #635 mention #628
- #634 Update ELF parsing deps
- #633 fix #628
- #630 Added test instructions to the top-level README.
- #626 Fix error message in case of version-mismatch. Thanks to
- #624 Release
- #618 Support #[ignore] attribute in defmt_test
- #623 Update
- #621 Readme Diagram: Replace duplicate defmt-itm with defmt-rtt. Thanks to
- #617 Add display hint to output
u64as ISO8601 time
- #620 Tidy up
- #619 Update all crates to rust edition 2021! 🎉
defmt-print: Log if malformed frame gets skipped
- #604 defmt-test:
- #616 update user guide part of the book
- #615 document how to deal with backward compatibility breakage
- #614 Bugfix: decoder breaks with pipe symbol
- #605 properly handle the
offpseudo-level in presence of nested logging directives
- #611 Fix
decoder: Fix that
defmt::println!shows leading space when timestamps are disabled
- #606 Update change log with recent entries
- #296 turn some println! into writeln!
- #294 Update
- #288 Release v0.3.1
- #286 Update dependencies
- #287 unwind: skip FDEs with initial address of 0
- #285 Update probe-rs, probe-rs-rtt to 0.12. Thanks to
- #283 Update snapshot tests
- #282 Include program counter value in backtrace when -v is passed
- #281 Report flashing size using probe-rs's FlashProgress system.
- #280 Turn demangling back on
- #276 Release
- #274 Update
- #273 Update to Rust 2021 🎉
Cargo.toml: Remove unused dependencies
- #269 Update change log with recent entries
- #64 ci: cache cargo registry & build artifacts
- #63 search linker scripts in cwd first
- #60 Update to Rust 2021 🎉
- #59 Add entry to change log
- #61 Disable LTO
- #6O add unit tests
- #58 Add documentation for https://github.com/knurling-rs/defmt/issues/628
- #57 Updates nrf-hal version to 0.14.0 to resolve dependency conflicts.
- #56 update defmt deps to v0.3
Sponsor this work
Knurling-rs is mainly funded through GitHub sponsors. Sponsors get early access to the tools we are building and help us to support and grow the knurling tools and courses. Thank you to all of the people already sponsoring our work through the Knurling project!