<?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 file: copy defined section from ROM to RAM in CodeWarrior Development Tools</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/linker-file-copy-defined-section-from-ROM-to-RAM/m-p/276168#M408</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christophe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please provide me your application ?&lt;/P&gt;&lt;P&gt;For details you can refer to the \CW MCU v10.5\MCU\Help\PDF\MCU_Power-Architecture_Compiler.pdf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pascal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Mar 2014 08:09:08 GMT</pubDate>
    <dc:creator>trytohelp</dc:creator>
    <dc:date>2014-03-12T08:09:08Z</dc:date>
    <item>
      <title>linker file: copy defined section from ROM to RAM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/linker-file-copy-defined-section-from-ROM-to-RAM/m-p/276165#M405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to add a section that will include calibration data stored in data flash and loaded in RAM at startup.&lt;/P&gt;&lt;P&gt;The firmware can modify these data in RAM and erase/program the data flash block with updated values.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I created these sections in the .lcf file:&lt;/P&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;GROUP :&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .calibration_dataflash : {}&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; . = ALIGN (0x4000);&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .fee1_dataflash : {}&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; . = ALIGN (0x4000);&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .fee2_dataflash2 : {}&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; . = ALIGN (0x4000);&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .history_dataflash : {}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;gt; internal_dataflash&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;__CALIB_ROM_START = ADDR(&lt;SPAN style="font-family: courier new,courier;"&gt;.calibration_dataflash&lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GROUP :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .calibration LOAD(__CALIB_ROM_START): &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; . = ALIGN (0x4);&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; *(.calibration_data)&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; . = ALIGN (0x4);&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; *(.calibration_crc)&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; . = ALIGN (0x8);&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;gt; calibration_ram&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;__CALIB_RAM_START = ADDR(.calibration);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;__CALIB_RAM_END = ADDR(.calibration) + SIZEOF(.calibration);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my header file I defined:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;#pragma section&amp;nbsp; ".calibration"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;#define __CALIBRATION __declspec(section ".calibration")&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But at compilation I have the following error:&lt;/P&gt;&lt;P&gt;&amp;gt;Linker command file output section '.calibration' has a type or input which &lt;/P&gt;&lt;P&gt;&amp;gt;is incompatible with&lt;/P&gt;&lt;P&gt;&amp;gt;section '.calibration' in file&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I searched in many files and discussions but I haven't found the solution. Any idea ?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Environment: CW 10.5 for MPC5604B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2014 13:55:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/linker-file-copy-defined-section-from-ROM-to-RAM/m-p/276165#M405</guid>
      <dc:creator>christophe74</dc:creator>
      <dc:date>2014-03-05T13:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: linker file: copy defined section from ROM to RAM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/linker-file-copy-defined-section-from-ROM-to-RAM/m-p/276166#M406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bonjour Christophe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have lot of expertise with MPC5604B processor but I've tried to reproduce the problem&amp;nbsp; on my side.&lt;/P&gt;&lt;P&gt;I've just created a project with the wizard and added your lcf and source modification in MPC5604B_RAM.lcf and main.c file.&lt;/P&gt;&lt;P&gt;Attached you will find the project added.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keep in mind I don't try to create a "running code".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pascal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 15:44:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/linker-file-copy-defined-section-from-ROM-to-RAM/m-p/276166#M406</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2014-03-10T15:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: linker file: copy defined section from ROM to RAM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/linker-file-copy-defined-section-from-ROM-to-RAM/m-p/276167#M407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bonjour Pascal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer.&lt;/P&gt;&lt;P&gt;Restarting with your example I finally managed to place my variables a the right address. At least when I check .map file for RAM placement and .mot file for ROM placement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I still have a warning at compilation:&lt;/P&gt;&lt;P&gt;=__CALIBRATION uint16_t test1 = 0x2222;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;gt;'RW' object 'test1' is being put into section '.calibration_data' with access&lt;/P&gt;&lt;P&gt;&amp;gt;permission 'R';&lt;/P&gt;&lt;P&gt;&amp;gt;section's access permission will be changed to 'RW'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I add (RW) information on calibration_ram line in memory section:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;calibration_ram (RW): &lt;/TD&gt;&lt;TD&gt;org = 0x40005000,&amp;nbsp;&amp;nbsp; len = 0x00001000 /* 4K */&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt; I got an error:&lt;/P&gt;&lt;P&gt;&amp;gt;':' expected in command file at line '42'.&lt;/P&gt;&lt;P&gt;Does the linker file syntax changed in eclipse ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And adding the DATA filter type at .calibration line:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .calibration (DATA) LOAD(__CALIB_ROM_START): &lt;/P&gt;&lt;P&gt;doesn't change anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I ignore the warning and launch a debug session, I got a Codewarrior alert:&lt;/P&gt;&lt;P&gt;Memory area from address 0x00080000 with size c is restricted for write in the memory configuration file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do I have to change in lcf file to solve this problem ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christophe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2014 16:38:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/linker-file-copy-defined-section-from-ROM-to-RAM/m-p/276167#M407</guid>
      <dc:creator>christophe74</dc:creator>
      <dc:date>2014-03-11T16:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: linker file: copy defined section from ROM to RAM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/linker-file-copy-defined-section-from-ROM-to-RAM/m-p/276168#M408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christophe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please provide me your application ?&lt;/P&gt;&lt;P&gt;For details you can refer to the \CW MCU v10.5\MCU\Help\PDF\MCU_Power-Architecture_Compiler.pdf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pascal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2014 08:09:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/linker-file-copy-defined-section-from-ROM-to-RAM/m-p/276168#M408</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2014-03-12T08:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: linker file: copy defined section from ROM to RAM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/linker-file-copy-defined-section-from-ROM-to-RAM/m-p/276169#M409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pascal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I solved the warning problem by inserting a RW filter in the pragma line:&lt;/P&gt;&lt;P&gt;#pragma section&amp;nbsp; RW ".calibration_data"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The codewarrior alert in debug session was due to an invalid address for internal_dataflash in the memory section of .lcf file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christophe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2014 13:50:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/linker-file-copy-defined-section-from-ROM-to-RAM/m-p/276169#M409</guid>
      <dc:creator>christophe74</dc:creator>
      <dc:date>2014-03-12T13:50:42Z</dc:date>
    </item>
  </channel>
</rss>

