cancel
Showing results for 
Search instead for 
Did you mean: 

printf is not working. Uart is working. What can be a reason?

VadymS
Associate II

I took the "Examples\UART\UART_Printf" as reference and added the EmbOS. Printf worded with embOS.

In some steep, after project clean or some project changes, the printf stopped to work.

Uart works.

I use STM32CubeIDE.

What can be a reason?

1 ACCEPTED SOLUTION

Accepted Solutions

Hello

define fputc function like this

int fputc (int ch, FILE * stream)

{

   HAL_UART_Transmit(&huart1,(unsigned char*)&ch,1,100);

   return ch;

}

This is also an good article about semihosting in CubeIde

View solution in original post

1 REPLY 1

Hello

define fputc function like this

int fputc (int ch, FILE * stream)

{

   HAL_UART_Transmit(&huart1,(unsigned char*)&ch,1,100);

   return ch;

}

This is also an good article about semihosting in CubeIde