<?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: XRT1042 - Issue when jump from L2 boot to app with offset in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/XRT1042-Issue-when-jump-from-L2-boot-to-app-with-offset/m-p/1770815#M27908</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/176747"&gt;@riccardo_carlot&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From what I understand, you are looking into the possibility of using flash remapping feature to be able to switch between two applications.&lt;/P&gt;
&lt;P&gt;My question is would that switch happen at boot time or can happen at runtime? will this be needed in case of FW update?&lt;/P&gt;
&lt;P&gt;The flash remapping feature you are leveraging with GPIO_IOMUXC_GPR_GPR30/31/32 registers is&amp;nbsp; supported by the ROM. It allows you to download two firmware to the flash, and easily switch the firmware by calling the&amp;nbsp;API function.&lt;/P&gt;
&lt;P&gt;You can refer to this AN for this topic:&amp;nbsp;&lt;A href="https://www.nxp.com/docs/en/application-note/AN12255.pdf" target="_blank"&gt;https://www.nxp.com/docs/en/application-note/AN12255.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Using this ROM api will allow you to manage the version of the application in case of FW update and will allow you to check the authenticity of your new FW at boot time ( through secure boot process)&lt;/P&gt;
&lt;P&gt;We also have developed an open source SBL project that you can leverage in your case:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/nxp-mcuxpresso/sbl/tree/master" target="_blank"&gt;https://github.com/nxp-mcuxpresso/sbl&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps!&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Nada&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Dec 2023 13:53:06 GMT</pubDate>
    <dc:creator>nada_lakhal</dc:creator>
    <dc:date>2023-12-07T13:53:06Z</dc:date>
    <item>
      <title>XRT1042 - Issue when jump from L2 boot to app with offset</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/XRT1042-Issue-when-jump-from-L2-boot-to-app-with-offset/m-p/1769779#M27897</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm working on&amp;nbsp; a L2Boot on EVK-XRT1040. I'm testing the possibility to manage two application images without swapping them.&lt;BR /&gt;I know I have to use the three IOMUXC registers, IOMUXC_GPR30,&amp;nbsp;IOMUXC_GPR31, and&amp;nbsp;IOMUXC_GPR32 to create and offset to the application.&lt;/P&gt;&lt;P&gt;My first temptative was a jump without offset, it run properly.&lt;BR /&gt;The second temptative was the jump with an offset, and here I have the problem.&lt;/P&gt;&lt;P&gt;This is my flash design:&lt;/P&gt;&lt;P&gt;L2_Boot:&amp;nbsp; &amp;nbsp;0x6000_0000 - 0x6001_0000&amp;nbsp;&lt;/P&gt;&lt;P&gt;App1:&amp;nbsp; &amp;nbsp;0x6002_0000 - 0x6004_0000&lt;/P&gt;&lt;P&gt;App2:&amp;nbsp; &amp;nbsp;0x6006_0000 - 0x6008_0000&lt;/P&gt;&lt;P&gt;Both App1 and App2 are compiled in the range of App1 (0x6002_0000 - 0x6004_0000)&lt;/P&gt;&lt;P&gt;App1 and App2 are the same code,&amp;nbsp; they are just a simple blinking led example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;First temptative - jump with no offset&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I loaded the App at address 0x6002_0000, this is the code of my L2 boot at the jump:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="riccardo_carlot_0-1701866088151.png" style="width: 577px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/253224i4043718422BE82B2/image-dimensions/577x290?v=v2" width="577" height="290" role="button" title="riccardo_carlot_0-1701866088151.png" alt="riccardo_carlot_0-1701866088151.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It works properly, after the jump the debugger stops to follow the code (no errors appear) and the App blinking led starts to run as expected.&lt;/P&gt;&lt;P&gt;This is good.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Second temptative - jump with offset&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Starting from a mass erase, I loaded the same App used previously (compiled at address 0x6002_0000) at address 0x6006_0000, I defined the offset and relative regions (setting IOMUX_GPRx). This is the code:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="riccardo_carlot_1-1701866304814.png" style="width: 655px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/253225i4EC1A42BBDFEA8FF/image-dimensions/655x384?v=v2" width="655" height="384" role="button" title="riccardo_carlot_1-1701866304814.png" alt="riccardo_carlot_1-1701866304814.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In this case the jump to App doesn't run as expected , I mean when the debugger enters the farewellBootloader() it gives me the following error and the blinking led example doesn't start.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="riccardo_carlot_2-1701866594726.png" style="width: 549px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/253226iAF39FD7C2AF53C02/image-dimensions/549x252?v=v2" width="549" height="252" role="button" title="riccardo_carlot_2-1701866594726.png" alt="riccardo_carlot_2-1701866594726.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is wrong in my jump with offset?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your support&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 12:47:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/XRT1042-Issue-when-jump-from-L2-boot-to-app-with-offset/m-p/1769779#M27897</guid>
      <dc:creator>riccardo_carlot</dc:creator>
      <dc:date>2023-12-06T12:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: XRT1042 - Issue when jump from L2 boot to app with offset</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/XRT1042-Issue-when-jump-from-L2-boot-to-app-with-offset/m-p/1770815#M27908</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/176747"&gt;@riccardo_carlot&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From what I understand, you are looking into the possibility of using flash remapping feature to be able to switch between two applications.&lt;/P&gt;
