<?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: Linker warning after RAM section creation in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Linker-warning-after-RAM-section-creation/m-p/233364#M9182</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The warning was removed by using LOAD directive in the LCF as follows:&lt;/P&gt;&lt;P&gt;.myRamData (DATA) LOAD(0x40007B00) : {} &amp;gt; add_data_ram&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reason:&lt;/P&gt;&lt;P&gt;LOAD (...) prevents relocation by ROM copy during startup; I observed that if the LOAD is not present then in the "Memory map:", under column "ROM Address" for section ".myRamData" is set to some ROM address which is used for some other code area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;!!&lt;/P&gt;&lt;P&gt;Gopal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 May 2013 08:06:25 GMT</pubDate>
    <dc:creator>frgop</dc:creator>
    <dc:date>2013-05-10T08:06:25Z</dc:date>
    <item>
      <title>Linker warning after RAM section creation</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Linker-warning-after-RAM-section-creation/m-p/233363#M9181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Requirement:&lt;/STRONG&gt; to create a RAM section and place it a specific memory location, for MPC5606B (very simple!)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Tools used:&lt;/STRONG&gt; CW, LCF file, TRK-MPC5606B evaluation board&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;#pragma push&lt;/P&gt;&lt;P&gt;#pragma section sdata_type ".myRamData" ".myRamData"&lt;/P&gt;&lt;P&gt;extern unsigned char myU8Data; /*prototype */&lt;/P&gt;&lt;P&gt;unsigned char myU8Data; /*definition*/&lt;/P&gt;&lt;P&gt;#pragma pop&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LCF:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;MEMORY&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; boot_flash:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x00000000,&amp;nbsp;&amp;nbsp; len = 0x00010000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; interrupts_flash:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x00010000,&amp;nbsp;&amp;nbsp; len = 0x00010000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; internal_flash:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x00020000,&amp;nbsp;&amp;nbsp; len = 0x00060000 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; add_data_flash:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x00080000,&amp;nbsp;&amp;nbsp; len = 0x00000100 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; add_code_flash:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x00080100,&amp;nbsp;&amp;nbsp; len = 0x00000100 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; internal_ram:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x40000000,&amp;nbsp;&amp;nbsp; len = 0x00007B00 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; add_data_ram:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x40007B00,&amp;nbsp;&amp;nbsp; len = 0x00000100&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stack_ram:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x40007C00,&amp;nbsp;&amp;nbsp; len = 0x0400&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SECTIONS&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp; .myRamData (DATA) : {} &amp;gt; add_data_ram&lt;/P&gt;&lt;P&gt;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Result:&lt;/STRONG&gt; The result is good as I am able to see the section created in MAP file (see below)&lt;/P&gt;&lt;P&gt;.myRamData section layout&lt;/P&gt;&lt;P&gt;&amp;nbsp; Starting&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Virtual&amp;nbsp; File&lt;/P&gt;&lt;P&gt;&amp;nbsp; address&amp;nbsp; Size&amp;nbsp;&amp;nbsp; address&amp;nbsp; offset&lt;/P&gt;&lt;P&gt;&amp;nbsp; ---------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp; 00000000 000001 40007b00 00000358&amp;nbsp; 1 .myRamData&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; main.o &lt;/P&gt;&lt;P&gt;&amp;nbsp; 00000000 000001 40007b00 00000358&amp;nbsp; 1 myU8Data&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; main.o &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem faced:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;However a Linker warning is issued as follows:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Overlap of the ROM image address of .myRamData section with executable address of .text_vle section.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Project: LINFlex_LIN_Example.mcp, Target: LINFlex_LIN-flash&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;How to remove this warning.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S: If you already guessed it, then yes you are correct, I am using the example workspace for LIN that comes along with the EVB.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gopal.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2013 06:56:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Linker-warning-after-RAM-section-creation/m-p/233363#M9181</guid>
      <dc:creator>frgop</dc:creator>
      <dc:date>2013-05-10T06:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Linker warning after RAM section creation</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Linker-warning-after-RAM-section-creation/m-p/233364#M9182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The warning was removed by using LOAD directive in the LCF as follows:&lt;/P&gt;&lt;P&gt;.myRamData (DATA) LOAD(0x40007B00) : {} &amp;gt; add_data_ram&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reason:&lt;/P&gt;&lt;P&gt;LOAD (...) prevents relocation by ROM copy during startup; I observed that if the LOAD is not present then in the "Memory map:", under column "ROM Address" for section ".myRamData" is set to some ROM address which is used for some other code area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;!!&lt;/P&gt;&lt;P&gt;Gopal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2013 08:06:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Linker-warning-after-RAM-section-creation/m-p/233364#M9182</guid>
      <dc:creator>frgop</dc:creator>
      <dc:date>2013-05-10T08:06:25Z</dc:date>
    </item>
  </channel>
</rss>

