<?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: Errors:range error for small data relocation in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/Errors-range-error-for-small-data-relocation/m-p/626029#M5697</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have to enable C99 extension. See the picture below.&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/13764i88DEBC0E42AA88F5/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;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jan 2017 12:12:33 GMT</pubDate>
    <dc:creator>martin_kovar</dc:creator>
    <dc:date>2017-01-18T12:12:33Z</dc:date>
    <item>
      <title>Errors:range error for small data relocation</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Errors-range-error-for-small-data-relocation/m-p/626028#M5696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;There is a struct in my [roject,like this,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef struct&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;unsigned char Count;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LabelMapping Mappings[];&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }LabelMappings;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Code warrior 10.6 shows a error of&amp;nbsp;range error for small data relocation,when i used the struct(&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;LabelMappings, show above&lt;/SPAN&gt;) in my project. There is a indefinite lengh array that support by C99 in the struct. And the code warrior supports C99. But there is a error when commpiling.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;There are two necessary conditions that lead to this error.One is the flexible array in the struct,the other I define varible ina file and refer the varible in another file.But I can't edit the files in my project.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If i set the sdata and sdata2 to 0, I can compile the project successfully.But when sdata and sdata2 is 0,my project can;t run into main().My test result,if sdata = 0 and sdata2 = 0,project can run in debug mode, and can't run in noemal mode.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I updata the new attachments,it is a whole project and can be open by code warrior 10.6.&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-338282"&gt;MPC5645S_TEST.rar&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 05:17:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Errors-range-error-for-small-data-relocation/m-p/626028#M5696</guid>
      <dc:creator>khadgaryu</dc:creator>
      <dc:date>2017-01-18T05:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Errors:range error for small data relocation</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Errors-range-error-for-small-data-relocation/m-p/626029#M5697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have to enable C99 extension. See the picture below.&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/13764i88DEBC0E42AA88F5/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;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 12:12:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Errors-range-error-for-small-data-relocation/m-p/626029#M5697</guid>
      <dc:creator>martin_kovar</dc:creator>
      <dc:date>2017-01-18T12:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Errors:range error for small data relocation</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Errors-range-error-for-small-data-relocation/m-p/626030#M5698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;In my project, I had set C99 enable before i wrote the question.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the reason is that the IDE(compiler or linker) cant support the&amp;nbsp;Flexible array which define by C99. I did a test. If i define the &amp;nbsp;&lt;SPAN&gt;Flexible array in the a.c file and i reference the&amp;nbsp;Flexible array in the a.c too. CW10.6 will don't report the error. But if i&amp;nbsp;define the &amp;nbsp;&lt;SPAN&gt;Flexible array in the a.c file and i reference the&amp;nbsp;Flexible array in the b.c. CW10.6 will report the error.So i guess the reason is IDE can't support the&amp;nbsp;Flexible array perfectly.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2017 07:18:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Errors-range-error-for-small-data-relocation/m-p/626030#M5698</guid>
      <dc:creator>khadgaryu</dc:creator>
      <dc:date>2017-02-09T07:18:50Z</dc:date>
    </item>
  </channel>
</rss>

