Serial out in _write_r syscalls.c wrapper
Posted: Sun Nov 22, 2026 2:02 pm
Just wondering, why was the bit of code:
removed from syscalls.c when it was refactored to newlib wrappers? I found it useful when debugging libraries (like lwip) that insist on logging to stdout. Obviously I can wrap it myself, just curious.
Code: Select all
#if defined(STDOUT_SD)
if (file != 1) {
__errno_r(r) = EINVAL;
return -1;
}
sdWrite(&STDOUT_SD, (uint8_t *)ptr, (size_t)len);
#endif