Skip to main content
Graduate
November 21, 2025
Solved

printf over SWO with STLink GDB in launch.json

  • November 21, 2025
  • 1 reply
  • 196 views

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!

    This topic has been closed for replies.
    Best answer by vincent_grenet

    @gjepali 

    Unfortunately, tracing features are not supported at the moment. They are part of our roadmap.

    1 reply

    ST Employee
    November 22, 2025

    @gjepali 

    Unfortunately, tracing features are not supported at the moment. They are part of our roadmap.