mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2025-01-10 16:25:37 +00:00
correct logging
This commit is contained in:
parent
1449e1a019
commit
74bdeb3665
3 changed files with 9 additions and 16 deletions
|
@ -34,12 +34,11 @@ opt-level = 3
|
||||||
overflow-checks = false
|
overflow-checks = false
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
# set defmt logging levels here
|
|
||||||
default = [
|
|
||||||
"defmt-default",
|
|
||||||
# "dependency-a/defmt-trace",
|
|
||||||
]
|
|
||||||
|
|
||||||
|
default = [
|
||||||
|
"other-feature"
|
||||||
|
]
|
||||||
|
other-feature = []
|
||||||
# do NOT modify these features
|
# do NOT modify these features
|
||||||
defmt-default = []
|
defmt-default = []
|
||||||
defmt-trace = []
|
defmt-trace = []
|
||||||
|
|
|
@ -18,11 +18,10 @@ defmt-rtt = "0.3.1"
|
||||||
advanced = []
|
advanced = []
|
||||||
beginner = []
|
beginner = []
|
||||||
|
|
||||||
# set defmt logging levels here
|
|
||||||
default = [
|
default = [
|
||||||
"defmt-info",
|
"other-feature"
|
||||||
# "dependency-a/defmt-trace",
|
|
||||||
]
|
]
|
||||||
|
other-feature = []
|
||||||
|
|
||||||
# do NOT modify these features
|
# do NOT modify these features
|
||||||
defmt-default = []
|
defmt-default = []
|
||||||
|
|
|
@ -28,15 +28,10 @@ $ cargo doc -p dk --open
|
||||||
|
|
||||||
✅ Check the API docs of the `Led` abstraction. Change the `led` program, so that the bottom two LEDs are turned on, and the top two are turned off.
|
✅ Check the API docs of the `Led` abstraction. Change the `led` program, so that the bottom two LEDs are turned on, and the top two are turned off.
|
||||||
|
|
||||||
🔎 If you want to see logs from Led API of the `dk` Hardware Abstraction Layer, go to `boards/dk/Cargo.toml` and change the log level of the `dk` crate:
|
🔎 If you want to see logs from Led API of the `dk` Hardware Abstraction Layer, flash the dk with the following environment variable:
|
||||||
|
|
||||||
```diff
|
```console
|
||||||
# set defmt logging levels here
|
$ DEFMT_LOG=trace cargo run --bin led
|
||||||
default = [
|
|
||||||
- "defmt-debug",
|
|
||||||
+ "defmt-trace",
|
|
||||||
# "dependency-a/defmt-trace",
|
|
||||||
]
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Among the logs you'll find the line "I/O pins have been configured for digital output". At this point the electrical pins of the nRF52840 microcontroller have been configured to drive the 4 LEDs on the board.
|
Among the logs you'll find the line "I/O pins have been configured for digital output". At this point the electrical pins of the nRF52840 microcontroller have been configured to drive the 4 LEDs on the board.
|
||||||
|
|
Loading…
Reference in a new issue