#defmt #log-messages #logging-framework #knurling #defmt-transport #setup

no-std defmt-rtt

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

7 unstable releases

0.4.1 May 13, 2024
0.4.0 Oct 6, 2022
0.3.2 Mar 10, 2022
0.3.1 Nov 26, 2021
0.1.0 Nov 11, 2020

#140 in Embedded development

Download history 3357/week @ 2024-02-15 4428/week @ 2024-02-22 4330/week @ 2024-02-29 4609/week @ 2024-03-07 4301/week @ 2024-03-14 4221/week @ 2024-03-21 3913/week @ 2024-03-28 4865/week @ 2024-04-04 4998/week @ 2024-04-11 5332/week @ 2024-04-18 5330/week @ 2024-04-25 4671/week @ 2024-05-02 4707/week @ 2024-05-09 5116/week @ 2024-05-16 5917/week @ 2024-05-23 4466/week @ 2024-05-30

20,816 downloads per month
Used in 49 crates


1.5K SLoC


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

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

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

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

Memory use

When in a tight memory situation and logging over RTT, the buffer size (default: 1024 bytes) can be configured with the DEFMT_RTT_BUFFER_SIZE environment variable. Use a power of 2 for best performance.


defmt-rtt 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.


Licensed under either of

at your option.


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.


~23K SLoC