cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 MotorControl Workbench Printf debug message

kaps
Associate II

Hello STM32 Community,

I am currently working with the STM32 MotorControl Workbench framework, specifically using the EVSPIN32G4 demo board. For development, I'm utilizing the STM32CubeMX and STM32CubeIDE tools.

My issue lies with debugging. I'm attempting to use printf statements for debugging purposes through the ITM (Instrumentation Trace Macrocell) debugger interface. However, this is not working as expected. The printf messages are not being displayed.

I'm wondering if anyone can shed light on why this might be happening. Are there specific settings or configurations within STM32CubeMX or STM32CubeIDE that I need to adjust to enable ITM debugging correctly?

Additionally, I'm open to suggestions for alternative methods to output debug messages effectively in this setup. Any insights or experiences shared would be greatly appreciated!

Thank you in advance for your help and support.

Best regards,

 

int _write(int file, char *ptr, int len)
{
  (void)file;
  int DataIdx;

  for (DataIdx = 0; DataIdx < len; DataIdx++)
  {
    ITM_SendChar(*ptr++);
  }
  return len;
}
10 REPLIES 10
Pavel A.
Evangelist III

The point after setting the core clock is after line 23: SystemClock_Config()