AnsweredAssumed Answered

C++ bug?  ewl_c++ with int_FP printf/scanf options

Question asked by Marc Lindahl on Aug 1, 2013
Latest reply on Jan 7, 2014 by Marc Lindahl

here's a good one.  C++ program compiles just fine using the ewl_c++ library, as long as the 'int' option for printf and scanf are selected.  If I select 'int_FP' then I get the errors:

 

 

**** Build of configuration FLASH for project ioti-k20 ****

 

C:\Freescale\CW MCU v10.4\gnu\bin\mingw32-make all

'Building target: ioti-k20.elf'

'Executing target #90 ioti-k20.elf'

'Invoking: ARM Ltd Windows GCC C++ Linker'

"C:/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-g++"    @"ioti-k20.args" -o"ioti-k20.elf"

Using built-in specs.

Reading specs from c:/freescale/cw mcu v10.4/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/ewl_c++.specs

rename spec subtarget_cpp_spec to old_subtarget_cpp_spec

COLLECT_GCC=C:/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-g++

COLLECT_LTO_WRAPPER=c:/freescale/cw mcu v10.4/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/lto-wrapper.exe

Target: arm-none-eabi

Configured with: /home/rat031/arm_gcc_2012q4_47_r785/gcc-arm-none-eabi-4_7-2012q4-20121208/src/gcc/configure --build=i686-linux-gnu --host=i686-pc-mingw32 --target=arm-none-eabi --prefix=/home/rat031/arm_gcc_2012q4_47_r785/gcc-arm-none-eabi-4_7-2012q4-20121208/install-mingw --libexecdir=/home/rat031/arm_gcc_2012q4_47_r785/gcc-arm-none-eabi-4_7-2012q4-20121208/install-mingw/lib --infodir=/home/rat031/arm_gcc_2012q4_47_r785/gcc-arm-none-eabi-4_7-2012q4-20121208/install-mingw/share/doc/gcc-arm-none-eabi/info --mandir=/home/rat031/arm_gcc_2012q4_47_r785/gcc-arm-none-eabi-4_7-2012q4-20121208/install-mingw/share/doc/gcc-arm-none-eabi/man --htmldir=/home/rat031/arm_gcc_2012q4_47_r785/gcc-arm-none-eabi-4_7-2012q4-20121208/install-mingw/share/doc/gcc-arm-none-eabi/html --pdfdir=/home/rat031/arm_gcc_2012q4_47_r785/gcc-arm-none-eabi-4_7-2012q4-20121208/install-mingw/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-lto --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-headers=yes --with-newlib --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/home/rat031/arm_gcc_2012q4_47_r785/gcc-arm-none-eabi-4_7-2012q4-20121208/install-mingw/arm-none-eabi --with-libiconv-prefix=/home/rat031/arm_gcc_2012q4_47_r785/gcc-arm-none-eabi-4_7-2012q4-20121208/build-mingw/host-libs/usr --with-gmp=/home/rat031/arm_gcc_2012q4_47_r785/gcc-arm-none-eabi-4_7-2012q4-20121208/build-mingw/host-libs/usr --with-mpfr=/home/rat031/arm_gcc_2012q4_47_r785/gcc-arm-none-eabi-4_7-2012q4-20121208/build-mingw/host-libs/usr --with-mpc=/home/rat031/arm_gcc_2012q4_47_r785/gcc-arm-none-eabi-4_7-2012q4-20121208/build-mingw/host-libs/usr --with-ppl=/home/rat031/arm_gcc_2012q4_47_r785/gcc-arm-none-eabi-4_7-2012q4-20121208/build-mingw/host-libs/usr --with-cloog=/home/rat031/arm_gcc_2012q4_47_r785/gcc-arm-none-eabi-4_7-2012q4-20121208/build-mingw/host-libs/usr --with-libelf=/home/rat031/arm_gcc_2012q4_47_r785/gcc-arm-none-eabi-4_7-2012q4-20121208/build-mingw/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors' --with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r

Thread model: single

gcc version 4.7.3 20121207 (FSL release r785) [ARM/embedded-4_7-branch revision 194305] (GNU Tools for ARM Embedded Processors)

COMPILER_PATH=c:/freescale/cw mcu v10.4/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/;c:/freescale/cw mcu v10.4/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/;c:/freescale/cw mcu v10.4/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/

LIBRARY_PATH=c:/freescale/cw mcu v10.4/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/armv7e-m/fpu/;c:/freescale/cw mcu v10.4/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/armv7e-m/fpu/;c:/freescale/cw mcu v10.4/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../arm-none-eabi/lib/armv7e-m/fpu/;c:/freescale/cw mcu v10.4/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/;c:/freescale/cw mcu v10.4/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/;c:/freescale/cw mcu v10.4/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/;c:/freescale/cw mcu v10.4/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../arm-none-eabi/lib/

COLLECT_GCC_OPTIONS='-mcpu=cortex-m4' '-mthumb' '-mfloat-abi=hard' '-mfpu=fpv4-sp-d16' '-g3' '-gdwarf-2' '-gstrict-dwarf' '-T' 'Y:/BEA/ioti/software/SVN/trunk/firmware/ioti-k20/Project_Settings/Linker_Files/ProcessorExpert.ld' '-nostartfiles' '-nodefaultlibs' '-nostdlib' '-LC:/Freescale/CW MCU v10.4/MCU/ARM_GCC_Support/ewl/lib/armv7e-m/fpu' '-LC:/Freescale/CW MCU v10.4/MCU/ARM_GCC_Support/ewl/lib/armv7e-m' '-v' '-o' 'ioti-k20.elf'

c:/freescale/cw mcu v10.4/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/collect2.exe --sysroot=c:\freescale\cw mcu v10.4\cross_tools\arm-none-eabi-gcc-4_7_3\bin\../arm-none-eabi -X -o ioti-k20.elf -LC:/Freescale/CW MCU v10.4/MCU/ARM_GCC_Support/ewl/lib/armv7e-m/fpu -LC:/Freescale/CW MCU v10.4/MCU/ARM_GCC_Support/ewl/lib/armv7e-m -Lc:/freescale/cw mcu v10.4/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/armv7e-m/fpu -Lc:/freescale/cw mcu v10.4/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/armv7e-m/fpu -Lc:/freescale/cw mcu v10.4/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../arm-none-eabi/lib/armv7e-m/fpu -Lc:/freescale/cw mcu v10.4/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3 -Lc:/freescale/cw mcu v10.4/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc -Lc:/freescale/cw mcu v10.4/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib -Lc:/freescale/cw mcu v10.4/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../arm-none-eabi/lib @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\cc8tJucd -T Y:/BEA/ioti/software/SVN/trunk/firmware/ioti-k20/Project_Settings/Linker_Files/ProcessorExpert.ld

C:/Freescale/CW MCU v10.4/MCU/ARM_GCC_Support/ewl/lib/armv7e-m/fpu\libc.a(printformat_fp.o): In function `__pformatterFP':

ARM_GCC_Support/ewl/EWL_C/../EWL_C/src/stdio/__printformat.c:1641: undefined reference to `__num2dec'

ARM_GCC_Support/ewl/EWL_C/../EWL_C/src/stdio/__printformat.c:1718: undefined reference to `__round_decimal'

ARM_GCC_Support/ewl/EWL_C/../EWL_C/src/stdio/__printformat.c:1756: undefined reference to `__round_decimal'

ARM_GCC_Support/ewl/EWL_C/../EWL_C/src/stdio/__printformat.c:1819: undefined reference to `__round_decimal'

C:/Freescale/CW MCU v10.4/MCU/ARM_GCC_Support/ewl/lib/armv7e-m/fpu\libc.a(scanformat_fp.o): In function `__sformatter_FP':

ARM_GCC_Support/ewl/EWL_C/../EWL_C/src/stdio/__scanformat.c:1506: undefined reference to `__float_nan'

C:/Freescale/CW MCU v10.4/MCU/ARM_GCC_Support/ewl/lib/armv7e-m/fpu\libc.a(__strtold.o): In function `__strtold':

ARM_GCC_Support/ewl/EWL_C/src/stdio/__strtold.c:762: undefined reference to `__dec2num'

ARM_GCC_Support/ewl/EWL_C/src/stdio/__strtold.c:943: undefined reference to `__double_huge'

mingw32-make: *** [ioti-k20.elf] Error 1

 

I have the 'enable automatic library configurations' checked.

It looks like it's missing some include files along the chain or a library...

Any solutions?

Outcomes