Enable traces on Serial Wire Output #debugging


David K
 

Hi, I am just getting started with Zephyr and currently working on a STM32F746ZE. I added a custom configuration for this board based on STM32F746G_DISCO. After having run successfully the blinky example, I am now trying to have traces on SWO (not UART), so that ultimately ITM_sendchar() would be called.

I have added in my Kconfig.defconfig:

config LOG_BACKEND_SWO_FREQ_HZ
	default 0

Following the documentation, I added in the blinky main.c:

//...
#include <logging/log.h>

void main(void)
{
    //...
    LOG_MODULE_REGISTER(toto, LOG_LEVEL_DBG);
    LOG_INF("Hello World ! %s\n", CONFIG_BOARD);
    // ...
}

I build and flash it flawlessly but I got no output on my console (using JLINK to connect and swoview). When I debug this with GDB I see that I don't go through the 2 lines I have added so I guess they are removed at compilation time.

I guess I am missing a flag/define/config somewhere (I get a little confused about where to define things in dts/kconfig/defconfig, ...), but I cannot find any example: any pointers ? Best regards

Join users@lists.zephyrproject.org to automatically receive all group messages.