2025-11-21 12:10 AM
Hi,
I'm trying to set launch.json to use SWO. I can do it with cortex-debug, but what about the stlinkgdbtarget?
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "stlinkgdbtarget",
"request": "launch",
"name": "STM32Cube: STM32 Launch ST-Link GDB Server",
"origin": "snippet",
"cwd": "${workspaceFolder}",
"preBuild": "${command:st-stm32-ide-debug-launch.build}",
"runEntry": "main",
"imagesAndSymbols": [
{
"imageFileName": "${command:st-stm32-ide-debug-launch.get-projects-binary-from-context1}"
}
],
"swoConfig": {
"enabled": true,
"cpuFrequency": 170000000,
"swoFrequency": 2000000,
"source": "probe",
"decoders": [
{
"label": "ITM Port 0",
"type": "console",
"port": 0,
"encoding": "ascii"
}
]
},
}
]
}
But it shows syntax error:
"Property swoConfig is not allowed."
because this is defined for cortex-debug (OpenOCD debugger), not for stlinkgdbtarget. I have no problem with OpenOCD, but starm-clang should be all in one solution and it's more elegant to use.
Does stlinkgdbtarget have configuration to listen SWO?
Thanks!