Content originally posted in LPCWare by kwgilpin on Fri Jan 13 16:58:54 MST 2012
Is there a way, based on a file descriptor, to direct the output of fprintf to either the debugger or the UART. For example, using a file descriptor of 1, I'd like fprintf output to be displayed in the debug terminal. Using a file descriptor > 2, I'd like fprintf output to be sent to the UART.
When I retarget printf to the UART using my own __sys_write(), I lose the ability to send debugging info to the debug console. I want to avoid this.
Thanks,
Kyle