Debug console with SWO output using JLINK?
Hi,
I am using JLINK not STLINK. I can debug my projects and have added:
int io_putchar(int ch) {
ITM_SendChar(ch);
return 0;
}
which is weakly defined in syscalls.c. It’s called during debugging and ITM_SendChar shows it does try and send, ie.
if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */
((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */
{
// it get here fine...
}
But I get nothing in the console.
How to configure the GUI to output SWO serial data? I read Openocd has another port and you can telnet to it to read data? what’s the port for STM32 Work Bench? I cannot use JLink viewer utility because it expects their own build of Openocd with likely different config.
There seems to be lots of setup code around the web for the ITM like baud rate that perhaps I am missing?
I found no settings in STM32CubeMX when I created the project.
Regards