cancel
Showing results for 
Search instead for 
Did you mean: 

Printf no redirect

LBern.1
Associate

Hello, in my project I'd like to use printf for print debug messages, but if write printf("Test"), I don't see the string on the UART.

I have redirect printf:

#ifdef __GNUC__

 /* With GCC, small printf (option LD Linker->Libraries->Small printf

  set to 'Yes') calls __io_putchar() */

 int __io_putchar(int ch)

#else

 int fputc(int ch, FILE *f)

#endif /* __GNUC__ */

{

  UartWrite( UART1, (uint8_t*)&ch, 1, 0 );

  return ch;

}

The code no entry in the function fputc, why ?

Best regards

Luca

0 REPLIES 0