<?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: S32K146 bootloader problem in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K146-bootloader-problem/m-p/1043642#M6807</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jack,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you seen any error during loading application into memory when the app code is more than 300KB, for example, in the FSTAT register?&lt;/P&gt;&lt;P&gt;Have you tried to debug the code, when is writing to the address 0x40000?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Diana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Apr 2020 14:30:21 GMT</pubDate>
    <dc:creator>dianabatrlova</dc:creator>
    <dc:date>2020-04-27T14:30:21Z</dc:date>
    <item>
      <title>S32K146 bootloader problem</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-bootloader-problem/m-p/1043637#M6802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="color: #001000; background-color: #ffffff; border: 0px; font-weight: bold; font-size: 10.5pt;"&gt;Hi，SDK&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px; font-size: 15px;"&gt;&lt;SPAN style="color: #333333; background-color: #f7f8fa; font-weight: normal; font-size: 14px;"&gt;I am developing a bootloader program for S32K146.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px; font-size: 15px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 10.5pt;"&gt;Now I am able to write my application code to the flash memory&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px; font-size: 15px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 10.5pt;"&gt;but the boot loader is not jumping to the application code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #001000; background-color: #ffffff; border: 0px; font-weight: bold; font-size: 10.5pt;"&gt;/*linker of bootloader*/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;/* Specify the memory areas */&lt;BR /&gt;MEMORY&lt;BR /&gt;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;/* Flash */&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x000DABF0&lt;BR /&gt; &lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;/* SRAM_L */&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00008000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* SRAM_U */&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x0000F000&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #001000; background-color: #ffffff; border: 0px; font-weight: bold; font-size: 10.5pt;"&gt;/*linker of application code*/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;/* Specify the memory areas */&lt;BR /&gt;MEMORY&lt;BR /&gt;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;/* Flash */&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;m_interrupts (RX) : ORIGIN = 0x00025000, LENGTH = 0x00000400&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;m_flash_config (RX) : ORIGIN = 0x00025400, LENGTH = 0x00000010&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;m_text (RX) : ORIGIN = 0x00025410, LENGTH = 0x000DABF0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* SRAM_L */&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* SRAM_U */&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x0000F000&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define APP_ENRTY_POINT_FLASH_ADDR&amp;nbsp; (0x025000UL)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="color: #2e3033; background-color: #f7f8fa; font-weight: normal; font-size: 14px;"&gt;&lt;LI style="margin: 0px 0px 10px;"&gt;&lt;P class="" data-group="1-1" style="color: #666666; font-size: 14px;"&gt;My app jump function.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;static void EnterAppPro(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*延时*/&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;TimeDelay(2000);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;WDOG_disable();&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;BSP_DISABLE_IRQ();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* 初始化中断向量表地址 */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* Check if a valid application is loaded and jump to it */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; JumpToUserApplication(*((uint32_t*)APP_ENRTY_POINT_FLASH_ADDR), *&amp;nbsp;&amp;nbsp;((uint32_t*)&amp;nbsp; (APP_ENRTY_POINT_FLASH_ADDR + 4)));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/**&lt;BR /&gt;* Used to jump to the entry point of the user application&lt;BR /&gt;* The Vector table of the user application must be located at 0x1000&lt;BR /&gt;*&lt;BR /&gt;* */&lt;BR /&gt;void JumpToUserApplication( unsigned int userSP, unsigned int userStartup)&lt;BR /&gt;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;/* Check if Entry address is erased and return if erased */&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;if(userSP == 0xFFFFFFFF){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;return;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* Set up stack pointer */&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;__asm("msr msp, r0");&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;__asm("msr psp, r0");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* Relocate vector table */&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;S32_SCB-&amp;gt;VTOR = (uint32_t)APP_ENRTY_POINT_FLASH_ADDR;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* Jump to application PC (r1) */&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;__asm("mov pc, r1");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f7f8fa; font-weight: normal; font-size: 14px;"&gt;I don't know where my code went wrong, could you give me some hints?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks~~&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2020 11:33:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-bootloader-problem/m-p/1043637#M6802</guid>
      <dc:creator>13530606925</dc:creator>
      <dc:date>2020-04-16T11:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: S32K146 bootloader problem</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-bootloader-problem/m-p/1043638#M6803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jack,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The bootloader and application address space are overlapped. I recommend changing the length of the bootloader or/and start address and length of the application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, before the jump, I recommend you to check if the application is correctly loaded into memory. For example, by memory window located in the S32DS.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&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/108422i02D872B7C8E63340/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;I hope it helps.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Diana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2020 08:34:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-bootloader-problem/m-p/1043638#M6803</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2020-04-20T08:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: S32K146 bootloader problem</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-bootloader-problem/m-p/1043639#M6804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,Diana&lt;/P&gt;&lt;P&gt;First, my program and successfully downloaded into.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;"The bootloader and application address space are overlapped."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f7f8fa; color: #333333; font-weight: normal; font-size: 14px; "&gt;Can you tell me why the addresses I configured overlap and how they are distinguished?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;How should I configure my boot file and app file separately?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2020 11:48:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-bootloader-problem/m-p/1043639#M6804</guid>
      <dc:creator>347996379</dc:creator>
      <dc:date>2020-04-20T11:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: S32K146 bootloader problem</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-bootloader-problem/m-p/1043640#M6805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your bootloader length is 0xDABF0. So, you have reserved for the bootloader 874KB&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x000DABF0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the application starts at address 0x25000 which is address located in the bootloader address space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is up to your application requirements how you split the address space.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What size of memory do you need to reserve for bootloader and application?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do you load the application into the flash memory of the MCU, do you use Srecord, hex, ... (if yes, can you share it)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The documents below can be helpful:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/docs/en/application-note/AN12218.pdf" title="https://www.nxp.com/docs/en/application-note/AN12218.pdf"&gt;https://www.nxp.com/docs/en/application-note/AN12218.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/docs/en/application-note/AN12323.pdf" title="https://www.nxp.com/docs/en/application-note/AN12323.pdf"&gt;https://www.nxp.com/docs/en/application-note/AN12323.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Diana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2020 12:35:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-bootloader-problem/m-p/1043640#M6805</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2020-04-20T12:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: S32K146 bootloader problem</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-bootloader-problem/m-p/1043641#M6806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi，Diana&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" data-group="0-0" style="color: #333333; background-color: #f7f8fa; font-weight: normal; font-size: 14px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; My code has been able to implement the bootloader function, but there is a problem in the middle.&lt;/SPAN&gt;&lt;SPAN class="" data-group="0-1" style="color: #333333; background-color: #f7f8fa; font-weight: normal; font-size: 14px;"&gt;My app code is more than 300K. In my test, boot jump to app is successful only if the app code is below 196K. Plus the size of the boot space (60K) I divided, it is exactly 256K (0x40000).&lt;/SPAN&gt;&lt;SPAN class="" data-group="0-2" style="color: #333333; background-color: #f7f8fa; font-weight: normal; font-size: 14px;"&gt;I don't know where the problem is, whether it is related to ld file.&lt;/SPAN&gt;&lt;SPAN class="" data-group="0-3" style="color: #333333; background-color: #f7f8fa; font-weight: normal; font-size: 14px;"&gt;My boot space is: 0x0000-0x0F000;&lt;/SPAN&gt;&lt;SPAN class="" data-group="0-4" style="color: #333333; background-color: #f7f8fa; font-weight: normal; font-size: 14px;"&gt;My app space is: 0x0F000-0xD0BF0. Can you give me some hints?&lt;/SPAN&gt;&lt;SPAN class="" data-group="0-5" style="color: #333333; background-color: #f7f8fa; font-weight: normal; font-size: 14px;"&gt;Looking forward to your reply, thank you very much&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2020 11:02:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-bootloader-problem/m-p/1043641#M6806</guid>
      <dc:creator>13530606925</dc:creator>
      <dc:date>2020-04-27T11:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: S32K146 bootloader problem</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-bootloader-problem/m-p/1043642#M6807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jack,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you seen any error during loading application into memory when the app code is more than 300KB, for example, in the FSTAT register?&lt;/P&gt;&lt;P&gt;Have you tried to debug the code, when is writing to the address 0x40000?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Diana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2020 14:30:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-bootloader-problem/m-p/1043642#M6807</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2020-04-27T14:30:21Z</dc:date>
    </item>
  </channel>
</rss>

