embedded-trainings-2020/beginner/apps/.vscode/launch.json
Jonathan Pallant (Ferrous Systems) 4caf1a83e8 Emit RTT logs to a file.
Then defmt-print can read them.
2023-01-26 18:53:42 +00:00

39 lines
1.1 KiB
JSON

{
"version": "0.2.0",
"configurations": [
{
"cwd": "${workspaceRoot}",
// TODO to debug a different program the app name ("hello") needs to be changed
"executable": "./target/thumbv7em-none-eabihf/debug/hello",
"name": "Debug Microcontroller (launch)",
"request": "launch",
"preLaunchTask": "Build Rust (Debug)",
"type": "cortex-debug",
"runToEntryPoint": "main",
"configFiles": [
"interface/jlink.cfg",
],
"servertype": "openocd",
"openOCDLaunchCommands": [
"transport select swd",
"source [find target/nrf52.cfg]"
],
"rttConfig": {
"enabled": true,
"address": "auto",
"decoders": [
{
"port": 0,
"type": "console",
"label": "Defmt RTT",
// 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
}
]
}
}
]
}