<?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: relocating code from FLASH to RAM in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/relocating-code-from-FLASH-to-RAM/m-p/280342#M10413</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sandeep,&lt;/P&gt;&lt;P&gt;You can see below a very simple example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In main.c&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;#pragma&lt;SPAN style="font-size: 10pt;"&gt; section &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;".myCodeInRAM"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; code_mode=far_abs&lt;/SPAN&gt;&lt;STRONG&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #7f0055; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #7f0055; font-size: 10pt;"&gt;&lt;EM style="color: #1f497d; font-size: 11pt; font-family: 'Calibri','sans-serif';"&gt;//For routines code_mode need to be mentioned&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;__declspec&lt;SPAN style="font-size: 10pt;"&gt;(section &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;".myCodeInRAM"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) &lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;STRONG&gt;_add&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; a , &lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; b);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;int&lt;SPAN style="font-size: 10pt;"&gt; &lt;STRONG&gt;main&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;void&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; volatile&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; i = 0;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; volatile&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; total = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&amp;nbsp;&amp;nbsp; for&lt;SPAN style="font-size: 10pt;"&gt; (;;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;total = _add(i , i);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;i++;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P align="left"&gt;__declspec &lt;SPAN style="font-size: 10pt;"&gt;(section &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;".myCodeInRAM"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) &lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;STRONG&gt;_add&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; a , &lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; b)&lt;/SPAN&gt; &lt;/P&gt;&lt;P align="left"&gt;{&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;return&lt;SPAN style="font-size: 10pt;"&gt;a + b;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt;"&gt;In .LCF&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;GROUP : {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; .my_ram (VLECODE): {&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM style="color: #1f497d; font-size: 10pt; font-family: 'Arial','sans-serif';"&gt;//instruction mode VLECODE has to mentioned&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(.myCodeInRAM) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; } &lt;/P&gt;&lt;P&gt;} &amp;gt; myram&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;Hope it helps.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;Carlos&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt; &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>Mon, 10 Jun 2013 18:33:19 GMT</pubDate>
    <dc:creator>Carlos_Musich</dc:creator>
    <dc:date>2013-06-10T18:33:19Z</dc:date>
    <item>
      <title>relocating code from FLASH to RAM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/relocating-code-from-FLASH-to-RAM/m-p/280340#M10411</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- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code warrior version: 10.3&lt;/P&gt;&lt;P&gt;Processor: MPC5605B&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to relocate a function from flash to RAM and having trouble with the linker. I have made necessary changes as per the App note AN4497. The linker is not obeying the relocation directive and placing the code at memory address of 0x000000.&amp;nbsp; I have attached the project.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Following the guideline in the appnote (AN4497) i have been successful in relocating a block of data (const data) form flash to RAM. When I try for a function I am having this trouble.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried as suggested in this post (&lt;A _jive_internal="true" data-containerid="2029" data-containertype="14" data-objectid="100196" data-objecttype="1" href="https://community.nxp.com/thread/100196"&gt;How to Copy Function from Flash to RAM &amp;amp; execute it&lt;/A&gt;) and it did not work.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandeep Sirpatil&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;in&amp;nbsp; main.c i have the following :&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;#pragma section ".myCodeInRAM" data_mode=far_abs&lt;/P&gt;&lt;P&gt;__declspec(section ".myCodeInRAM") void serviceWatchdog(void);&lt;/P&gt;&lt;P&gt;void serviceWatchdog(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; SWT.SR.R = 0x0000A602; /* Service Watchdog: write 0xA602 followed by 0xB480 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; SWT.SR.R = 0x0000B480;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;in LCF file i have:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE height="15" style="width: 115px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&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;internal_ram:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;org = 0x40000000,&amp;nbsp;&amp;nbsp; len = 0x0000D000 /* 56K */&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;myram:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;org = 0x4000D000,&amp;nbsp;&amp;nbsp; len = 0x00001000 /* 4K */&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;heap&amp;nbsp; :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;org = 0x4000E000,&amp;nbsp;&amp;nbsp; len = 0x00001000 /* 4K */&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&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;.my_ram :&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;{&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;*(myCodeInRAM)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;} &amp;gt; myram&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&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 style="font-size: 12pt;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;In the MAP file:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.my_ram 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 style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.myCodeInRAM 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 000022 00000000 00001000&amp;nbsp; 1 .myCodeInRAM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; main_c.obj&lt;/P&gt;&lt;P&gt;&amp;nbsp; 00000000 000022 00000000 00001000&amp;nbsp; 2 serviceWatchdog&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; main_c.obj&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Memory map:&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;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;.myCodeInRAM 00000000 00000024 00001000 00003800 00003800&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&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;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338806"&gt;testCodeinRam.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jun 2013 04:54:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/relocating-code-from-FLASH-to-RAM/m-p/280340#M10411</guid>
      <dc:creator>sandeepsirpatil</dc:creator>
      <dc:date>2013-06-07T04:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: relocating code from FLASH to RAM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/relocating-code-from-FLASH-to-RAM/m-p/280341#M10412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I recommend you to contact the support team via CRM system ?&lt;/P&gt;&lt;P&gt;This issue will be probably moved to another team.&lt;/P&gt;&lt;P&gt;For Technical Support Issues please use Freescale on line support web page. &lt;/P&gt;&lt;P&gt;　 - Go to following URL: &lt;A href="http://www.freescale.com/TechSupport"&gt;http://www.freescale.com/TechSupport&lt;/A&gt;&lt;/P&gt;&lt;P&gt;　 - Click on Submit a Service Request. You will come to a login page. &lt;/P&gt;&lt;P&gt;　 - If you are already registered with Freescale (using the Forum, subscribed to newsletter, ...) use your Freescale login and password. Otherwise, Click on "Register Now" to get registered.&lt;/P&gt;&lt;P&gt;　 - You can submit your request through the web from there. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else you can send an email to &lt;A href="mailto:support@freescale.com"&gt;support@freescale.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;Pascal&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2013 07:42:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/relocating-code-from-FLASH-to-RAM/m-p/280341#M10412</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2013-06-10T07:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: relocating code from FLASH to RAM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/relocating-code-from-FLASH-to-RAM/m-p/280342#M10413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sandeep,&lt;/P&gt;&lt;P&gt;You can see below a very simple example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In main.c&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;#pragma&lt;SPAN style="font-size: 10pt;"&gt; section &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;".myCodeInRAM"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; code_mode=far_abs&lt;/SPAN&gt;&lt;STRONG&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #7f0055; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #7f0055; font-size: 10pt;"&gt;&lt;EM style="color: #1f497d; font-size: 11pt; font-family: 'Calibri','sans-serif';"&gt;//For routines code_mode need to be mentioned&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;__declspec&lt;SPAN style="font-size: 10pt;"&gt;(section &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;".myCodeInRAM"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) &lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;STRONG&gt;_add&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; a , &lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; b);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;int&lt;SPAN style="font-size: 10pt;"&gt; &lt;STRONG&gt;main&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;void&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; volatile&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; i = 0;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; volatile&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; total = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&amp;nbsp;&amp;nbsp; for&lt;SPAN style="font-size: 10pt;"&gt; (;;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;total = _add(i , i);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;i++;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P align="left"&gt;__declspec &lt;SPAN style="font-size: 10pt;"&gt;(section &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;".myCodeInRAM"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) &lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;STRONG&gt;_add&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; a , &lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; b)&lt;/SPAN&gt; &lt;/P&gt;&lt;P align="left"&gt;{&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;return&lt;SPAN style="font-size: 10pt;"&gt;a + b;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt;"&gt;In .LCF&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;GROUP : {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; .my_ram (VLECODE): {&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM style="color: #1f497d; font-size: 10pt; font-family: 'Arial','sans-serif';"&gt;//instruction mode VLECODE has to mentioned&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(.myCodeInRAM) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; } &lt;/P&gt;&lt;P&gt;} &amp;gt; myram&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;Hope it helps.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;Carlos&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt; &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>Mon, 10 Jun 2013 18:33:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/relocating-code-from-FLASH-to-RAM/m-p/280342#M10413</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2013-06-10T18:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: relocating code from FLASH to RAM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/relocating-code-from-FLASH-to-RAM/m-p/280343#M10414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems to be the trick. The linker places the function at the correct address (Flash and RAM). I also tested it in my main project code and it seems to work correctly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 02:02:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/relocating-code-from-FLASH-to-RAM/m-p/280343#M10414</guid>
      <dc:creator>sandeepsirpatil</dc:creator>
      <dc:date>2013-06-11T02:02:30Z</dc:date>
    </item>
  </channel>
</rss>

