Hello HAIZHOU LI ,
Your project is based on SDK ? If yes, you can try to add the file of "retarget_itm.c" .
it under MCUXpresso IDE install path: MCUXpressoIDE_10.1.0_589\ide\Examples\Misc
About the How to use ITM Printf, please have a look at "MCUXpresso_IDE_User_Guide.pdf"-> 13.5.7 How to use ITM Printf
Hope it helps
Alice