add: enable SWO output in VSCode with cortex-debug

This commit is contained in:
Kilian Bracher 2025-03-04 17:22:46 +01:00
parent 6329859d31
commit 76a358207d
2 changed files with 62 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/.vscode/
/.vscode/*
/build/
/.cache/
/.idea/
@ -8,3 +8,4 @@ compile_commands.json
STM32Make.make
openocd.cfg
.stm32env
!/.vscode/launch.json

60
AMS_Master_Code/.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,60 @@
{
"configurations": [
{
"showDevDebugOutput": "none",
"cwd": "${workspaceRoot}",
"executable": "./build/debug/AMS_Master_Nucleo.elf",
"name": "Debug STM32",
"request": "launch",
"type": "cortex-debug",
"servertype": "openocd",
"preLaunchTask": "Build STM",
"device": "stm32h7a3xxq.s",
"configFiles": [
"openocd.cfg"
],
"swoConfig": {
"enabled": true,
"source": "probe",
"swoFrequency": 10666666,
"cpuFrequency": 64000000,
"decoders": [
{
"port": 0,
"type": "console",
"label": "SWO LOG",
"encoding": "ascii"
}
]
}
},
{
"showDevDebugOutput": "none",
"cwd": "${workspaceRoot}",
"executable": "./build/debug/AMS_Master_Nucleo.elf",
"name": "Attach STM32",
"request": "attach",
"type": "cortex-debug",
"servertype": "openocd",
"preLaunchTask": "Build STM",
"device": "stm32h7a3xxq.s",
"configFiles": [
"openocd.cfg"
],
"swoConfig": {
"enabled": true,
"source": "probe",
"swoFrequency": 10666666,
"cpuFrequency": 64000000,
"decoders": [
{
"port": 0,
"type": "console",
"label": "SWO LOG",
"encoding": "ascii"
}
]
}
}
]
}