Currently I was porting my code from MQX 4.1 to MQX 4.2. I got this error "ARM_GCC_Support/ewl/EWL_C/src/stdio/vsnprintf.c undefined reference to `__pformatter'" when I compile my code. What is the problem
I am experiencing the same thing, except it presents as this:
D:/Freescale/CW MCU v10.6/MCU/ARM_GCC_Support/ewl/lib/armv7e-m/fpu\libc.a(printf.o): In function `printf':
ARM_GCC_Support/ewl/EWL_C/src/stdio/printf.c:44: undefined reference to `__pformatter'
mingw32-make: *** [httpsrv_frdmk64f.elf] Error 1
It seems like the libc library is taking precedence over the MQX printf function and not playing nicely at the linker stage.
Looking at their example project, including this headers anywhere you want to print seems to work:
#include <ctype.h>
#include <stdlib.h>
#if MQX_USE_IO_OLD
#include <fio.h>
#else
#include <stdio.h>
#endif
It fix when change Librarian back to ewl, not use ewl-noio. Fixed as well sprintf.