Blog coding article

Knurling-rs changelog #7

Jorge
Article

Knurling-rs changelog #7

Published on 3 min read
Knurling icon
Knurling
A tool set to develop embedded applications faster.
❤️ Sponsor

    This is the seventh 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!

    Highlights

    defmt-test is now on crates.io

    defmt-test is a no_std test harness that helps you write unit tests that will run on your microcontroller.

    defmt-test based test suite: source code and probe-run output

    The latest version of app-template, the easiest to get started with the knurling tools, comes with defmt-test-based test suite already set up. If you are using a previous version of app-template check out defmt-test's README for upgrade instructions.

    defmt v0.1.1 and probe-run v0.1.5 have been released

    This new release of defmt, the resource efficient logging framework for embedded devices, ships a single fix. The bug that was fixed probably only affected a small number of new users but we considered that high priority so we quickly released a new patch version to fix the issue.

    The new version of probe-run – a tool for running, testing and debugging Rust firmware that integrates into your Cargo workflow – brings some fixes and as well as some improvements.

    More details about the fixes and improvements can be found below.

    Improvements

    probe-run

    • #106 probe-run now reports the program size
    $ cargo run --bin hello
      (HOST) INFO  flashing program (7.64 KiB)
      (HOST) INFO  success!
    ───────────────────────────────────────────
    0.000000 INFO  Hello, world!
    
    • #105 probe-run's --defmt flag is now optional. probe-run will auto-detect the use of the defmt crate so the flag is no longer needed.

    app-template

    • #29 app-template now ships a test suite set up to use the defmt-test test harness

    Fixes

    probe-run

    • #259 building the crates.io version of probe-run no longer depends on the git command line tool (fixed #256)
    • #264 probe-run doesn't panic if log message is not UTF-8

    defmt

    • #259 building the crates.io version of defmt no longer depends on the git command line tool

    app-template

    • #28 instances app-template no longer includes funding information about knurling

    Internal improvements

    defmt

    Did you know we store JSON in the ELF file produced by rustc? This JSON doesn't end up in you microcontroller Flash but our tooling relies on it to decode log messages sent by the microcontroller.

    Sponsor this work

    Knurling 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!