- This topic has 1 reply, 1 voice, and was last updated 6 years, 2 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Forums › Mastering STM32 book support forum › SWV Tracing with OpenOCD
Hi, this isn’t actually a question, but I didn’t know where else to put this.
In section 24.4.2, it’s mentioned that OpenOCD is able to read data from the SWO pin, but it isn’t able to parse or display the stream. I thought that was a real shame and decided to take it upon myself to fix that. I’ve written a python script that communicates with OpenOCD through the Tcl sever. It pulls in the raw bytestream from SWO pin, parses it out into the various channels, and sends it back through the Tcl server to display on the GDB console.
It’s a bit of a hackey solution, but I think it works pretty well, and I tried to make it highly configurable. I’ve licensed it under the WTFPL version 2, so feel free to do whatever you want with it. You can find more information on the github page for how to configure OpenOCD to work with it. I don’t want to post a link, because I don’t want to be mistaken for a spam bot (since this is my first post on the forum). But if you search “SWO-Parser” on github, it should come up (the author is robertlong13). My script and OpenOCD settings have worked well on my nucleo-f767zi with the built-in STLink, but I haven’t tested it out on anything else yet.
Thank you so much for this book Carmine. It has been extremely valuable to me. I don’t think I could have gotten off the ground without your thorough explanations and examples.
Here’s the github link: https://github.com/robertlong13/SWO-Parser