This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C TivaWare: UART stdio limited to UART0, 1 and 2?

Hello,

In TivaWare there is support for C stdio output via UART (uartstdio.c). But the implementation only supports UART0, 1 or 2. What is the reason for limiting the supported UARTs? Can UART6 be supported as well, if the source code is changed?

Thanks,
  Robert

  • This come from Unix/C/C++ languages - stdio.h defines them for standard streams: stdinstdout and stderr, (and numbered as 0, 1, 2) which are (automatically an OS) created and opened - but here are mapped by convention to UART0, UART1, UART2 - of coarse if some other UART is mode convenient for pin out for you, you can modify the file (uartstdio.c).

    This file (uartstdio.c) was initially released for Cortex-M3, which had only UART0-2.

    Petrei 

  • @Petrei,

    Simply outstanding! 

    The relevant Unix history - past Cortex, tie-in/restriction - and poster's issue, "work-around."

    Know that your past/on-going efforts - very much welcome & appreciated - thanks...

  • "Can UART6 be supported as well, if the source code is changed?"

    Yes.

    The code is fairly simple and shouldn't be difficult to expand.

    On some boards, the UART0's RX/TX pins are hardwired to the ICDI controller's TX/RX pins so if you wish to utilize the virtual com port through the ICDI, you are limited to UART0, unless you hardwire the TX/RX pins.

    This actually opens up the possibility that you can use the board as a serial com device for other purposes.