cancel
Showing results for 
Search instead for 
Did you mean: 

Capturing SWV data stream from GDB

CTapp.1
Senior

I've got SWV output showing within the STM32CubeIDE. I would now like to be able to capture this output from the command line using gdb. Is there any documentation on how to activate the SWV in gdb?

I've tried using:

 

monitor swo enable 4500000 decode 0

 

But that just gets "Protocol error with Rcmd".

1 ACCEPTED SOLUTION

Accepted Solutions
CTapp.1
Senior

Finally worked out that the SWV is streamed over IP from the GDB Server, and I needed to add some options to it's command line to enable it. Something like:

--swo-port 2332 --cpu-clock 150000000 --swo-clock-div 75

 Then a bit of Python to capture the stream - though I've not yet found any documentation that explains the data format.

View solution in original post

1 REPLY 1
CTapp.1
Senior

Finally worked out that the SWV is streamed over IP from the GDB Server, and I needed to add some options to it's command line to enable it. Something like:

--swo-port 2332 --cpu-clock 150000000 --swo-clock-div 75

 Then a bit of Python to capture the stream - though I've not yet found any documentation that explains the data format.