Question
Problem with printf on F0
Posted on March 07, 2013 at 20:21
Hello, I have project in Keil for demonstrating USART on STM32F0.
Program is working fine with putc, but with printf it isn´t working (building of program finish success in both case). Why printf isn´t work? My main.c is here:#include ''stm32f0xx.h''
#include ''periph_init.h''#include <stdio.h>int fputc(int ch, FILE *f) { USART_SendData(USART1, (uint8_t) ch); while (USART_GetFlagStatus(USART1, USART_FLAG_TXE) == RESET) {} return ch;} int main(void){ periph_init (); printf(''print''); while (1); }