Hello Qingyan,
The insturction "How to use printf() to print string to Console and UART in KDS" is test on KDS2.0,
(1) As Erich said "KDS v2.0.0 and KDS v3.0.0 are using different libraries." , so if you want shown in the "Semihosting and SWV". , please configure like this :
(I test also on the demo you mentioned )


then on the code ,please use "printf();" , then run the code , you will see as this :

(2) About the demo project , the function of " PRINTF()" will show on the terminal :

Please have a try .
If still have any question , please contact us .
Have a great day,
Alice
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------