Crate defmt_semihosting

Source
Expand description

defmt global logger over semihosting

WARNING using semihosting’s println! macro or Stdout API will corrupt defmt log frames so don’t use those APIs.

§Critical section implementation

This crate uses critical-section to ensure only one thread is writing to the buffer at a time. You must import a crate that provides a critical-section implementation suitable for the current target. See the critical-section README for details.

For example, for single-core privileged-mode Cortex-M targets, you can add the following to your Cargo.toml.

[dependencies]
cortex-m = { version = "0.7.6", features = ["critical-section-single-core"]}