<?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 K60 Baremetal Project Code Size Error: `.text' will not fit in region `m_text' in CodeWarrior Development Tools</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-Baremetal-Project-Code-Size-Error-text-will-not-fit-in/m-p/627108#M5370</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;I am using TWR-K60N512, with PK60DN512Z VMD10 chip and Codewarrior 10.5. I definitely have issues with the size of my code, I have about 50 source and header files in my source folder. About half of them are freemaster stuff, so I won't modify that.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px; color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;I'm wondering if anybody could:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;1) Show me how to increase the maximum allowable code size, if&amp;nbsp;at all possible, for baremetal projects .&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;2) Tell me if there's a way to display&amp;nbsp;the part of my baremetal project code that&amp;nbsp;is taking up too much memory so I can optimize it accordingly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px; color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;Here's the error I received:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;c:/freescale/cw mcu v10.5/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: i2c.elf section `.text' will not fit in region `m_text'&lt;BR /&gt;c:/freescale/cw mcu v10.5/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: section .data loaded at [20000000,2000019b] overlaps section .text loaded at [1fff01e0,20001507]&lt;BR /&gt;c:/freescale/cw mcu v10.5/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 5384 bytes&amp;nbsp;&lt;BR /&gt;collect2.exe: error: ld returned 1 exit status&lt;BR /&gt;mingw32-make: *** [i2c.elf] Error 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px; color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;I have also attached a file with '.ld' format, which has some memory info for your reference.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px; color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337843"&gt;PK60N512_ram.ld.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Nov 2016 22:05:19 GMT</pubDate>
    <dc:creator>broccolee</dc:creator>
    <dc:date>2016-11-02T22:05:19Z</dc:date>
    <item>
      <title>K60 Baremetal Project Code Size Error: `.text' will not fit in region `m_text'</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-Baremetal-Project-Code-Size-Error-text-will-not-fit-in/m-p/627108#M5370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;I am using TWR-K60N512, with PK60DN512Z VMD10 chip and Codewarrior 10.5. I definitely have issues with the size of my code, I have about 50 source and header files in my source folder. About half of them are freemaster stuff, so I won't modify that.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px; color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;I'm wondering if anybody could:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;1) Show me how to increase the maximum allowable code size, if&amp;nbsp;at all possible, for baremetal projects .&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;2) Tell me if there's a way to display&amp;nbsp;the part of my baremetal project code that&amp;nbsp;is taking up too much memory so I can optimize it accordingly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px; color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;Here's the error I received:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;c:/freescale/cw mcu v10.5/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: i2c.elf section `.text' will not fit in region `m_text'&lt;BR /&gt;c:/freescale/cw mcu v10.5/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: section .data loaded at [20000000,2000019b] overlaps section .text loaded at [1fff01e0,20001507]&lt;BR /&gt;c:/freescale/cw mcu v10.5/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 5384 bytes&amp;nbsp;&lt;BR /&gt;collect2.exe: error: ld returned 1 exit status&lt;BR /&gt;mingw32-make: *** [i2c.elf] Error 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px; color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;I have also attached a file with '.ld' format, which has some memory info for your reference.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px; color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337843"&gt;PK60N512_ram.ld.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 22:05:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-Baremetal-Project-Code-Size-Error-text-will-not-fit-in/m-p/627108#M5370</guid>
      <dc:creator>broccolee</dc:creator>
      <dc:date>2016-11-02T22:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: K60 Baremetal Project Code Size Error: `.text' will not fit in region `m_text'</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-Baremetal-Project-Code-Size-Error-text-will-not-fit-in/m-p/627109#M5371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For 1) The allowed code size depends on your microcontroller (amount of on chip FLASH memory). The 512 variant has 512 KByte, so if you really need more, you need a bigger device with more FLASH. But what you could do otherwise is to turn on code size optimization in the compiler settings, this should reduce your code size by a bit.&lt;/P&gt;&lt;P&gt;For 2) You can report the code/data size for each object file, see &lt;A class="link-titled" href="https://mcuoneclipse.com/2014/07/13/listing-code-and-data-size-for-each-source-file-with-gnu-and-eclipse/" title="https://mcuoneclipse.com/2014/07/13/listing-code-and-data-size-for-each-source-file-with-gnu-and-eclipse/"&gt;https://mcuoneclipse.com/2014/07/13/listing-code-and-data-size-for-each-source-file-with-gnu-and-eclipse/&lt;/A&gt;&amp;nbsp;&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>Thu, 03 Nov 2016 06:23:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-Baremetal-Project-Code-Size-Error-text-will-not-fit-in/m-p/627109#M5371</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2016-11-03T06:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: K60 Baremetal Project Code Size Error: `.text' will not fit in region `m_text'</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-Baremetal-Project-Code-Size-Error-text-will-not-fit-in/m-p/627110#M5372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Sir! I turned on the code size optimization option and it reduced my codes size significantly!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Nov 2016 18:48:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-Baremetal-Project-Code-Size-Error-text-will-not-fit-in/m-p/627110#M5372</guid>
      <dc:creator>broccolee</dc:creator>
      <dc:date>2016-11-03T18:48:27Z</dc:date>
    </item>
  </channel>
</rss>

