Skip to content
Snippets Groups Projects
Commit 111fa3d7 authored by Per Lindgren's avatar Per Lindgren
Browse files

openocd.gdb comment fixed and ext itm launch config added

parent 8906f26e
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,7 @@
"target/stm32f4x.cfg"
],
"postLaunchCommands": [
// sets a breakpoint at the HardFault (won't show in `vscode`, but `gdb` will break)
"b HardFault"
],
"cwd": "${workspaceRoot}"
......@@ -96,6 +97,33 @@
},
"cwd": "${workspaceRoot}"
},
// launch configuration for using an external itm viewer
// $ tail -f /tmp/itm.log
// or, prior to launching the bebug session
// $ mkfifo /tmp/itm.log
// $ itmdump -f /tmp/itm.log -F
{
"type": "cortex-debug",
"request": "launch",
"servertype": "openocd",
"name": "itm 16Mhz /tmp/itm.log (debug)",
"preLaunchTask": "cargo build --example itm",
"executable": "./target/thumbv7em-none-eabihf/debug/examples/itm",
// uses local config files
"configFiles": [
"./stlink.cfg",
"./stm32f4x.cfg"
],
"postLaunchCommands": [
// sets the core clock to 16000000 (see ./stm32f4x.cfg)
"monitor reset init",
// 16000000 must match the core clock frequency
"monitor tpiu config internal /tmp/itm.log uart off 16000000",
// enable ITM port 0
"monitor itm port 0 on"
],
"cwd": "${workspaceRoot}"
},
{
"type": "cortex-debug",
"request": "launch",
......
......@@ -23,7 +23,7 @@ monitor tpiu config internal /tmp/itm.log uart off 16000000
# 2000000 is the frequency of the SWO pin
# monitor tpiu config external uart off 8000000 2000000
# # enable ITM port 0
# enable ITM port 0
monitor itm port 0 on
load
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment