Hi @Liuliyuan,
Thank you for contacting NXP Support.
Based on the following community post Semihosting printf with S32G274A - NXP Community
By now, "printf" using the S32 Debugger is an unsupported feature.
Therefore, we suggest you use a UART interface to implement a "printf" capability.
I hope this information will be helpful.
Have a great day!