<?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 S32K312 bootloader jump to application issue in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K312-bootloader-jump-to-application-issue/m-p/1795729#M31097</link>
    <description>&lt;P&gt;Hello! I'm developing s32k312 bootloader, but when jump to app, it always stuck in "HardFault_Handler".&lt;/P&gt;&lt;P&gt;Bootloader range: 0x400000 - 0x4fffff,App range: 0x500000 - end, RTD version: 3.0.0&lt;/P&gt;&lt;P&gt;This is my jump code in bootloader:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vandarkholme_0-1706235328073.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/260152iF3CDDF9A7CED8CDA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vandarkholme_0-1706235328073.png" alt="Vandarkholme_0-1706235328073.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Boot &amp;amp; app already downloaded by Jlink, so I put jump code before bsp_init&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vandarkholme_1-1706235473126.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/260153i2EFEC76ACBA16703/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vandarkholme_1-1706235473126.png" alt="Vandarkholme_1-1706235473126.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is app's map&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vandarkholme_2-1706236042357.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/260159iB18EF56F4051BBAA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vandarkholme_2-1706236042357.png" alt="Vandarkholme_2-1706236042357.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I tried a lot solutions in forum, but not work. Should I do some remapping stuff or something else?&lt;/P&gt;&lt;P&gt;Best Regards!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jan 2024 02:33:17 GMT</pubDate>
    <dc:creator>Vandarkholme</dc:creator>
    <dc:date>2024-01-26T02:33:17Z</dc:date>
    <item>
      <title>S32K312 bootloader jump to application issue</title>
      <link>https://community.nxp.com/t5/S32K/S32K312-bootloader-jump-to-application-issue/m-p/1795729#M31097</link>
      <description>&lt;P&gt;Hello! I'm developing s32k312 bootloader, but when jump to app, it always stuck in "HardFault_Handler".&lt;/P&gt;&lt;P&gt;Bootloader range: 0x400000 - 0x4fffff,App range: 0x500000 - end, RTD version: 3.0.0&lt;/P&gt;&lt;P&gt;This is my jump code in bootloader:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vandarkholme_0-1706235328073.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/260152iF3CDDF9A7CED8CDA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vandarkholme_0-1706235328073.png" alt="Vandarkholme_0-1706235328073.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Boot &amp;amp; app already downloaded by Jlink, so I put jump code before bsp_init&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vandarkholme_1-1706235473126.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/260153i2EFEC76ACBA16703/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vandarkholme_1-1706235473126.png" alt="Vandarkholme_1-1706235473126.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is app's map&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vandarkholme_2-1706236042357.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/260159iB18EF56F4051BBAA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vandarkholme_2-1706236042357.png" alt="Vandarkholme_2-1706236042357.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I tried a lot solutions in forum, but not work. Should I do some remapping stuff or something else?&lt;/P&gt;&lt;P&gt;Best Regards!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 02:33:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K312-bootloader-jump-to-application-issue/m-p/1795729#M31097</guid>
      <dc:creator>Vandarkholme</dc:creator>
      <dc:date>2024-01-26T02:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: S32K312 bootloader jump to application issue</title>
      <link>https://community.nxp.com/t5/S32K/S32K312-bootloader-jump-to-application-issue/m-p/1795971#M31116</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/227912"&gt;@Vandarkholme&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Can you use this code?&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;func = *(UINT32 volatile *)(0x500000 + 0xC);
func = *(UINT32 volatile *)(((UINT32)func) + 0x4);
func = (((UINT32)func) &amp;amp; 0xFFFFFFFEU);
(* (void (*) (void)) func)();&lt;/LI-CODE&gt;
&lt;P&gt;Please check the code in the memory view.&lt;/P&gt;
&lt;P&gt;At 0x500000 there should be 0x5AA55AA5&lt;BR /&gt;At 0x500000 + 0xC, there is the Cortex-M7_0 core start address.&lt;BR /&gt;(RM rev7, Table 189. Image vector table).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR, Daniel&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 09:13:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K312-bootloader-jump-to-application-issue/m-p/1795971#M31116</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2024-01-26T09:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: S32K312 bootloader jump to application issue</title>
      <link>https://community.nxp.com/t5/S32K/S32K312-bootloader-jump-to-application-issue/m-p/1796437#M31143</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/160001"&gt;@danielmartynek&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for your support! I tried your code but still stuck in hardfault_handler.&lt;/P&gt;&lt;P&gt;So I search same topic again, finally found the solution, now my code jump normally:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32K/UsageFault-The-processor-has-attempted-to-execute-an-undefined/m-p/1769804" target="_blank"&gt;已解决: UsageFault: The processor has attempted to execute... - NXP Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Maybe your code should update to this:&lt;/P&gt;&lt;P&gt;uint32 func = *(uint32 volatile *)(APP_STARTADDR+ 0xC);&lt;BR /&gt;func = *(uint32 volatile *)(((uint32)func) + 0x4);&lt;BR /&gt;func = ((((uint32)func) &amp;amp; 0xFFFFFFFEU) | 1u); // with "|1u" code worked&amp;nbsp;&lt;BR /&gt;(* (void (*) (void)) func)();&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 01:15:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K312-bootloader-jump-to-application-issue/m-p/1796437#M31143</guid>
      <dc:creator>Vandarkholme</dc:creator>
      <dc:date>2024-01-29T01:15:50Z</dc:date>
    </item>
  </channel>
</rss>

