Serial out in _write_r syscalls.c wrapper

Discussions and support about ChibiOS/RT, the free embedded RTOS.
Post Reply
dflogeras
Posts: 235
Joined: Tue Sep 03, 2013 8:16 pm
Has thanked: 8 times
Been thanked: 22 times

Serial out in _write_r syscalls.c wrapper

Post by dflogeras »

Just wondering, why was the bit of code:

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
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.
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Serial out in _write_r syscalls.c wrapper

Post by Giovanni »

Hi,

Better create your debug syscalls.c, the system one has become more complex because integration with VFS and sandboxes.

Giovanni
Post Reply