void uart_putchar(char c, FILE *stream)
{
 if (c == '\n')
uart_putchar('\r', stream);
 loop_until_bit_is_set(UCSRA, UDRE);
 UDR = c;
 return ;
}

I suspect it's because your returning a void instead of an int,

Here is some code that I used to test stdio on avrlibc ( atmega128 )

which compiles fine with gcc 5.4.0


static int uart_putchar(char c, FILE *stream)
{
    if (c == '\n')
        uart_putchar('\r', stream);
    loop_until_bit_is_set(UCSR0A, UDRE);
    UDR0 = c;
    return 0;
}




Cheers

Colin



Reply via email to