<?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>Kinetis Microcontrollersのトピックm_data region overflowed on KL25Z</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/m-data-region-overflowed-on-KL25Z/m-p/588510#M34624</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello community &lt;IMG alt="Smiley Happy" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="https://community.nxp.com/i/smilies/16x16_smiley-happy.png" title="Smiley Happy" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently working on project which use KSDKv2 and FreeRTOS on FRDM-KL25Z.&amp;nbsp; So everything look good until I got this error message on console :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt; font-family: courier new,courier;"&gt;... arm-none-eabi/bin/ld.exe: KL25Z-KSDK2_mvp_v0-2.elf &lt;STRONG&gt;&lt;SPAN style="color: #e23d39;"&gt;section `.stack' will not fit in region `m_data&lt;/SPAN&gt;'&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt; font-family: courier new,courier;"&gt;... arm-none-eabi/bin/ld.exe: &lt;STRONG&gt;&lt;SPAN style="color: #e23d39;"&gt;region m_data overflowed with stack and hea&lt;/SPAN&gt;&lt;SPAN style="color: #e23d39;"&gt;p&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt; font-family: courier new,courier;"&gt;... arm-none-eabi/bin/ld.exe: &lt;SPAN style="color: #e23d39;"&gt;&lt;STRONG&gt;region `m_data' overflowed by 8 bytes&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No joke, I overflowed &lt;EM&gt;m_data&lt;/EM&gt; space of the freedom board. So, I checked the linker file &lt;EM&gt;MKL25Z128xxx4_flash.ld&lt;/EM&gt; and found these lines : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14672361257272564 jive_text_macro" data-renderedposition="394_50_798_128" jivemacro_uid="_14672361257272564"&gt;&lt;P&gt;/* Specify the memory areas */&lt;/P&gt;&lt;P&gt;MEMORY&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; m_interrupts&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RX)&amp;nbsp; : ORIGIN = 0x00000000, LENGTH = 0x00000200&lt;/P&gt;&lt;P&gt;&amp;nbsp; m_flash_config&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RX)&amp;nbsp; : ORIGIN = 0x00000400, LENGTH = 0x00000010&lt;/P&gt;&lt;P&gt;&amp;nbsp; m_text&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RX)&amp;nbsp; : ORIGIN = 0x00000410, LENGTH = 0x0001FBF0&lt;/P&gt;&lt;P&gt;&amp;nbsp; m_data&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RW)&amp;nbsp; : ORIGIN = 0x1FFFF000, LENGTH = 0x00004000&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My first thought was to increase &lt;EM&gt;m_data&lt;/EM&gt; &lt;EM&gt;LENGTH&lt;/EM&gt;. And after modification, the compile occurred with no error but I am not very sure if it is the best way. Because between &lt;EM&gt;m_data&lt;/EM&gt; &lt;EM&gt;ORIGIN&lt;/EM&gt; and &lt;EM&gt;LENGTH&lt;/EM&gt; there is by default a gap of 16 384 which is the RAM size of the my Freedom board (KL25) ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if I increase the &lt;EM&gt;LENGTH&lt;/EM&gt; it will not be what I have in my RAM in reality.&amp;nbsp; Am I Right ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does someone can confirm this please ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Nov 2020 13:47:51 GMT</pubDate>
    <dc:creator>mr_max</dc:creator>
    <dc:date>2020-11-02T13:47:51Z</dc:date>
    <item>
      <title>m_data region overflowed on KL25Z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/m-data-region-overflowed-on-KL25Z/m-p/588510#M34624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello community &lt;IMG alt="Smiley Happy" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="https://community.nxp.com/i/smilies/16x16_smiley-happy.png" title="Smiley Happy" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently working on project which use KSDKv2 and FreeRTOS on FRDM-KL25Z.&amp;nbsp; So everything look good until I got this error message on console :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt; font-family: courier new,courier;"&gt;... arm-none-eabi/bin/ld.exe: KL25Z-KSDK2_mvp_v0-2.elf &lt;STRONG&gt;&lt;SPAN style="color: #e23d39;"&gt;section `.stack' will not fit in region `m_data&lt;/SPAN&gt;'&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt; font-family: courier new,courier;"&gt;... arm-none-eabi/bin/ld.exe: &lt;STRONG&gt;&lt;SPAN style="color: #e23d39;"&gt;region m_data overflowed with stack and hea&lt;/SPAN&gt;&lt;SPAN style="color: #e23d39;"&gt;p&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt; font-family: courier new,courier;"&gt;... arm-none-eabi/bin/ld.exe: &lt;SPAN style="color: #e23d39;"&gt;&lt;STRONG&gt;region `m_data' overflowed by 8 bytes&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No joke, I overflowed &lt;EM&gt;m_data&lt;/EM&gt; space of the freedom board. So, I checked the linker file &lt;EM&gt;MKL25Z128xxx4_flash.ld&lt;/EM&gt; and found these lines : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14672361257272564 jive_text_macro" data-renderedposition="394_50_798_128" jivemacro_uid="_14672361257272564"&gt;&lt;P&gt;/* Specify the memory areas */&lt;/P&gt;&lt;P&gt;MEMORY&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; m_interrupts&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RX)&amp;nbsp; : ORIGIN = 0x00000000, LENGTH = 0x00000200&lt;/P&gt;&lt;P&gt;&amp;nbsp; m_flash_config&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RX)&amp;nbsp; : ORIGIN = 0x00000400, LENGTH = 0x00000010&lt;/P&gt;&lt;P&gt;&amp;nbsp; m_text&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RX)&amp;nbsp; : ORIGIN = 0x00000410, LENGTH = 0x0001FBF0&lt;/P&gt;&lt;P&gt;&amp;nbsp; m_data&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RW)&amp;nbsp; : ORIGIN = 0x1FFFF000, LENGTH = 0x00004000&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My first thought was to increase &lt;EM&gt;m_data&lt;/EM&gt; &lt;EM&gt;LENGTH&lt;/EM&gt;. And after modification, the compile occurred with no error but I am not very sure if it is the best way. Because between &lt;EM&gt;m_data&lt;/EM&gt; &lt;EM&gt;ORIGIN&lt;/EM&gt; and &lt;EM&gt;LENGTH&lt;/EM&gt; there is by default a gap of 16 384 which is the RAM size of the my Freedom board (KL25) ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if I increase the &lt;EM&gt;LENGTH&lt;/EM&gt; it will not be what I have in my RAM in reality.&amp;nbsp; Am I Right ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does someone can confirm this please ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 13:47:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/m-data-region-overflowed-on-KL25Z/m-p/588510#M34624</guid>
      <dc:creator>mr_max</dc:creator>
      <dc:date>2020-11-02T13:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: m_data region overflowed on KL25Z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/m-data-region-overflowed-on-KL25Z/m-p/588511#M34625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;up :smileylaugh: ! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2016 11:36:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/m-data-region-overflowed-on-KL25Z/m-p/588511#M34625</guid>
      <dc:creator>mr_max</dc:creator>
      <dc:date>2016-07-01T11:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: m_data region overflowed on KL25Z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/m-data-region-overflowed-on-KL25Z/m-p/588512#M34626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually the best approach would be to reduce the size of RAM being used.&lt;/P&gt;&lt;P&gt;What is consuming so much of the RAM?&amp;nbsp; Large arrays?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even if the program compiled without error, after reducing RAM usage by eight bytes as the error message indicates, the system would crash as there is no RAM left for the stack.&amp;nbsp; Estimating stack size is always a problem, unless you read lots of academic papers about the subject, until actually usage can be measured.&amp;nbsp; Stack size always depends on the application.&amp;nbsp;&amp;nbsp;&amp;nbsp; Figure at least 1K as a minimum starting stack size.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2016 12:12:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/m-data-region-overflowed-on-KL25Z/m-p/588512#M34626</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2016-07-01T12:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: m_data region overflowed on KL25Z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/m-data-region-overflowed-on-KL25Z/m-p/588513#M34627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're right that you can't extend LENGTH because there's no more RAM there.&amp;nbsp; Even on other Kinetis parts that have a block of memory past the 0x2000 0000 boundary you have to be careful that nothing spans the boundary since they're separate blocks of RAM.&amp;nbsp; Not an issue here, but watch out if you upgrade.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You're just out of memory.&amp;nbsp; First thing to do is to check the linker map file and see what's taking up all of the space.&amp;nbsp; You should be able to find it in the same directory as the .elf file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jul 2016 05:03:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/m-data-region-overflowed-on-KL25Z/m-p/588513#M34627</guid>
      <dc:creator>scottm</dc:creator>
      <dc:date>2016-07-03T05:03:56Z</dc:date>
    </item>
  </channel>
</rss>

