cancel
Showing results for 
Search instead for 
Did you mean: 

printf over SWO with STLink GDB in launch.json

gjepali
Associate II

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!

1 ACCEPTED SOLUTION

Accepted Solutions
vincent_grenet
ST Employee

@gjepali 

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

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
vincent_grenet
ST Employee

@gjepali 

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

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.