-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
379 additions
and
47 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# defmt | ||
|
||
RIOT-rs supports [defmt] on all platforms. | ||
To enable it, enable the laze module `defmt`, either on the laze command line or | ||
in a laze file. Don't forget to set the `DEFMT_LOG` variable, it defaults to `error`. | ||
See the [defmt documentation] for general info on `defmt`. | ||
|
||
Example: | ||
|
||
```shell | ||
# DEFMT_LOG=info laze -C examples/hello-world-async --board nrf52840dk --select defmt run | ||
``` | ||
|
||
Then within Rust code, import `riot_rs::debug::log` items, then use `defmt` log | ||
macros [as usual][defmt-macros]: | ||
|
||
```rust | ||
use riot_rs::debug::log::*; | ||
|
||
#[riot_rs::task(autostart)] | ||
async fn main() { | ||
info!("Hello!"); | ||
} | ||
``` | ||
|
||
If the `defmt` laze module is not selected, all log statements become no-ops. | ||
|
||
Note: On Cortex-M devices, the order of `riot_rs::debug::println!()` output and | ||
`defmt` log output is not deterministic. | ||
|
||
[defmt]: https://github.com/knurling-rs/defmt | ||
[defmt documentation]: https://defmt.ferrous-systems.com/ | ||
[defmt-macros]: https://defmt.ferrous-systems.com/macros |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Tooling | ||
|
||
This chapter contains documentation on tooling that RIOT-rs provides or integrates. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters