AnsweredAssumed Answered

How to avoid usage of library functions?

Question asked by Joern Petersen on Aug 26, 2014
Latest reply on Sep 8, 2014 by Joern Petersen

Hi there!



I am using PE from CW 10.6 with the GCC.

The target is a Kinetis KE02, handling some basic I/O and serial communication.

The PE components used in my project are ADC, IntFLASH, BitIO, TimerInt, AsynchroSerial, WatchDog and PWM.


When looking at the .map file, I have noticed, that the linker includes some quite big library functions from "libc.a" like "pformatter", "strtoul" and "sformatter", which I can't relate to any functionality of my code, nor the included PE components (no calls to "printf" or "scanf" in my code).

I have tried to disable the usage of the "default libraries" in the general Linker settings, which gives me the following error from the linker:

C:/MyProject/Project_Settings/Linker_Files/ProcessorExpert.ld:219: undefined symbol `__pformatter_' referenced in expression

mingw32-make: *** [MyProject.elf] Error 1

Line 219 is the last (and empty) line of the linker command file, which PE generates automatically, but I can't find any usage of the library functions in that file.


Does anyone know, why these library functions are included and if there is a way to avoid their inclusion in the project?



Kind regards