PlatformIO Community

Viewing SWO output within PIO?

After hearing about SWO I’ve modified my ST Link and made the necessary code changes for it to transmit printf’s via SWO, when testing it with the ST Link Utility I successfully am presented the messages I log, however I cannot figure out how to view these from within vscode / PIO itself. Judging by how sparse information about this is its probably straight forward and I just dont see it. Help would be much appreciated, thanks in advance :slight_smile:

Partially discussed in Using SWO trace output from Atmel-ICE and STM32, libopencm3 and SWV/SWO but I’ve not yet seen information about it with PIO. The serial monitor is designed to connect to serial devices (/dev/ttyX / COMX devices). OpenOCD seems to be able to write it into a logfile (ref)… Do you know of a cross-platform tool for viewing SWO output?

I have seen those posts however those seem to be doing much more than I seemed to need to make it work. To have it work all I needed to do is switch my Debug mode to Trace Asynchronous Sw and add the couple lines of code and thats it. My ST Link has not introduced a new com port to the system nor is there anything on the mentioned port 2332 that you can find here and there.

As far as a cross platform tool goes, i dont know one no. I’m on windows so I’ve used the ST Link Utility and that works for me, unfortunately I obviously need to disconnect the debugger in vscode before i can connect with that to view the output, hence its not really a viable solution.

I’m assuming that the STM32CubeIDE might be able to view the output but I dont really know as I dont use that.