question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SWO ITM monitoring issue.

See original GitHub issue

Hi , I build my .elf target by following Makefile. I monitor the ITM0 on my VSCODE and I receive nothing. [ using STLINK and OPENOCD] please make a clear tutorial on how to config the extension for on STM32 / openocd to view the graph or have an SWO terminal . here is my Launch.json configuration:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name":"Cortex Debug",
            "preLaunchTask": "Flash", 
            "preLaunchCommands": ["monitor arm semihosting enable"],
            "cwd": "${workspaceRoot}",
            "executable": "./build/RTK-DW1000.elf",
            "request": "launch",
            "type": "cortex-debug",
            "servertype": "openocd",
            "device": "STM32F103C8",
            "configFiles": [
                "interface/stlink.cfg",
                "target/stm32f1x.cfg"
            ],
            "svdFile": "./STM32F103.svd",
            "interface": "swd",
            "swoConfig":{
                "enabled":true,
                "source":"probe",
                "swoFrequency": 2000000,
                "cpuFrequency":72000000,
                "decoders": [
                    {
                        "port": 0,
                        "type": "console",
                        "label": "SWO output",
                        "encoding":"ascii"
                    }
                ]
            }
                
        }
    ]
}

Thanks

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:22

github_iconTop GitHub Comments

1reaction
haneefdmcommented, Dec 22, 2021

Yes, your printf’s will work just fine. You can even do getc() if you want.

0reactions
haneefdmcommented, Jan 4, 2022

You can try the new preview version of SWO support. It is available as a pre-release from the Market place.

You can customize how SWO works as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problems and workarounds - IBM
See the IBM Tivoli Monitoring Troubleshooting Guide for general troubleshooting ... This section provides tables that show solutions for installation, ...
Read more >
Problem with SWO when debugger not connected
Hi, I have configured my M4 based CC3200 from TI to output printf via ITM (all uarts used). Works great as long as...
Read more >
Topic: STM32 ITM / SWO [solved] - Sysprogs
Hi there, in the last days I try to output debug strings via SWO using the ITM. Following the Tutorial https://visualgdb.com/tutorials/arm/itm/ ...
Read more >
AN13234 - How to Enable SWO Trace for i.MX RT10xx Series
describes the steps for using the basic SWO trace feature (ITM debug output) ... to measure code execution time, to monitor the interrupt...
Read more >
SAM ITM/SWO Trace - Online Docs
ITM (Instrumentation Trace Macrocell) trace outputs UART-format data using the Serial Wire Output (SWO). Not all SAM devices have ITM trace.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found