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 ?
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.
did you enabled Semihosting console in Debug configurations? You may find helpful this thread - it is for ARM, but the principle is same: