<?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>MPC5xxxのトピックRe: Make MPC5748G Boot Loader Run First</title>
    <link>https://community.nxp.com/t5/MPC5xxx/Make-MPC5748G-Boot-Loader-Run-First/m-p/1292464#M18482</link>
    <description>&lt;P&gt;As I wrote above, I confirmed that the order of possible boot header locations is correct. So, I'm pretty sure that bootloader is executed first. The question is - how do you jump to the application? What is the condition to select if bootloader or application is started?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
    <pubDate>Tue, 15 Jun 2021 09:01:12 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2021-06-15T09:01:12Z</dc:date>
    <item>
      <title>Make MPC5748G Boot Loader Run First</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Make-MPC5748G-Boot-Loader-Run-First/m-p/1291670#M18469</link>
      <description>&lt;P&gt;We have developed the MPC5748G serial bootloader which is able to flash the APP at the desired address and also able to execute the APP after jumping to the same.&lt;/P&gt;&lt;P&gt;We are using the default Serial line LINFlexD_UART2 on Devkit for this whole purpose and before jumping to the APP, we are closing the UART line and de-initializing it, so that APP runs smoothly, which is happening.&lt;/P&gt;&lt;P&gt;But, our concern is whenever we press the reset button, it's always the APP that is running first, but not the Bootloader. We want the reverse to happen. We have kept the Bootheader address of BL as&amp;nbsp;0x00FC0000 and APP as&amp;nbsp;0x00FA0000 which is searched by BAF where the BL Bootheader comes first (increasing order, high priority)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BootLoader linker Setting's :&lt;/P&gt;&lt;P&gt;/* Define FLASH */&lt;BR /&gt;FLASH_BASE_ADDR = DEFINED(__flash_base_addr__) ? __flash_base_addr__ : 0x01200000;&lt;BR /&gt;FLASH_SIZE = DEFINED(__flash_size__) ? __flash_size__ : 256k;&lt;/P&gt;&lt;P&gt;/* Define SRAM */&lt;BR /&gt;SRAM_BASE_ADDR = DEFINED(__sram_base_addr__) ? __sram_base_addr__ : 0x40000000;&lt;BR /&gt;SRAM_SIZE = DEFINED(__sram_size__) ? __sram_size__ : 256K;&lt;/P&gt;&lt;P&gt;/* Define RAppID boot data address */&lt;BR /&gt;RAPPID_BOOT_APP_DELAY_ADDR = 0x00FC0008;&lt;BR /&gt;RAPPID_BOOT_APP_KEY_ADDR = 0x00FC000C;&lt;/P&gt;&lt;P&gt;MEMORY&lt;BR /&gt;{&lt;BR /&gt;flash_rchw : org = 0x00FC0000, len = 0x4&lt;BR /&gt;cpu0_reset_vec : org = 0x00FC0000+0x10, len = 0x4&lt;BR /&gt;cpu1_reset_vec : org = 0x00FC0000+0x14, len = 0x4&lt;BR /&gt;cpu2_reset_vec : org = 0x00FC0000+0x04, len = 0x4&lt;BR /&gt;rappid_boot_data : org = 0x00FC0000+0x08, len = 0x8&lt;/P&gt;&lt;P&gt;m_text : org = FLASH_BASE_ADDR, len = FLASH_SIZE&lt;BR /&gt;m_data : org = SRAM_BASE_ADDR, len = SRAM_SIZE&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;APP Linker Setting's :&lt;/P&gt;&lt;P&gt;/* Define FLASH */&lt;BR /&gt;FLASH_BASE_ADDR = DEFINED(__flash_base_addr__) ? __flash_base_addr__ : 0x01000000;&lt;BR /&gt;FLASH_SIZE = DEFINED(__flash_size__) ? __flash_size__ : 1856K;&lt;/P&gt;&lt;P&gt;/* Define SRAM */&lt;BR /&gt;SRAM_BASE_ADDR = DEFINED(__sram_base_addr__) ? __sram_base_addr__ : 0x40000000;&lt;BR /&gt;SRAM_SIZE = DEFINED(__sram_size__) ? __sram_size__ : 256K;&lt;/P&gt;&lt;P&gt;/* Define RAppID boot data address */&lt;BR /&gt;RAPPID_BOOT_APP_DELAY_ADDR = 0x00FA0008;&lt;BR /&gt;RAPPID_BOOT_APP_KEY_ADDR = 0x00FA000C;&lt;/P&gt;&lt;P&gt;MEMORY&lt;BR /&gt;{&lt;BR /&gt;flash_rchw : org = 0x00FA0000, len = 0x4&lt;BR /&gt;cpu0_reset_vec : org = 0x00FA0000+0x10, len = 0x4&lt;BR /&gt;cpu1_reset_vec : org = 0x00FA0000+0x14, len = 0x4&lt;BR /&gt;cpu2_reset_vec : org = 0x00FA0000+0x04, len = 0x4&lt;BR /&gt;rappid_boot_data : org = 0x00FA0000+0x08, len = 0x8&lt;/P&gt;&lt;P&gt;m_text : org = FLASH_BASE_ADDR, len = FLASH_SIZE&lt;BR /&gt;m_data : org = SRAM_BASE_ADDR, len = SRAM_SIZE&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Where are we doing wrong, it is not clear, we want the Bootloader should run first and then APP,as in the case of normal BL application.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jun 2021 15:14:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Make-MPC5748G-Boot-Loader-Run-First/m-p/1291670#M18469</guid>
      <dc:creator>maharajshreekum</dc:creator>
      <dc:date>2021-06-13T15:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Make MPC5748G Boot Loader Run First</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Make-MPC5748G-Boot-Loader-Run-First/m-p/1291806#M18475</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I did quick test to be absolutely sure there's no HW issue and it works as expected. The behavior of the MCU corresponds to the documentation. I placed one boot header at 0xFC0000 and second to 0xFA0000 and I can see that 0xFC0000 is used after reset:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_0-1623660038454.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/146994i4BDF203FDB1F0700/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_0-1623660038454.png" alt="lukaszadrapa_0-1623660038454.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;lukaszadrapa_0-1623660038454.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If this doesn't work, check the boot headers. There's probably something wrong in your project.&lt;/P&gt;
&lt;P&gt;Then I saw some mention about Rappid bootloader in your description. Notice that Rappid bootloader does not use the order defined in RM to search valid boot header. It simply search from lowest address of a block to highest:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_1-1623660165824.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/146995i0F06AE46EF76FCF0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_1-1623660165824.png" alt="lukaszadrapa_1-1623660165824.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;lukaszadrapa_1-1623660165824.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 08:44:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Make-MPC5748G-Boot-Loader-Run-First/m-p/1291806#M18475</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2021-06-14T08:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: Make MPC5748G Boot Loader Run First</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Make-MPC5748G-Boot-Loader-Run-First/m-p/1291828#M18477</link>
      <description>&lt;P&gt;We have placed the BL boot header at&amp;nbsp;&lt;SPAN&gt;0xFC0000&amp;nbsp;and the application boot header at 0xFA0000. We have also verified it by reading the memory.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But when we are making the first jump to our app code, the app runs but after subsequent power resets, it always runs the app. Even though we have de-init the UART line and everything.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;We are doing jump with below commands,&lt;/P&gt;&lt;P&gt;/*Working Set direct Cmd execute*/&lt;BR /&gt;MC_ME-&amp;gt;MCTL = 0x00115AF0;&lt;BR /&gt;MC_ME-&amp;gt;MCTL = 0x0011A50F;&lt;BR /&gt;(*(void (*)(void))(*(uint32_t*)0x01000000))();&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 09:11:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Make-MPC5748G-Boot-Loader-Run-First/m-p/1291828#M18477</guid>
      <dc:creator>maharajshreekum</dc:creator>
      <dc:date>2021-06-14T09:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: Make MPC5748G Boot Loader Run First</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Make-MPC5748G-Boot-Loader-Run-First/m-p/1291874#M18479</link>
      <description>&lt;P&gt;Then it's not a problem of the hardware but it's rather a matter of your software. What can you see in your debugger after reset?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 10:49:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Make-MPC5748G-Boot-Loader-Run-First/m-p/1291874#M18479</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2021-06-14T10:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Make MPC5748G Boot Loader Run First</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Make-MPC5748G-Boot-Loader-Run-First/m-p/1291999#M18480</link>
      <description>&lt;P&gt;Yes, no issues with the HW. But that's the point, with app image running, there is no going back to bootloader code, since after reset only the app runs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do we need to erase the boot header or something of the app after it starts running. Maybe the UART line is not allowing the bootloader code to run or something. We read the memory through UART and see the boot headers of both boot loader and app image.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DbgConsole_Deinit()..We use this to de-init our uart line before making a jump to the app image.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 14:46:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Make-MPC5748G-Boot-Loader-Run-First/m-p/1291999#M18480</guid>
      <dc:creator>maharajshreekum</dc:creator>
      <dc:date>2021-06-14T14:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Make MPC5748G Boot Loader Run First</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Make-MPC5748G-Boot-Loader-Run-First/m-p/1292464#M18482</link>
      <description>&lt;P&gt;As I wrote above, I confirmed that the order of possible boot header locations is correct. So, I'm pretty sure that bootloader is executed first. The question is - how do you jump to the application? What is the condition to select if bootloader or application is started?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 09:01:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Make-MPC5748G-Boot-Loader-Run-First/m-p/1292464#M18482</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2021-06-15T09:01:12Z</dc:date>
    </item>
  </channel>
</rss>

