printf Through UART0

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

printf Through UART0

跳至解决方案
1,602 次查看
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!

标签 (1)
0 项奖励
回复
1 解答
1,161 次查看
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 项奖励
回复
2 回复数
1,162 次查看
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 项奖励
回复
1,161 次查看
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 项奖励
回复