This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

What is the relationship between UART and printf within retarget?

HI.

I'm trying to understand the relationship between UART and printf within retarget.

as I understand, retarget supports to implement low level function fputc, if I want to use printf().

if I am right, I can't still understand the relationship between printf and UART_STDOUT.

especially, the below example is what I want to share you.

this is the hello.c example code.

and retarget.c

I can't understand how does printf() work? Is printf() working as UART function as a fake ? or really works as UART?

Is printf() connected UART function? I can't understand the relationship between UART function of cortex-m3 and printf().

Does printf() differently work such as printf() of ANCI C?

Would you please anyone help me to understand this question to clarify?

Thanks in advance

0