If you want to use printf you can also do this with semihosting, which is not the fastest method of printing messages.
If you use J-Link, I recommend to print messages via RTT Viewer. Almost all our examples on Github use this method.
When you are going to use printf in GCC for Arm projects, you could use RTT (need J-Link) and Semihosting (not only with J-Link). And Dynamic Printf, alternatively. See the following FAQs:FAQ - e² studio printf console debugginghttps://en-support.renesas.com/knowledgeBase/16979385FAQ - Using e² studio projects with RTT Viewerhttps://en-support.renesas.com/knowledgeBase/21077330