<?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>S32KのトピックS32K344 BOOT to APP MATLAB generated project in Design Studio</title>
    <link>https://community.nxp.com/t5/S32K/S32K344-BOOT-to-APP-MATLAB-generated-project-in-Design-Studio/m-p/1816882#M32181</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I have a S32K344 bootloader application running on a custom board that I've used to jump to applications that were generated in design studio with no prior issues. I now have a MATLAB generated application that I've been trying to jump to but with no success as it keeps hitting the application's hard fault handler or the debugger crashes (J-Trace).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Boot Flash Start: 0x00400000&lt;/P&gt;&lt;P&gt;App Flash Start: 0x00600000&lt;/P&gt;&lt;P&gt;App VTABLE: 0x0060800&lt;/P&gt;&lt;P&gt;App Jump: 0x00600804&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;*** This is how I've been jumping that has worked for me and that has appeared on other forums ***&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;typedef void(*voidFunPtr)(void);&lt;/P&gt;&lt;P&gt;void AppJump(void){&lt;/P&gt;&lt;P&gt;uint32_t pAppJump =&amp;nbsp;(voidFunPtr)(*(uint32_t *) 0x00600804);&lt;/P&gt;&lt;P&gt;S32_SysTick-&amp;gt;CSRr = 0;&lt;/P&gt;&lt;P&gt;S32_SCB-&amp;gt;VTOR = (uint32_t)0x00600800;&lt;/P&gt;&lt;P&gt;(&amp;nbsp;pAppJump )();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Actions I've done:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- Checked the map file generated from the application for the correct jump location, I've confirmed this through the disassembly&lt;/P&gt;&lt;P&gt;- Relocated the vector table to the application's table before the jump ( S32_SCB-&amp;gt;VTOR )&lt;/P&gt;&lt;P&gt;- Disabled FreeRTOS and peripheral interrupts before the jump&lt;/P&gt;&lt;P&gt;- DeInit all active peripherals&lt;/P&gt;&lt;P&gt;- Disabled the Systick&lt;/P&gt;&lt;P&gt;- Configured the stack pointer&lt;/P&gt;&lt;P&gt;Are there any configurations going on with the MATLAB generated projects that I have to change? Is there some reinitialization I must do? I've searched through forum posts with boot troubles and tried their solutions but nothing has worked yet. I can jump to the application's startup_cm7.s code but I believe the fault occurs here at some point.&lt;/P&gt;</description>
    <pubDate>Tue, 27 Feb 2024 22:39:32 GMT</pubDate>
    <dc:creator>AJLFD</dc:creator>
    <dc:date>2024-02-27T22:39:32Z</dc:date>
    <item>
      <title>S32K344 BOOT to APP MATLAB generated project in Design Studio</title>
      <link>https://community.nxp.com/t5/S32K/S32K344-BOOT-to-APP-MATLAB-generated-project-in-Design-Studio/m-p/1816882#M32181</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I have a S32K344 bootloader application running on a custom board that I've used to jump to applications that were generated in design studio with no prior issues. I now have a MATLAB generated application that I've been trying to jump to but with no success as it keeps hitting the application's hard fault handler or the debugger crashes (J-Trace).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Boot Flash Start: 0x00400000&lt;/P&gt;&lt;P&gt;App Flash Start: 0x00600000&lt;/P&gt;&lt;P&gt;App VTABLE: 0x0060800&lt;/P&gt;&lt;P&gt;App Jump: 0x00600804&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;*** This is how I've been jumping that has worked for me and that has appeared on other forums ***&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;typedef void(*voidFunPtr)(void);&lt;/P&gt;&lt;P&gt;void AppJump(void){&lt;/P&gt;&lt;P&gt;uint32_t pAppJump =&amp;nbsp;(voidFunPtr)(*(uint32_t *) 0x00600804);&lt;/P&gt;&lt;P&gt;S32_SysTick-&amp;gt;CSRr = 0;&lt;/P&gt;&lt;P&gt;S32_SCB-&amp;gt;VTOR = (uint32_t)0x00600800;&lt;/P&gt;&lt;P&gt;(&amp;nbsp;pAppJump )();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Actions I've done:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- Checked the map file generated from the application for the correct jump location, I've confirmed this through the disassembly&lt;/P&gt;&lt;P&gt;- Relocated the vector table to the application's table before the jump ( S32_SCB-&amp;gt;VTOR )&lt;/P&gt;&lt;P&gt;- Disabled FreeRTOS and peripheral interrupts before the jump&lt;/P&gt;&lt;P&gt;- DeInit all active peripherals&lt;/P&gt;&lt;P&gt;- Disabled the Systick&lt;/P&gt;&lt;P&gt;- Configured the stack pointer&lt;/P&gt;&lt;P&gt;Are there any configurations going on with the MATLAB generated projects that I have to change? Is there some reinitialization I must do? I've searched through forum posts with boot troubles and tried their solutions but nothing has worked yet. I can jump to the application's startup_cm7.s code but I believe the fault occurs here at some point.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 22:39:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K344-BOOT-to-APP-MATLAB-generated-project-in-Design-Studio/m-p/1816882#M32181</guid>
      <dc:creator>AJLFD</dc:creator>
      <dc:date>2024-02-27T22:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: S32K344 BOOT to APP MATLAB generated project in Design Studio</title>
      <link>https://community.nxp.com/t5/S32K/S32K344-BOOT-to-APP-MATLAB-generated-project-in-Design-Studio/m-p/1818870#M32336</link>
      <description>There may also be a problem with FreeRTOS. In some attempts using xCreateTask() will also set the hard fault handler or crash the debugger after it has made the jump. Some variables for the pxTaskCode, pcName, pxStack are replaced with 0xA5A5A5A5.</description>
      <pubDate>Thu, 29 Feb 2024 16:12:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K344-BOOT-to-APP-MATLAB-generated-project-in-Design-Studio/m-p/1818870#M32336</guid>
      <dc:creator>AJLFD</dc:creator>
      <dc:date>2024-02-29T16:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: S32K344 BOOT to APP MATLAB generated project in Design Studio</title>
      <link>https://community.nxp.com/t5/S32K/S32K344-BOOT-to-APP-MATLAB-generated-project-in-Design-Studio/m-p/1818995#M32340</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/227269"&gt;@AJLFD&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not aware of specific difference in MATLAB project but I guess that something more needs to be deinitialized. That's the most common problem. If I'm not able to find it, I use following approach: reset the device by debugger and dump the peripheral registers to a file(s). Run the bootloader until you reach jump instruction. Now dump the registers again, compare the files and analyze the differences. Don't forget to check also core registers, especially MPU and NVIC - I would start with this.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 20:26:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K344-BOOT-to-APP-MATLAB-generated-project-in-Design-Studio/m-p/1818995#M32340</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2024-02-29T20:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: S32K344 BOOT to APP MATLAB generated project in Design Studio</title>
      <link>https://community.nxp.com/t5/S32K/S32K344-BOOT-to-APP-MATLAB-generated-project-in-Design-Studio/m-p/2267911#M55649</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37795"&gt;@lukaszadrapa&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to jump from application code to Boot code using matlab code. I have used custom code as follows&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;if(userSP == 0xFFFFFFFF){&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;/* Set up stack pointer */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;__asm("msr msp, r0");&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;__asm("msr psp, r0");&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;/* Relocate vector table */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;S32_SCB-&amp;gt;VTOR = (uint32_t)BOOT_START_ADDRESS;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;/* Jump to BootPC (r1) */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;__asm("mov pc, r1");&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;But when i try to build the application i am facing issues with assemble commands. The Boot Address is 0x000000.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Regards&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Gopal&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 23 Dec 2025 03:34:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K344-BOOT-to-APP-MATLAB-generated-project-in-Design-Studio/m-p/2267911#M55649</guid>
      <dc:creator>rathi_tg</dc:creator>
      <dc:date>2025-12-23T03:34:53Z</dc:date>
    </item>
  </channel>
</rss>

