<?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: No linker error when exceeding m_text because of __DATA_ROM in S32 Design Studio</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/No-linker-error-when-exceeding-m-text-because-of-DATA-ROM/m-p/1031416#M6051</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you add the following line at the end of the linker script? (after line 208)&lt;/P&gt;&lt;P&gt;ASSERT(__CUSTOM_END &amp;gt;= (ORIGIN(m_text) + LENGTH(m_text)), "region m_text overflowed with code and rom data")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should do the trick.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Rares&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Feb 2020 12:19:13 GMT</pubDate>
    <dc:creator>raresvasile</dc:creator>
    <dc:date>2020-02-06T12:19:13Z</dc:date>
    <item>
      <title>No linker error when exceeding m_text because of __DATA_ROM</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/No-linker-error-when-exceeding-m-text-because-of-DATA-ROM/m-p/1031413#M6048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using the default linker file for the S32k144 that the S32DS comes with, the linker fails to generate an error when the allowed size for the m_text is exceeded.&amp;nbsp; Looking at the linker file it doesn't directly put the data ROM into m_text but rather creates some variables and uses those.&amp;nbsp; This prevents the linker from generating an error when the assigned sized of m_text is exceeded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my case my linker for the m_text looks like this&lt;/P&gt;&lt;P&gt;m_text (RX) : ORIGIN = 0x00002404, LENGTH = 0x0000FBFC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would expect that if anything stored in this section goes beyond 0x12000 the linker would generate an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If&amp;nbsp;the .text section exceeds the size it triggers and error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However these two sections also go into flash but do not trigger an error because they are not directly placed into m_text but rather use variables defined in the linker file (&lt;SPAN&gt;__DATA_ROM &amp;amp;&amp;nbsp;__CODE_ROM)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;.data : AT(__DATA_ROM)&lt;BR /&gt; .code : AT(__CODE_ROM)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I get the linker to properly trigger an error?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2019 18:42:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/No-linker-error-when-exceeding-m-text-because-of-DATA-ROM/m-p/1031413#M6048</guid>
      <dc:creator>tommy1231</dc:creator>
      <dc:date>2019-12-10T18:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: No linker error when exceeding m_text because of __DATA_ROM</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/No-linker-error-when-exceeding-m-text-because-of-DATA-ROM/m-p/1031414#M6049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure about your scenario. By default - when section size is exceeded linker error message is shown:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/101990iD9814680B049E62F/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you share your project or .map file?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's your size output from build console?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_10.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/102031i8CF3F74938EC9BE3/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_10.png" alt="pastedImage_10.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jiri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2020 11:26:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/No-linker-error-when-exceeding-m-text-because-of-DATA-ROM/m-p/1031414#M6049</guid>
      <dc:creator>jiri_kral</dc:creator>
      <dc:date>2020-02-05T11:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: No linker error when exceeding m_text because of __DATA_ROM</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/No-linker-error-when-exceeding-m-text-because-of-DATA-ROM/m-p/1031415#M6050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jiri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I shrink the size of m_text enough I do get the error like you said&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/102077i46235729E55FCF0E/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However if I make the size big enough for m_text to fit but not big enough for these sections it doesn't give an error&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;.data : AT(__DATA_ROM)&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;.code : AT(__CODE_ROM)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Notice if you add the text size to the data size it is 0xACC8 which is larger than I allowed the space to be&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/102161i0DC1B433834FC086/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;From the map file it goes past the allowed space (0x2404 + 0xA000 = 0xC404)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt; *fill* 0x1fff0ce9 0x3 &lt;BR /&gt; 0x1fff0cec __data_end__ = .&lt;BR /&gt; 0x0000cca4 __DATA_END = (__DATA_ROM + (__data_end__ - __data_start__))&lt;BR /&gt; 0x0000cca4 __CODE_ROM = __DATA_END&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;The generated srecord also shows it going beyond.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;S113CCC438BD2B685A1CF2D09847F0E700000240A4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2020 18:17:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/No-linker-error-when-exceeding-m-text-because-of-DATA-ROM/m-p/1031415#M6050</guid>
      <dc:creator>tommy1231</dc:creator>
      <dc:date>2020-02-05T18:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: No linker error when exceeding m_text because of __DATA_ROM</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/No-linker-error-when-exceeding-m-text-because-of-DATA-ROM/m-p/1031416#M6051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you add the following line at the end of the linker script? (after line 208)&lt;/P&gt;&lt;P&gt;ASSERT(__CUSTOM_END &amp;gt;= (ORIGIN(m_text) + LENGTH(m_text)), "region m_text overflowed with code and rom data")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should do the trick.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Rares&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2020 12:19:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/No-linker-error-when-exceeding-m-text-because-of-DATA-ROM/m-p/1031416#M6051</guid>
      <dc:creator>raresvasile</dc:creator>
      <dc:date>2020-02-06T12:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: No linker error when exceeding m_text because of __DATA_ROM</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/No-linker-error-when-exceeding-m-text-because-of-DATA-ROM/m-p/1031417#M6052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rares,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It almost did the trick.&amp;nbsp; The ASSERT happens when the condition is false so I had to flip the greater than to a less than&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSERT(__CUSTOM_END &amp;lt; (ORIGIN(m_text) + LENGTH(m_text)), "region m_text overflowed with code and rom data")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest that this gets added to the default linker files that S32 DS generates as others might run into this as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2020 17:07:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/No-linker-error-when-exceeding-m-text-because-of-DATA-ROM/m-p/1031417#M6052</guid>
      <dc:creator>tommy1231</dc:creator>
      <dc:date>2020-02-06T17:07:40Z</dc:date>
    </item>
  </channel>
</rss>

