How to redirect printf to debugger console in S32DS for power architecture v2.1?
Reading through some posts about this topic, I seem to understand that it would be sufficient to simply use a C standard library that includes debugger console support for printf to be redirected. In my case the project where I want to add this functionality is the lwip example running on MPC5748G that is included in the SDK.
This project by default is using the "newlib" library. So I go to project settings--> C/C++ Build --> Settings --> Target Processor --> Libraries support and select the closest alternative "newlib debugger console".
Are there any more steps? simply doing this is not redirecting my printf to a debugger console (looking at S32DS debugger console window does not show anything)
Second question: Alternatively, I also looked at this post about how to redirect printf to a LIN UART : How to use printf function in S32DS for Power Arch... - NXP Community
This works for a project using an EWL C library, but does not work on a project using newlib . Do you have suggestions on how to make this work on a newlib project ?
Thanks.
I am not able to see the newlib semihosting option over there, what i can enable ...?
Hi,
what's your target device and S32DS version?
Target Device Cortex- M7 S32K344 and 3.4 S32DS version
Yes I have enabled semihosting console on the debugger / Startup settings but this is not working. When executing printf statement, the debugger window displays "Program received signal SIGINT, Interrupt" that routes execution towards an unimplemented interrupt that just loops around itself. after investigation this is an IVOR 8 interrupt.
BR.
Hi,
it is possible share your project? You may send it to my NXP email.
BR,
Jiri
Hi,
did you enabled Semihosting console in Debug configurations? You may find helpful this thread - it is for ARM, but the principle is same:
https://community.nxp.com/t5/S32K/printf-in-FreeRTOS/td-p/1180777
BR,
Jiri