Loading...
 
Skip to main content

System Workbench for STM32


Strange behaviour of SWD in atollic stm32 nucleo

Hi adi,

Lookng at your screenshot it seems that you dont have very many events happening from an SWV point of view. Just ITM0, DWT0 and time stamps. From where is the variable "value" written? Is it possible that this is done very frequently from some interrupt not visible in your code snippet above?
What I am asking is if you see that you get a lot of overflows? You can see the overflow count in the view called "SWV Trace log", down left corner if I am not mistaken.

Could you also show us how your printf looks? Maybe Atollic run-time libraries differ from VisualStudio. In TrueSTUDIO you will need to bring in "tiny_printf.c" this function calls "_write" function. "_write" stub is available in the file called "syscalls.c". You need this one too, and there you need to instrument _write to call ITM_SendChar. Before that is done "printf" is not directed to ITM0.
These two c-files can be added to your project by File - New - Other - filter for the "syscalls" or "printf". Put them in src folder.

Does that solve the problem?

 
Collapse/expand modules below