<?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: bootloader跳转到sdram的问题 in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/bootloader%E8%B7%B3%E8%BD%AC%E5%88%B0sdram%E7%9A%84%E9%97%AE%E9%A2%98/m-p/1564033#M22779</link>
    <description>&lt;P&gt;the bootloader uses ram.icf link file&lt;/P&gt;</description>
    <pubDate>Mon, 05 Dec 2022 04:15:57 GMT</pubDate>
    <dc:creator>jingyangxie</dc:creator>
    <dc:date>2022-12-05T04:15:57Z</dc:date>
    <item>
      <title>bootloader跳转到sdram的问题</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/bootloader%E8%B7%B3%E8%BD%AC%E5%88%B0sdram%E7%9A%84%E9%97%AE%E9%A2%98/m-p/1564021#M22778</link>
      <description>&lt;P&gt;我有一块1170的板卡，现在想实现的功能是bootloader读取U盘中的文件，然后载入到SDRAM中，最后跳转到SDRAM的指定地址（应用的起始地址）去运行程序，现在问题如下：&lt;/P&gt;&lt;P&gt;bootloader能正常识别U盘并读取镜像文件，参考官方bootloader的例程，通过&lt;/P&gt;&lt;P&gt;static void get_user_application_entry(uint32_t *appEntry, uint32_t *appStack)&lt;BR /&gt;{&lt;BR /&gt;assert(appEntry);&lt;BR /&gt;assert(appStack);&lt;/P&gt;&lt;P&gt;*appEntry = APP_VECTOR_TABLE[kInitialPC];&lt;BR /&gt;*appStack = APP_VECTOR_TABLE[kInitialSP];&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;此函数能获取AppEntry和appStack，调试发现appEntry为0x8007c1e1(与应用map文件对应为Reset_Handler的地址），appStack为0x20040000 ,与应用map文件一致：&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jingyangxie_1-1670212465733.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/202859iFB0B9DBAD4CFE0C9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jingyangxie_1-1670212465733.png" alt="jingyangxie_1-1670212465733.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jingyangxie_0-1670212443591.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/202858iD5E508D2E07D4012/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jingyangxie_0-1670212443591.png" alt="jingyangxie_0-1670212443591.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;整个跳转的主体函数如下&lt;/P&gt;&lt;P&gt;static void jump_to_application(void)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;uint32_t applicationAddress, stackPointer;&lt;/P&gt;&lt;P&gt;get_user_application_entry(&amp;amp;applicationAddress, &amp;amp;stackPointer);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;__disable_irq();&lt;BR /&gt;// Create the function call to the user application.&lt;BR /&gt;// Static variables are needed since changed the stack pointer out from under the compiler&lt;BR /&gt;// we need to ensure the values we are using are not stored on the previous stack&lt;BR /&gt;static uint32_t s_stackPointer = 0;&lt;BR /&gt;s_stackPointer = stackPointer;&lt;BR /&gt;static void (*farewellBootloader)(void) = 0;&lt;BR /&gt;farewellBootloader = (void (*)(void))applicationAddress;&lt;/P&gt;&lt;P&gt;// Set the VTOR to the application vector table address.&lt;BR /&gt;SCB-&amp;gt;VTOR = (uint32_t)BL_APP_VECTOR_TABLE_ADDRESS;//BL_APP_VECTOR_TABLE_ADDRESS -- 0x80040000&lt;/P&gt;&lt;P&gt;// Set stack pointers to the application stack pointer.&lt;BR /&gt;__set_MSP(s_stackPointer);&lt;BR /&gt;__set_PSP(s_stackPointer);&lt;/P&gt;&lt;P&gt;// Jump to the application.&lt;BR /&gt;farewellBootloader();&lt;BR /&gt;usb_echo("never goto here.\r\n");&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 03:57:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/bootloader%E8%B7%B3%E8%BD%AC%E5%88%B0sdram%E7%9A%84%E9%97%AE%E9%A2%98/m-p/1564021#M22778</guid>
      <dc:creator>jingyangxie</dc:creator>
      <dc:date>2022-12-05T03:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: bootloader跳转到sdram的问题</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/bootloader%E8%B7%B3%E8%BD%AC%E5%88%B0sdram%E7%9A%84%E9%97%AE%E9%A2%98/m-p/1564033#M22779</link>
      <description>&lt;P&gt;the bootloader uses ram.icf link file&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 04:15:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/bootloader%E8%B7%B3%E8%BD%AC%E5%88%B0sdram%E7%9A%84%E9%97%AE%E9%A2%98/m-p/1564033#M22779</guid>
      <dc:creator>jingyangxie</dc:creator>
      <dc:date>2022-12-05T04:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: bootloader跳转到sdram的问题</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/bootloader%E8%B7%B3%E8%BD%AC%E5%88%B0sdram%E7%9A%84%E9%97%AE%E9%A2%98/m-p/1566721#M22869</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/114784"&gt;@jingyangxie&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;那您的问题是？&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards，&lt;/P&gt;
&lt;P&gt;Jing&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 09:14:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/bootloader%E8%B7%B3%E8%BD%AC%E5%88%B0sdram%E7%9A%84%E9%97%AE%E9%A2%98/m-p/1566721#M22869</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2022-12-08T09:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: bootloader跳转到sdram的问题</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/bootloader%E8%B7%B3%E8%BD%AC%E5%88%B0sdram%E7%9A%84%E9%97%AE%E9%A2%98/m-p/1566817#M22872</link>
      <description>&lt;P&gt;我之前的问题是跳转不成功，现在已经搞定了&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 11:18:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/bootloader%E8%B7%B3%E8%BD%AC%E5%88%B0sdram%E7%9A%84%E9%97%AE%E9%A2%98/m-p/1566817#M22872</guid>
      <dc:creator>jingyangxie</dc:creator>
      <dc:date>2022-12-08T11:18:42Z</dc:date>
    </item>
  </channel>
</rss>

