[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] fwrite() not working as expected

From: Georg-Johann Lay
Subject: Re: [avr-libc-dev] fwrite() not working as expected
Date: Sat, 10 Mar 2018 11:52:17 +0100
User-agent: Thunderbird (Windows/20100228)

address@hidden schrieb:
I am trying to use fwrite() to write the first X bytes of a string like
this, but with a wrong output:

auto ret = fwrite("Hello World!", 1, 5, stdout);
printf("%d\n", ret);
// Output: H0

Its documented here:

Can anyone please tell me if this is a bug or if I am doing something
wrong. I am using avr-libc 2.0.0 on Arch Linux with the latest avr-gcc 7.3.0


How did you setup stdout? Using FDEV_SETUP_STREAM?

Are you sure the communication / output routines passed to stdout are correct and I/O correctly set up? Including host I/O, given you use it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]