defmt
defmt copied to clipboard
Efficient, deferred formatting for logging on embedded systems
For example: ``` console ERROR: Format string error detected. HELP: `defmt` uses a slightly different syntax than regular formatting in Rust. See https://defmt.ferrous-systems.com/macros.html for more details. ```
Currently, the symbol name includes the Cargo package, the defmt tag and data, and the "disambiguator", which is a crate-unique identifier. However, a Cargo package can contain many crates, so...
the error says to install **probe-run** instead of `defmt-print`
## Use case You want to derive `Format` an a struct that contains fields whose types don't implement the `Format` trait *but* can be easily mapped to a type that...
https://user-images.githubusercontent.com/853158/123317587-cd36e380-d4f3-11eb-938c-1e478464a0fb.mp4 I've hacked together function tracing for a private project which works surprisingly well. I think it's something that we could support with a reasonable amount of effort. I'll describe...
Currently it is possible to pad your numbers with leading zeroes, like following: ```rust defmt::info!("{=u16:08X}", 42); defmt::info!("{:08}", 42); ``` ``` 0 INFO 0x00002A └─ hello::__cortex_m_rt_main @ src/bin/hello.rs:8 1 INFO 00000042...
As mentioned in #168, it would be awesome to have some functions along the lines of `start_of_frame` and `end_or_frame`, to allow implementing stuff like CRC and framing (eg. COBS). I...
This crate has en example [build script](https://github.com/japaric/cautious-octo-funicular/blob/v0.1.5/build.rs) that puts the mdbook in the `target/doc` directory. [The rendered API docs](https://docs.rs/cautious-octo-funicular/0.1.5/cautious_octo_funicular/) contain an mdbook that looks like this ...
this works: you get defmt logs from `probe-run` ``` rust defmt::info!("Hello, world!"); cortex_m::asm::delay(10_000_000); cortex_m::peripheral::SCB::sys_reset() ``` this does not, however: `probe-run` prints nothing ``` rust cortex_m::asm::delay(10_000_000); defmt::info!("Hello, world!"); cortex_m::peripheral::SCB::sys_reset() ``` if...
context: - one test file maps to one firmware image - one of the main use cases of having several test files is that you can entirely reconfigure the HW...