Example S32K_printf_implementation - S32DS_1.0

cancel
Showing results for 
Search instead for 
Did you mean: 

Example S32K_printf_implementation - S32DS_1.0

No ratings

Example S32K_printf_implementation - S32DS_1.0

********************************************************************************
* Detailed Description:
* This example shows, how to use printf function in project.
* Files uart_console_io.c, uart.c and uart.h was added. These files contain
* necessary functions for correct printf() functionality
*
*
* Test HW:         FRDMPK144-Q100
* MCU:             PS32K144HFVLL 0N77P
* Terminal:        9600-8-no parity-1 stop bit-no flow control on LPUART1
* Fsys:            160 MHz
* Debugger:        Lauterbach Trace32
*                  PeMicro USB-ML-PPCNEXUS
*                  OpenSDA embedded debug
* Target:          internal_FLASH, internal RAM
* EVB connection:  default

Labels (1)
Attachments
Comments

Hello Martin, 

Great work and your project worked well for me. 

However my project longer compiles when I copied your files (uart.c, uart.h, uart_console_io.c, clocks_and_mode.c & clocks_and_modes.h) into it.  My project is based on the "wdog_interrupt_s32k144 S32DS" example project and links with S32K14x EAR SDK v0.8.6. Your project links with EWL instead.

In my project I get this build error from uart.h

#if !_EWL_CONSOLE_SUPPORT
#error _EWL_CONSOLE_SUPPORT must not be defined to 1.
#endif

Also uart_console.io.c cannot include <ansi_parms.h> which defines _EWL_CONSOLE_SUPPORT.  This is because ansi_parms.h is located under "\nxp\S32DS_ARM_v2018.R1\S32DS\arm_ewl2\EWL_C\include" and that include path is not used by the "wdog_interrupt_s32k144 S32DS" example.

Can EWL include paths be added to an S32K14x SDK project?

Is it possible to redirect stdout to LPUART when using S32K14 SDK instead of EWL?

Apologies if these are dumb questions but I am new to the S32.

Thanks in advance

--MartinT

HI Martin,

I met the same issue as you, and it can be resolved with changing the project's runtime C library to EWL_C no I/O

pastedImage_1.png

PS: the default library is newlib, which dose not work with the printf demo codes.

Best regard,

Enwei Hu.

Version history
Revision #:
1 of 1
Last update:
‎02-10-2017 04:38 AM
Updated by: