Some time ago I wrote the syscalls.c file with all functions to use malloc and printf from newlib, and everything worked.
Now I’m trying to use getchar() from newlib, and so I implemented _read_r, the low level function required by getchar(), but it does not work.
It seems that all functions related to stream reading do not work: getchar, getc, scanf, gets, fgets…
getchar() always return 0xff, I traced the function calls, and looks like it calls __srget_r() that calls __srefill_r(), and then returns… it doesn’t even call _read_r :?
Someone got getchar() working? any advice? Am I missing some initialization step?