<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to avoid usage of library functions? in Processor Expert Software</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/How-to-avoid-usage-of-library-functions/m-p/381356#M2943</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using PE from CW 10.6 with the GCC.&lt;/P&gt;&lt;P&gt;The target is a Kinetis KE02, handling some basic I/O and serial communication.&lt;/P&gt;&lt;P&gt;The PE components used in my project are ADC, IntFLASH, BitIO, TimerInt, AsynchroSerial, WatchDog and PWM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;C:/MyProject/Project_Settings/Linker_Files/ProcessorExpert.ld:219: undefined symbol `__pformatter_' referenced in expression&lt;/P&gt;&lt;P&gt;mingw32-make: *** [MyProject.elf] Error 1&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know, why these library functions are included and if there is a way to avoid their inclusion in the project?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Joern&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Aug 2014 08:13:18 GMT</pubDate>
    <dc:creator>JPE</dc:creator>
    <dc:date>2014-08-26T08:13:18Z</dc:date>
    <item>
      <title>How to avoid usage of library functions?</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/How-to-avoid-usage-of-library-functions/m-p/381356#M2943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using PE from CW 10.6 with the GCC.&lt;/P&gt;&lt;P&gt;The target is a Kinetis KE02, handling some basic I/O and serial communication.&lt;/P&gt;&lt;P&gt;The PE components used in my project are ADC, IntFLASH, BitIO, TimerInt, AsynchroSerial, WatchDog and PWM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;C:/MyProject/Project_Settings/Linker_Files/ProcessorExpert.ld:219: undefined symbol `__pformatter_' referenced in expression&lt;/P&gt;&lt;P&gt;mingw32-make: *** [MyProject.elf] Error 1&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know, why these library functions are included and if there is a way to avoid their inclusion in the project?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Joern&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2014 08:13:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/How-to-avoid-usage-of-library-functions/m-p/381356#M2943</guid>
      <dc:creator>JPE</dc:creator>
      <dc:date>2014-08-26T08:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid usage of library functions?</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/How-to-avoid-usage-of-library-functions/m-p/381357#M2944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Joern,&lt;/P&gt;&lt;P&gt;This issue has been addressed in the document on MCU on Eclipse pages. See the page &lt;A href="http://mcuoneclipse.com/2012/11/11/optimizing-the-kinetis-gcc-startup/"&gt;http://mcuoneclipse.com/2012/11/11/optimizing-the-kinetis-gcc-startup/&lt;/A&gt; - chapter "Linker and Libraries". There is described how to remove "pformatter".&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Marek Neuzil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 07:48:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/How-to-avoid-usage-of-library-functions/m-p/381357#M2944</guid>
      <dc:creator>marek_neuzil</dc:creator>
      <dc:date>2014-09-05T07:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid usage of library functions?</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/How-to-avoid-usage-of-library-functions/m-p/381358#M2945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Marek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I actually had a look at Erich Stygers brilliant site already, but the linker flags that he describes are not in my project.&lt;/P&gt;&lt;P&gt;However, on that page you refer to, there was also another link (&lt;A href="http://mcuoneclipse.com/2012/12/22/reducing-code-size-with-gcc-and-ewl/" title="http://mcuoneclipse.com/2012/12/22/reducing-code-size-with-gcc-and-ewl/"&gt;Reducing Code Size with gcc and EWL | MCU on Eclipse&lt;/A&gt;), which showed how to use another library model ("ewl_noio") instead of the default one ("ewl"). This removed the pformatter code and reduced my code size with more than 4000 bytes!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So thanks for the hint!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Jörn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Sep 2014 15:52:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/How-to-avoid-usage-of-library-functions/m-p/381358#M2945</guid>
      <dc:creator>JPE</dc:creator>
      <dc:date>2014-09-08T15:52:13Z</dc:date>
    </item>
  </channel>
</rss>

