when I refer Example S32K_printf_implementation - S32DS_1.0 - NXP Community this topic,
it mentioned bellow 'libraries support' setting,
but in my project, there is no this selection,
my environment: S32 Design Studio 3.5, MCU: S32K358
how could I add aforementioned "ewl_c" selection
Hi LeoZ,
Do you want to implement printf by LPUART peripheral, or by Semihosting when debugging? Attached project implementing Printf by UART, it is based on S32DS v3.4 + S32K3 RTD 0.9.0. Although the RTD version and part number are different, I hope it will be helpful to you.
Best Regards,
Robin
Thank you, I want to use printf for uart, and I succeeded in S32K358 referring to your project.
While I found it can not send floating number, then I refer to 浮点数在串口打印的函数 to convert float number to string to send,
I do not know if there is better way to print floating number
Did you checked the Support printf float format for newlib_nano library (-u_printf_float) ?
thank you, checking that solved my problem
btw: from the warning, it takes '(float32) a' as a double, I am not sure if it will cost more uart time to take 'a' as double than single-floating, (if so) then if existing some way to modify printf for it. anyway, this question is not important, just curious.