Skip to main content
Paul M
Associate
June 25, 2026
Question

STM32CubeIDE Correct Configuration for Virtual Debug Console

  • June 25, 2026
  • 1 reply
  • 19 views

I’m creating a project for NUCLEO-144 (STM32H563ZIT6)
and I’m using STM32CubeIDE for Build/Debug.
After reading various guides from the Web, I have still not
been able to see any Console output (trying to use printf()
and re-directing the character output with this:
 

int _write(int file, char *ptr, int len)
{
     for (int i = 0; i < len; i++)
     {
          ITM_SendChar((*ptr++));
     }
     return len;
}

 

Is there an esoteric Config in the IDE that I need to Enable (or Disable)?
Have I missed some important item in the Project Creation? (I had used STM32CubeMX)

Guidance appreciated!
Paul++

 

1 reply

Paul M
Paul MAuthor
Associate
June 25, 2026

Just a note…

My _write() function *is* getting called from within printf()
….yet, I’ve not been able to see the characters show up
in the IDE when I view the SWV ITM Data Console

Thx
Paul++

Paul++
Paul M
Paul MAuthor
Associate
June 27, 2026

Found the missing config item…

Consulting the STM32CubeMX, I found that, under Clock Configuration, the HCLK is 250.0 MHz for my project.

In STM32CubeIDE, under Run → Debug Configuration → Debugger, in the SWV section,
the “Core Clock” must be set to a matching value (250.0 MHz for my project)

Once I updated that, The characters DO now show up in the SWV ITM Data Console (Port 0)  :-)

 

Paul++