<?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 Re: KL05Z code size problems :) in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05Z-code-size-problems/m-p/383395#M20462</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Amazing response, thanks a lot :smileyhappy:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Dec 2014 09:43:23 GMT</pubDate>
    <dc:creator>kazola</dc:creator>
    <dc:date>2014-12-02T09:43:23Z</dc:date>
    <item>
      <title>KL05Z code size problems :)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05Z-code-size-problems/m-p/383393#M20460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;it seems everybody is working with KL25Z. However, I'm working with KL05Z.&lt;/P&gt;&lt;P&gt;By using Processor Expert, it seems the code I get is too big. I need PE + Freemaster + TSS.&lt;/P&gt;&lt;P&gt;No problem in using an ASLider in Basic mode. It even works my Freemaster project and I can see the graphs :smileyhappy:&lt;/P&gt;&lt;P&gt;However, this is what I get when I try to configure in AFID mode:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"C:\\Freescale\\CW MCU v10.6\\gnu\\bin\\mingw32-make" -j8 all &lt;/P&gt;&lt;P&gt;'Building target: FRDM_PE_2.elf'&lt;/P&gt;&lt;P&gt;'Executing target #29 FRDM_PE_2.elf'&lt;/P&gt;&lt;P&gt;'Invoking: ARM Ltd Windows GCC C Linker'&lt;/P&gt;&lt;P&gt;"C:/Freescale/CW MCU v10.6/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc"&amp;nbsp;&amp;nbsp;&amp;nbsp; @"FRDM_PE_2.args" -o"FRDM_PE_2.elf"&lt;/P&gt;&lt;P&gt;c:/freescale/cw mcu v10.6/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: FRDM_PE_2.elf section `.text' will not fit in region `m_text'&lt;/P&gt;&lt;P&gt;c:/freescale/cw mcu v10.6/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: region `m_text' overflowed by 944 bytes&lt;/P&gt;&lt;P&gt;collect2.exe: error: ld returned 1 exit status&lt;/P&gt;&lt;P&gt;mingw32-make: *** [FRDM_PE_2.elf] Error 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, my questions are twofold:&lt;/P&gt;&lt;P&gt;1) Why I cannot see the code size even if I configure the thing as indicated in the following link?&lt;/P&gt;&lt;P&gt;&lt;A href="http://mcuoneclipse.com/2012/09/24/code-size-information-with-gcc-for-armkinetis/" title="http://mcuoneclipse.com/2012/09/24/code-size-information-with-gcc-for-armkinetis/"&gt;Code Size Information with gcc for ARM/Kinetis | MCU on Eclipse&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2) How can I reduce this code size? It seems it is 944 bytes too big.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks, please let me know! :smileyhappy:&lt;/P&gt;&lt;P&gt;Perhaps am I suffering from the same issue than in my previous post? I managed to build the project but I woudn't like to be in the same place :smileyhappy:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/335931"&gt;TSS 3.1 KL05Z-FRDM builds but cannot run&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 17:24:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05Z-code-size-problems/m-p/383393#M20460</guid>
      <dc:creator>kazola</dc:creator>
      <dc:date>2014-12-01T17:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: KL05Z code size problems :)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05Z-code-size-problems/m-p/383394#M20461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The gcc code with -O0 (no optimization) is rather big, so changing it to -O1 might do the trick.&lt;/P&gt;&lt;P&gt;Or use -Os:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/18309iB0F1D9C3F53C80BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There is just the downside that optimized code will impact debugging. But -O1 should not impact it too much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And: the code size you get printed after a sucessful linking phase. In case you need to find out what is eating up memory, you might temporarily increase the flash (m_text) size in the linker file (as if you would have more FLASH available).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 17:36:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05Z-code-size-problems/m-p/383394#M20461</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2014-12-01T17:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: KL05Z code size problems :)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05Z-code-size-problems/m-p/383395#M20462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Amazing response, thanks a lot :smileyhappy:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2014 09:43:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05Z-code-size-problems/m-p/383395#M20462</guid>
      <dc:creator>kazola</dc:creator>
      <dc:date>2014-12-02T09:43:23Z</dc:date>
    </item>
  </channel>
</rss>

