mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-20 00:36:01 -04:00
5da66d1d39
When CONFIG_VFS_SUPPORT_IO is disabled, _read_r and _write_r implementations in syscalls.c are used to provide console I/O via esp_rom_uart_tx_one_char/esp_rom_uart_rx_one_char. When newlib opens a (FILE*) stream, it calls fstat to check if the underlying file is character-oriented. In this case, it configures the stream to use line buffering. Otherwise (or if fstat fails) the stream is opened as block buffered. Since fstat wasn't provided, stdin/stdout/stderr streams got opened in block buffered mode. For console, we need line buffered output so that the stream buffer is flushed each time a complete line (ending with '\n') is sent to stdout or stderr. Fix by implementing _fstat_r stub, setting st->st_mdoe=S_IFCHR. |
||
---|---|---|
.. | ||
platform_include | ||
port | ||
priv_include | ||
test | ||
test_apps | ||
.gitignore | ||
.gitmodules | ||
abort.c | ||
assert.c | ||
CMakeLists.txt | ||
component.mk | ||
COPYING.NEWLIB | ||
esp32-spiram-rom-functions-c.lf | ||
heap.c | ||
Kconfig | ||
locks.c | ||
Makefile.old | ||
newlib_init.c | ||
newlib.lf | ||
poll.c | ||
pthread.c | ||
random.c | ||
reent_init.c | ||
stdatomic.c | ||
syscalls.c | ||
system_libs.lf | ||
termios.c | ||
time.c |