You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
"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/panic",
"name": "Debug Microcontroller (launch)",
"request": "launch",
"preLaunchTask": "rust: cargo build",
"type": "cortex-debug",
"runToMain": true,
"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",
"logfile": "${workspaceRoot}/rtt.log",
"noprompt": true
}
]
}
}
]
}
Once the debugger has started, parse the log file with defmt-print:
$ tail -F rtt.log | defmt-print -e ./target/thumbv7em-none-eabihf/debug/panicERROR This is the panic program.└─ panic::__cortex_m_rt_main @ src/bin/panic.rs:19ERROR Oh no! PanicInfo { payload: Any { .. }, message: Some(index out of bounds: the len is 3 but the index is 3), location: Location { file: "src/bin/panic.rs", line: 38, col: 13 }, can_unwind: true }└─ panic::panic @ src/bin/panic.rs:11
rust-analyser now expands the
#[entry]
, decides that it doesn't result in afn main()
and therefore doesn't offer the run button anymore.We need to remove references to the run button from the training.
You seem to have two options:
probe-run
on the console where you can see the defmt log but you can't single step.The text was updated successfully, but these errors were encountered: