mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2024-05-02 08:39:10 +00:00
Emit RTT logs to a file.
Then defmt-print can read them.
This commit is contained in:
parent
edbf34cf00
commit
4caf1a83e8
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,6 +1,6 @@
|
||||||
target/
|
target/
|
||||||
book/
|
book/
|
||||||
Cargo.lock
|
Cargo.lock
|
||||||
|
rtt.log
|
||||||
.vscode/
|
.vscode/
|
||||||
*.DS_Store
|
*.DS_Store
|
||||||
|
|
25
beginner/apps/.vscode/launch.json
vendored
25
beginner/apps/.vscode/launch.json
vendored
|
@ -18,16 +18,21 @@
|
||||||
"transport select swd",
|
"transport select swd",
|
||||||
"source [find target/nrf52.cfg]"
|
"source [find target/nrf52.cfg]"
|
||||||
],
|
],
|
||||||
// commands only supported in OpenOCD 0.11.0; also due to how the `rtt-target` crate works
|
"rttConfig": {
|
||||||
// these commands need to run _after_ the target executes the `rtt_init` macro so running
|
"enabled": true,
|
||||||
// these commands when the device is halted on `main` will fail
|
"address": "auto",
|
||||||
// "postLaunchCommands": [
|
"decoders": [
|
||||||
// // FIXME(?) to work with a newer version (>0.3.7) of the cortex-debug extension the
|
{
|
||||||
// // escaped backslashes (`\\`) may need to be removed
|
"port": 0,
|
||||||
// "monitor rtt setup 0x20000000 262144 \\\"SEGGER RTT\\\"",
|
"type": "console",
|
||||||
// "monitor rtt start",
|
"label": "Defmt RTT",
|
||||||
// "monitor rtt server start 8765 0",
|
// You can parse this log file with
|
||||||
// ],
|
// tail -F rtt.log | defmt-print -e ./target/thumbv7em-none-eabihf/debug/led
|
||||||
|
"logfile": "${workspaceRoot}/rtt.log",
|
||||||
|
"noprompt": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue