Question
Error when use printf UART
hi everyone
use printf in UART, i add in file main.c
#include <stdio.h>
//--------------
#ifdef __GNUC__
#define PUTCHAR_PROTOTYPE int __io_putchar(int ch)
#else
#define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)
#endif
//------------
PUTCHAR_PROTOTYPE
{
HAL_UART_Transmit(&huart1, (uint8_t *)&ch, 1, HAL_MAX_DELAY);
return ch;
}
when reset device stm32 and printf uart doesn't work on serial
but when i debug printf work