Georg-Johann Lay
2018-03-10 10:52:17 UTC
Hi,
I am trying to use fwrite() to write the first X bytes of a string like
auto ret = fwrite("Hello World!", 1, 5, stdout);
printf("%d\n", ret);
// Output: H0
https://www.nongnu.org/avr-libc/user-manual/group__avr__stdio.html#gadd5777719a41713629a62b68c239a774
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
~Nico
How did you setup stdout? Using FDEV_SETUP_STREAM?I am trying to use fwrite() to write the first X bytes of a string like
auto ret = fwrite("Hello World!", 1, 5, stdout);
printf("%d\n", ret);
// Output: H0
https://www.nongnu.org/avr-libc/user-manual/group__avr__stdio.html#gadd5777719a41713629a62b68c239a774
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
~Nico
https://www.nongnu.org/avr-libc/user-manual/group__avr__stdio.html#gaea2b6be92ead4673bc487b271b7227fb
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.
Johann