<?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: locate a function in RAM in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/locate-a-function-in-RAM/m-p/676094#M13922</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello julian, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just want to know which product and which version of CW you used , if kinetis , please refer to this thread to relocate function to RAM:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-101433"&gt;https://community.nxp.com/docs/DOC-101433&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Jul 2017 01:53:25 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2017-07-20T01:53:25Z</dc:date>
    <item>
      <title>locate a function in RAM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/locate-a-function-in-RAM/m-p/676093#M13921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am still battling to implement a Write a byte in EEPROM. I know that the erase/program functions must be executed from RAM and several posts discuss moving a function into RAM. My question is - Can I specify a RAM address for the necessary functions so that they reside in RAM at build time and I don't have to move them - I can just call them in the normal way (assuming I first disable interrupts). Surely this would speed up overall execution time and reduce code size. If this is possible, how do I do it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 22:36:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/locate-a-function-in-RAM/m-p/676093#M13921</guid>
      <dc:creator>juliancox</dc:creator>
      <dc:date>2017-07-19T22:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: locate a function in RAM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/locate-a-function-in-RAM/m-p/676094#M13922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello julian, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just want to know which product and which version of CW you used , if kinetis , please refer to this thread to relocate function to RAM:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-101433"&gt;https://community.nxp.com/docs/DOC-101433&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2017 01:53:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/locate-a-function-in-RAM/m-p/676094#M13922</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2017-07-20T01:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: locate a function in RAM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/locate-a-function-in-RAM/m-p/676095#M13923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using CW 10.7 and S08SH4 processor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2017 15:47:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/locate-a-function-in-RAM/m-p/676095#M13923</guid>
      <dc:creator>juliancox</dc:creator>
      <dc:date>2017-07-20T15:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: locate a function in RAM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/locate-a-function-in-RAM/m-p/676096#M13924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Julian&lt;/P&gt;&lt;P&gt;Yes, You can do it, please refer attached demo code. It was made under CW6.3 but it is easy to be imported to CW10.7.&lt;/P&gt;&lt;P&gt;Please refer S08_Flash.c, S08_Flash.h, main.c&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jennie Zhang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2017 02:14:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/locate-a-function-in-RAM/m-p/676096#M13924</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2017-07-21T02:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: locate a function in RAM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/locate-a-function-in-RAM/m-p/676097#M13925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jennie,&lt;/P&gt;&lt;P&gt;You forgot to attach the attachment!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2017 08:32:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/locate-a-function-in-RAM/m-p/676097#M13925</guid>
      <dc:creator>juliancox</dc:creator>
      <dc:date>2017-07-21T08:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: locate a function in RAM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/locate-a-function-in-RAM/m-p/676098#M13926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Julian,&lt;/P&gt;&lt;P&gt;I did attached it. see: &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/26554i0B738D4D2F23F10B/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can't you see it? if not, please send me your email, I can send it to you. I just followed you. you can add me then send your email address with message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Jennie Zhang&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Jul 2017 06:45:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/locate-a-function-in-RAM/m-p/676098#M13926</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2017-07-22T06:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: locate a function in RAM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/locate-a-function-in-RAM/m-p/676099#M13927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It eventually appeared. I think it was something to do with my browser (Safari)&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Jul 2017 10:19:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/locate-a-function-in-RAM/m-p/676099#M13927</guid>
      <dc:creator>juliancox</dc:creator>
      <dc:date>2017-07-22T10:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: locate a function in RAM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/locate-a-function-in-RAM/m-p/676100#M13928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jennie,&lt;/P&gt;&lt;P&gt;Thanks for the help. I modified your project to remove the burst programming option (not needed) and changed the .prm file as I am using a SH4 chip, not a SH8. Everything worked fine so I copied the CopyTo Ram(), FlashInit() and FlashCmd() functions into my project. FlashInit() and CopyToRam() work fine, but it fails on Erase - does not return as expected. I think that something is getting corrupted in RAM, but at this stage I don't know whether it is the stack, the relocated FlashCmd() function or the variables. More work is needed. Two questions -&lt;/P&gt;&lt;P&gt;1. Do I need to disable interrupts during erase and program?&lt;/P&gt;&lt;P&gt;2. Can I debug the FlashCmd with the USBDM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Julian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jul 2017 09:51:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/locate-a-function-in-RAM/m-p/676100#M13928</guid>
      <dc:creator>juliancox</dc:creator>
      <dc:date>2017-07-31T09:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: locate a function in RAM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/locate-a-function-in-RAM/m-p/676101#M13929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Julian,&lt;/P&gt;&lt;P&gt;Regarding to your questions&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;1. Do I need to disable interrupts during erase and program?&lt;/P&gt;&lt;P&gt;Yes, you do. Because erase/program can't be successfully if they are interrupted during the time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;2. Can I debug the FlashCmd with the USBDM?&lt;/P&gt;&lt;P&gt;yes. but please note we can't step over the FlashCmd code, it will destroy the erase/program time sequence.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jennie Zhang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2017 09:03:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/locate-a-function-in-RAM/m-p/676101#M13929</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2017-08-02T09:03:11Z</dc:date>
    </item>
  </channel>
</rss>

