I am maintaining a S32K144 Makefile project in Design Studio.
I want to send UART output to the Debugger console. The only instruction I can find is https://community.nxp.com/t5/Kinetis-Design-Studio-Knowledge/How-to-use-printf-to-print-string-to-Co... which uses Processor Expert (which we do not).
Its been a few years (& on STM) but as I recall I just have to add an ITM putc() somewhere?
Please point me at the magic charm(s) needed.
I am using USB Multilink, any special debug configuration needed would be welcome.
I am not being clear.
I want printf() to appear in the debugger console. This used to be called ITM?
I have a Multilink connected to the target. I do not have access to UART pins (don't ask!).
I have seen a PE example but we do not use PE (again don't ask!).
Thanks
Hi,
Ok, I see. I understand it that you need to use printf to serial console, sorry.
So - you can use STD C library with debugger I/O support - for example newlib:
and enable Semihosting console in debug configurations:
You should be able see printf output in Debug session semihosting console.
Hope it helps.
Jiri
Hi,
there is an old example - https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/EXAMPLE-S32k144-UART-printf-scanf-unde...
Basically - you need to implement these functions:
int_t __read_console(__file_handle handle, uchar_t * buffer, size_t * count);
int_t __write_console(__file_handle handle, uchar_t * buffer, size_t * count);
int_t __close_console(__file_handle handle);
You can reuse console.h and console.c from example in your project.
Jiri
Hi jiri_kral
According these steps , I make the same thing and SOP but it can't work ok.
please see the attach file and kindly help me.
thank you