Defining custom getc, putc funcitons for additonal uart in uboot

You might consider looking for docs on how to change the serial console port to a different UART and starting by transferring the serial console to your other UART. This is just a method to verify the serial UART is set up and working at the intended base address, and then when you’ve verified, to transfer serial console back to the original port (while keeping most of the device tree which worked for the new UART when it was a serial console).

You might also be interested these files in the U-Boot source:


(search for “stdout-path”)

There is a note for setting up a “stdout-path” via the device tree “chosen” node. You would not want to produce a conflict by trying to compete with serial console for stdout-path, but I am guessing that if you examined the U-Boot source where stdout-path is actually used, then you could produce another path of your own (such as a FILE* which is usable by fputc() and friends).