&lt;P&gt;My question is would that switch happen at boot time or can happen at runtime? will this be needed in case of FW update?&lt;/P&gt;
&lt;P&gt;The flash remapping feature you are leveraging with GPIO_IOMUXC_GPR_GPR30/31/32 registers is&amp;nbsp; supported by the ROM. It allows you to download two firmware to the flash, and easily switch the firmware by calling the&amp;nbsp;API function.&lt;/P&gt;
&lt;P&gt;You can refer to this AN for this topic:&amp;nbsp;&lt;A href="https://www.nxp.com/docs/en/application-note/AN12255.pdf" target="_blank"&gt;https://www.nxp.com/docs/en/application-note/AN12255.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Using this ROM api will allow you to manage the version of the application in case of FW update and will allow you to check the authenticity of your new FW at boot time ( through secure boot process)&lt;/P&gt;
&lt;P&gt;We also have developed an open source SBL project that you can leverage in your case:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/nxp-mcuxpresso/sbl/tree/master" target="_blank"&gt;https://github.com/nxp-mcuxpresso/sbl&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps!&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Nada&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 13:53:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/XRT1042-Issue-when-jump-from-L2-boot-to-app-with-offset/m-p/1770815#M27908</guid>
      <dc:creator>nada_lakhal</dc:creator>
      <dc:date>2023-12-07T13:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: XRT1042 - Issue when jump from L2 boot to app with offset</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/XRT1042-Issue-when-jump-from-L2-boot-to-app-with-offset/m-p/1772207#M27936</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/75832"&gt;@nada_lakhal&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;thank for your interest on my problem.&lt;BR /&gt;Yes, I'm&amp;nbsp;&lt;SPAN&gt;looking into the possibility of using flash remapping feature to switch from two different applications, but the jump into the two application has to be done from my second level boot, not from ROM boot.&amp;nbsp;&lt;BR /&gt;I read the AN12255 but it doesn't explain my issue, could you please help me on understanding what is wrong on my code?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Riccardo&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 10:09:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/XRT1042-Issue-when-jump-from-L2-boot-to-app-with-offset/m-p/1772207#M27936</guid>
      <dc:creator>riccardo_carlot</dc:creator>
      <dc:date>2023-12-11T10:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: XRT1042 - Issue when jump from L2 boot to app with offset</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/XRT1042-Issue-when-jump-from-L2-boot-to-app-with-offset/m-p/1774816#M28016</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/176747"&gt;@riccardo_carlot&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you try with the same offset as in the following example:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nada_lakhal_0-1702557461058.png" style="width: 484px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/254445i29A7A496BA2431C5/image-dimensions/484x227?v=v2" width="484" height="227" role="button" title="nada_lakhal_0-1702557461058.png" alt="nada_lakhal_0-1702557461058.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look how we do it in the example:&lt;/P&gt;
&lt;P&gt;GPR30 start address&lt;/P&gt;
&lt;P&gt;GPR31 end address of first partition&lt;/P&gt;
&lt;P&gt;GPR32 offset (start of second image)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the second firmware should remap to&amp;nbsp;@60010000 according to the offset setting&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Nada&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 12:52:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/XRT1042-Issue-when-jump-from-L2-boot-to-app-with-offset/m-p/1774816#M28016</guid>
      <dc:creator>nada_lakhal</dc:creator>
      <dc:date>2023-12-14T12:52:18Z</dc:date>
    </item>
  </channel>
</rss>

