sifive / freedom-metal

Bare Metal Compatibility Library for the Freedom Platform
Other
152 stars 47 forks source link

Fix issue with gloss _write function #432

Closed nick-knight closed 2 years ago

nick-knight commented 2 years ago

_write is returning 0 instead of the expected number of characters written.

One of the consequences is that

printf("string1\nstring2\n")

will only output:

string1\n

because printf will abort after the first _write call.

This was fixed by @loiclefort on a downstream (private) fork, but that fix was apparently never upstreamed. It was reported recently in the SiFive forums: https://forums.sifive.com/t/some-freedom-studio-qemu-annoyances/5561

nick-knight commented 2 years ago

Thanks for the reviews. I don't have write access so someone else will have to finish it off. Thanks.

avernhetS5 commented 2 years ago

@loiclefort , would you mind?