getchar not working
I have a STM32L4R5 STM32CubeIde project using FreeRTOS.
I have implemented _read(), _write() etc. to use UART for I/O.
printf() is working fine.
I can read characters from stdin using read(0, &mychar, 1) but getchar() does not work.
I've traced through getchar() execution and found that it is only calling _read() the first time it is called when it is doing a bunch of initialization.
On subsequent calls __sresill_r() is not calling _read().
I tried making stdin unbufferd by calling setvbuf(stdin, NULL, _IONBF, 0) before getchar(). Didn't change anything.
Any suggestions on how to fix this?
If not can I get the library source and project that builds it.
Randy
