Hello ,
Which board you used ? I test on FRDM-K64 board, it can work well :

And please pay attention ,choosing " Semihost console" is print to Console, "UART console" is
print to UART .

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