<?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: Strange ROM image addresses for .sdata and .sdata2 sections in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Strange-ROM-image-addresses-for-sdata-and-sdata2-sections/m-p/167314#M4987</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="j-thread-pointer j-ui-elem"&gt;&lt;/SPAN&gt;&lt;A name="307670"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;H6&gt;&lt;SPAN class="thisCorrect"&gt;&lt;SPAN class="jive-icon-discussion-okay jive-icon-med"&gt;&lt;/SPAN&gt;&lt;SPAN class="jive-thread-reply-message-correct-label font-color-okay"&gt;Réponse correcte&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;A _jive_internal="true" class="font-color-meta-light" href="https://community.nxp.com/message/307670#307670"&gt;Re: Strange ROM image addresses for .sdata and .sdata2 sections&lt;/A&gt; &lt;/STRONG&gt;&lt;/H6&gt;&lt;P class="j-post-avatar"&gt;&lt;A _jive_internal="true" class="j-avatar jiveTT-hover-user" data-avatarid="1034" data-externalid="" data-presence="null" data-userid="206391" data-username="pierreschmidt" href="https://community.nxp.com/people/pierreschmidt"&gt;&lt;IMG alt="Pierre SCHMIDT" border="0" class="jiveImage jive-avatar" data-height="46" height="46" src="https://community.nxp.com/people/pierreschmidt/avatar/46.png?a=1034" width="46" /&gt;&lt;/A&gt; &lt;SPAN class="j-status-levels"&gt;&lt;IMG alt="Level 1" class="jiveImage" src="https://community.nxp.com/5.0.3/images/status/statusicon-47.gif" title="Level 1" /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author"&gt;&lt;STRONG&gt;&lt;A href="https://community.nxp.com/people/pierreschmidt"&gt;pierreschmidt&lt;/A&gt; &lt;/STRONG&gt;22 nov. 2012 09:40 &lt;SPAN class="font-color-meta-light j-thread-replyto"&gt;(&lt;A _jive_internal="true" class="font-color-meta-light localScroll" href="https://community.nxp.com/thread/301725#306087" title="Aller au message"&gt;en réponse à Pierre SCHMIDT&lt;/A&gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="j-ui-elem j-dotted-star"&gt;&lt;/SPAN&gt;&lt;A class="j-correct-star j-ui-elem j-star popped"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;:SECTION&amp;gt;&amp;nbsp; &lt;/P&gt;&lt;P class="jive-thread-post-moderating"&gt;&lt;SPAN class="jive-icon-med jive-icon-moderation"&gt;&lt;/SPAN&gt;En cours de modération &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;I finally found out what was wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the .lcf file (originally from a windriver project) .sdata2 section was defined as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.sdata2 LOAD(ADDR(.sdata2) - ADDR(RAMCODE) + __TEXT_ROM)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This definition causes bad ROM image address calculation, so I made changes by adding (&amp;nbsp; ) to the RAMCODE size calculation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.sdata2 LOAD((ADDR(.sdata2) - ADDR(RAMCODE)) + __TEXT_ROM)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is OK and it means the compiler gives priority to the + operator over -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pierre&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Nov 2012 16:44:15 GMT</pubDate>
    <dc:creator>pierreschmidt</dc:creator>
    <dc:date>2012-11-22T16:44:15Z</dc:date>
    <item>
      <title>Strange ROM image addresses for .sdata and .sdata2 sections</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Strange-ROM-image-addresses-for-sdata-and-sdata2-sections/m-p/167313#M4986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my MPC5668&amp;nbsp; project the .lcf file defines the .sdata and .sdata2 sections as beeing part of the RAM, but I also generate a ROM image, so the sections are generated at ROM addresses.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that for some reason I cannot explain those sections are generated at some invalid addresses. Here is the memory map from the .map file:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Memory map:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Starting Size File ROM RAM Buffer S-Record&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;address Offset Address Address Line&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;APPLVECT_FROMCAN 00010000 00000008 000002e0 00010000 00010000 2&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.text1 00010010 000000f0 000002f0 00010010 00010010 3&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FBLHEADER 00010100 00000030 000003e0 00010100 00010100 15&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.text_e 00010130 00000000 00000410 00010130 00010130 0&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.text 00010130 00000000 00000410 00010130 00010130 0&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.ctors 00010130 00000000 00000410 00010130 00010130 0&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.dtors 00010130 00000000 00000410 00010130 00010130 0&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.oscode 00010130 00000000 00000410 00010130 00010130 0&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.osconst 00010130 00000000 00000410 00010130 00010130 0&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.ossconst 00010130 00000000 00000410 00010130 00010130 0&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.osstring 00010130 00000000 00000410 00010130 00010130 0&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;APPLVECT 00010130 00000060 00000410 00010130 00010130 18&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FLASHROM 00010190 000002f0 00000470 00010190 00010190 23&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EEPDATA 40004000 00000100 00000760 00010480 00010480 0&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.data 40004100 00000000 00000760 40004100 40004100 0&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;.sdata 40004100 00000000 00000760 bfffbf00 bfffbf00 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.sbss 40004100 000003c0 00000760 00010480 00010480 0&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.bss 400044c0 00018cc0 00000760 00010480 00010480 0&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.osdata 4001d180 00000000 00000760 00010480 00010480 0&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.ossdata 4001d180 00000000 00000760 00010480 00010480 0&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RAMCODE 4001d180 0000da34 00000760 00010480 00010480 61&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;.sdata2 4002abb8 000003e0 0000e198 ffffd5b8 ffffd5b8 2854&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When the programmer sees ffffd5b8, it just tells it is an invalid address and doesn't burn the .sdata2 section.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So how to change that to have those sections at right addresses just after RAMCODE for example.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.SCHMIDT&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2012 16:35:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Strange-ROM-image-addresses-for-sdata-and-sdata2-sections/m-p/167313#M4986</guid>
      <dc:creator>pierreschmidt</dc:creator>
      <dc:date>2012-11-07T16:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Strange ROM image addresses for .sdata and .sdata2 sections</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Strange-ROM-image-addresses-for-sdata-and-sdata2-sections/m-p/167314#M4987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="j-thread-pointer j-ui-elem"&gt;&lt;/SPAN&gt;&lt;A name="307670"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;H6&gt;&lt;SPAN class="thisCorrect"&gt;&lt;SPAN class="jive-icon-discussion-okay jive-icon-med"&gt;&lt;/SPAN&gt;&lt;SPAN class="jive-thread-reply-message-correct-label font-color-okay"&gt;Réponse correcte&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;A _jive_internal="true" class="font-color-meta-light" href="https://community.nxp.com/message/307670#307670"&gt;Re: Strange ROM image addresses for .sdata and .sdata2 sections&lt;/A&gt; &lt;/STRONG&gt;&lt;/H6&gt;&lt;P class="j-post-avatar"&gt;&lt;A _jive_internal="true" class="j-avatar jiveTT-hover-user" data-avatarid="1034" data-externalid="" data-presence="null" data-userid="206391" data-username="pierreschmidt" href="https://community.nxp.com/people/pierreschmidt"&gt;&lt;IMG alt="Pierre SCHMIDT" border="0" class="jiveImage jive-avatar" data-height="46" height="46" src="https://community.nxp.com/people/pierreschmidt/avatar/46.png?a=1034" width="46" /&gt;&lt;/A&gt; &lt;SPAN class="j-status-levels"&gt;&lt;IMG alt="Level 1" class="jiveImage" src="https://community.nxp.com/5.0.3/images/status/statusicon-47.gif" title="Level 1" /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author"&gt;&lt;STRONG&gt;&lt;A href="https://community.nxp.com/people/pierreschmidt"&gt;pierreschmidt&lt;/A&gt; &lt;/STRONG&gt;22 nov. 2012 09:40 &lt;SPAN class="font-color-meta-light j-thread-replyto"&gt;(&lt;A _jive_internal="true" class="font-color-meta-light localScroll" href="https://community.nxp.com/thread/301725#306087" title="Aller au message"&gt;en réponse à Pierre SCHMIDT&lt;/A&gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="j-ui-elem j-dotted-star"&gt;&lt;/SPAN&gt;&lt;A class="j-correct-star j-ui-elem j-star popped"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;:SECTION&amp;gt;&amp;nbsp; &lt;/P&gt;&lt;P class="jive-thread-post-moderating"&gt;&lt;SPAN class="jive-icon-med jive-icon-moderation"&gt;&lt;/SPAN&gt;En cours de modération &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;I finally found out what was wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the .lcf file (originally from a windriver project) .sdata2 section was defined as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.sdata2 LOAD(ADDR(.sdata2) - ADDR(RAMCODE) + __TEXT_ROM)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This definition causes bad ROM image address calculation, so I made changes by adding (&amp;nbsp; ) to the RAMCODE size calculation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.sdata2 LOAD((ADDR(.sdata2) - ADDR(RAMCODE)) + __TEXT_ROM)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is OK and it means the compiler gives priority to the + operator over -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pierre&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2012 16:44:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Strange-ROM-image-addresses-for-sdata-and-sdata2-sections/m-p/167314#M4987</guid>
      <dc:creator>pierreschmidt</dc:creator>
      <dc:date>2012-11-22T16:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Strange ROM image addresses for .sdata and .sdata2 sections</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Strange-ROM-image-addresses-for-sdata-and-sdata2-sections/m-p/167315#M4988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pierre, &lt;/P&gt;&lt;P&gt;Thank you very much for sharing your resolution!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 22:37:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Strange-ROM-image-addresses-for-sdata-and-sdata2-sections/m-p/167315#M4988</guid>
      <dc:creator>Monica</dc:creator>
      <dc:date>2012-12-12T22:37:55Z</dc:date>
    </item>
  </channel>
</rss>

