printf Through UART0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

printf Through UART0

Jump to solution
932 Views
jacewalton
Contributor III

I am using mk22fv512vlk12 and Kinetis Design Studio Version: 3.2.0

SDK 1.3.0 processor expert.

how do I rough printf to output through the UART0 Console? 

I am sure this has been done can anyone direct me to the proper post or answer directly?

Thanks!

Labels (1)
0 Kudos
1 Solution
491 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Jace,

If you use the KSDK1.3 +PE, you only need add the component of "fsl_debug_console",

then configure UART0 port and baud rate ,it can use printf*() to UART0 .

About the detail you can refer to this DOC : How to use printf() to print string to Console and UART in KDS2.0  

only need refer to the part of this DOC:

pastedImage_1.png

Hope it helps


Have a great day,
Alice Yang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
492 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Jace,

If you use the KSDK1.3 +PE, you only need add the component of "fsl_debug_console",

then configure UART0 port and baud rate ,it can use printf*() to UART0 .

About the detail you can refer to this DOC : How to use printf() to print string to Console and UART in KDS2.0  

only need refer to the part of this DOC:

pastedImage_1.png

Hope it helps


Have a great day,
Alice Yang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
491 Views
robertpoor
Senior Contributor I

Jace:

Have you compiled the hello_world example in the SDK's boards/.../demo_apps directory?  If so, you'll notice that the SDK defines a PRINTF() macro that behaves like the "ordinary" printf(), but specifically directs its output to UART0, or more properly, whatever the debug console is defined to be in your project.

I suggest you try compiling the hello_world demo as a starter.  Hope this helps!

0 Kudos