<?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 Copy flash drivers from ROM to RAM in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/Copy-flash-drivers-from-ROM-to-RAM/m-p/911381#M13609</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am using c55 flash libraries&amp;nbsp; for my controlller s32r274.So inorder to perform flash erase and write&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to copy flash libraries from ROM to RAM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this i used linker script using ld file&lt;/P&gt;&lt;P&gt;MEMORY&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt; RAM_FLASHCODE : org = 0x40010400, len = 32K&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SECTIONS&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;/* Flash code load in RAM*/&lt;BR /&gt; .flashlib : {} &amp;gt; RAM_FLASHCODE&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;After compilation i am able to see flash libraries in RAM location.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/81919i60B13738FB9A02EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But after flashing the code to ECU and during test it is not working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;During flash init ,the&amp;nbsp;control is moved to RAM,but its not executing.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/82337i79103AFD9EB6F6B9/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i need to know if i need to add some extra code during start up to execute from RAM?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Sep 2019 09:12:46 GMT</pubDate>
    <dc:creator>ponnitresa_kuri</dc:creator>
    <dc:date>2019-09-11T09:12:46Z</dc:date>
    <item>
      <title>Copy flash drivers from ROM to RAM</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Copy-flash-drivers-from-ROM-to-RAM/m-p/911381#M13609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am using c55 flash libraries&amp;nbsp; for my controlller s32r274.So inorder to perform flash erase and write&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to copy flash libraries from ROM to RAM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this i used linker script using ld file&lt;/P&gt;&lt;P&gt;MEMORY&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt; RAM_FLASHCODE : org = 0x40010400, len = 32K&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SECTIONS&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;/* Flash code load in RAM*/&lt;BR /&gt; .flashlib : {} &amp;gt; RAM_FLASHCODE&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;After compilation i am able to see flash libraries in RAM location.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/81919i60B13738FB9A02EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But after flashing the code to ECU and during test it is not working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;During flash init ,the&amp;nbsp;control is moved to RAM,but its not executing.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/82337i79103AFD9EB6F6B9/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i need to know if i need to add some extra code during start up to execute from RAM?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2019 09:12:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Copy-flash-drivers-from-ROM-to-RAM/m-p/911381#M13609</guid>
      <dc:creator>ponnitresa_kuri</dc:creator>
      <dc:date>2019-09-11T09:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Copy flash drivers from ROM to RAM</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Copy-flash-drivers-from-ROM-to-RAM/m-p/911382#M13610</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;there's simpler option which I usually use. The C-arrays are defined like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_8.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/82559iA4F9EBEA0A4898FE/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_8.png" alt="pastedImage_8.png" /&gt;&lt;/span&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you delete the "const", it won't be constant in flash but it will be automatically copied to RAM by startup files as initialized array.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2019 07:11:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Copy-flash-drivers-from-ROM-to-RAM/m-p/911382#M13610</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2019-09-12T07:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: Copy flash drivers from ROM to RAM</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Copy-flash-drivers-from-ROM-to-RAM/m-p/911383#M13611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually my source code is executing from address 0x00FD0000, and i need to erase sector 0x00FF0000.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;i moved all C55 flash libraries to RAM area and during erase operation flash libraries get executed from RAM area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;But when i am trying to s&lt;SPAN&gt;ector 0x00FF0000,the control goes to exception handlers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But if i move my application code to sector&amp;nbsp;&lt;STRONG style="font-weight: 400; "&gt;0x00FB0000 and try to erase sector&amp;nbsp;0x00FF0000,It is&amp;nbsp; working properly.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG style="font-weight: 400; "&gt;Can anyone tell me if erase operation cannot be performed if source code is running in same bank.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Sep 2019 08:05:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Copy-flash-drivers-from-ROM-to-RAM/m-p/911383#M13611</guid>
      <dc:creator>ponnitresa_kuri</dc:creator>
      <dc:date>2019-09-13T08:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Copy flash drivers from ROM to RAM</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Copy-flash-drivers-from-ROM-to-RAM/m-p/911384#M13612</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;have you tried to disable interrupts? If you need to handle interrupts also during flash operations, it’s necessary to move all resources (interrupt vector table, interrupt handlers…) to RAM or to another partition too.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Also notice that the drivers are asynchronous. That means that FlashErase function just starts the erase operation. Then FlashCheckStatus function should be used to check if the operation has been already finished. Obviously, this code which calls FlashCheckStatus function must be also placed in RAM or in different partition.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Lukas&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Sep 2019 08:36:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Copy-flash-drivers-from-ROM-to-RAM/m-p/911384#M13612</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2019-09-17T08:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Copy flash drivers from ROM to RAM</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Copy-flash-drivers-from-ROM-to-RAM/m-p/911385#M13613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mr.Lukas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;You are right ,Due to external watchdog there is interrupt for supporting watchdog refreshing functionality.&lt;/P&gt;&lt;P&gt;I have already moved&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;FlashCheckStatus to RAM area.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;But when i try to remove interrupt vector table to RAM area ,its giving me error during execution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Due you know the reason?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Sep 2019 12:58:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Copy-flash-drivers-from-ROM-to-RAM/m-p/911385#M13613</guid>
      <dc:creator>ponnitresa_kuri</dc:creator>
      <dc:date>2019-09-17T12:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Copy flash drivers from ROM to RAM</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Copy-flash-drivers-from-ROM-to-RAM/m-p/911386#M13614</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;I can't really say, this would require more debugging. I would try to put a breakpoint to IVOR4 handler and then step the code to see why it fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2019 06:59:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Copy-flash-drivers-from-ROM-to-RAM/m-p/911386#M13614</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2019-09-18T06:59:34Z</dc:date>
    </item>
  </channel>
</rss>

