cancel
Showing results for 
Search instead for 
Did you mean: 

How to set up printf debug output using SWO and STM32CubeIDE SWV Data Trace

MKeff
Associate

Hi, I am evaluating the new STM32CubeIDE (V1.0.1) and trying to use Live Expressions and SWV Data Trace with the STM32F469 Discovery board but neither of the features seem to be work. I am simply toggling an LED and using HAL_GPIO_ReadPin to set a variable which I can then view, which should change with the LED.

In the CubeMX part I have enabled "Trace Asynchronous Sw" so PB3 is allocated. PA13 and PA14 are also allocated. I followed this guide to add a function to direct the printf output and then capture the stream on the IDE side but nothing appears in the SWV Data Trace window; https://ralimtek.com/stm32_debugging/

SWV is enabled, clock is set to 16 MHz, port number is set to 61235, wait for sync packet is ticked.

In the SWV Data Trace window and when in debug, paused, I enabled ITM Stimulus port 0. I then press the record button and resume debug but no data appears in the SWV Data Trace window.

Hope somebody can help with this as the new IDE does look interesting.

1 REPLY 1
davidpoh
Associate II

HI STM,

I have similar issues. Please help. I bought STM32F469 DISCOVERY for 3 months, but still unable to do the SWV, watched many videos online, but seems like it does not work in STM32F469. Please advise.