Skip to content
forked from knurling-rs/defmt

Efficient, deferred formatting for logging on embedded systems

License

Notifications You must be signed in to change notification settings

wetheredge/defmt

This branch is 89 commits behind knurling-rs/defmt:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7e99b89 · Jul 29, 2024
Feb 11, 2021
Jun 12, 2024
Oct 27, 2021
Jul 11, 2024
Jul 11, 2024
Jul 29, 2024
Jul 11, 2024
Jun 1, 2024
Jul 11, 2024
Jun 25, 2024
May 13, 2024
May 16, 2024
Jul 28, 2020
Jul 29, 2024
Mar 25, 2024
Aug 21, 2020
Aug 21, 2020
Mar 22, 2022
Jun 10, 2024

Repository files navigation

defmt

defmt ("de format", short for "deferred formatting") is a highly efficient logging framework that targets resource-constrained devices, like microcontrollers.

For more details about the framework check the book at https://defmt.ferrous-systems.com.

The git version of the defmt book can be viewed at https://defmt-next.ferrous-systems.com/.

Setup

New project

The fastest way to get started with defmt is to use our app-template to set up a new Cortex-M embedded project.

Existing project

To include defmt in your existing project, follow our Application Setup guide.

MSRV

defmt always compiles on the latest stable rust release. This is enforced by our CI building and testing against this version.

It still might work on older rust versions, but this isn't ensured.

defmt ecosystem

The following diagram illustrates the user-facing and internal crates of the defmt framework.

defmt crates structure

Developer Information

Running Tests

Tests are run using cargo xtask -- although this is simply an alias (defined in .cargo/config.toml) for cargo run --package xtask --.

To see a list of options, see xtask/src/main.rs, or run:

$ cargo xtask help

For example, to run all the tests, run:

$ cargo xtask test-all

You will need qemu-system-arm installed and in your $PATH for some of the tests (e.g. test-snapshot).

Support

defmt is part of the Knurling project, Ferrous Systems' effort at improving tooling used to develop for embedded systems.

If you think that our work is useful, consider sponsoring it via GitHub Sponsors.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.

About

Efficient, deferred formatting for logging on embedded systems

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%