<?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: Jumping from bootloader to Application in S32K</title>
    <link>https://community.nxp.com/t5/S32K/Jumping-from-bootloader-to-Application/m-p/733575#M1871</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;address 0xA000 (or 0x9000)&amp;nbsp; application entry point -&amp;nbsp; Application() function start address.&lt;/P&gt;&lt;P&gt;yes, by default S32DS projects start with IRQ, flash config etc, as you mentioned it in the above reply and it jump to main.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for&amp;nbsp;the testing purpose&amp;nbsp;, calling the function BLC_Main() in main() function and performing some operation.&amp;nbsp; jump to application from bootloader based on some condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created the App_codeArea section in the linker file , placed the Application() code to the App_codeArea section.&lt;/P&gt;&lt;P&gt;so Application() starts from the 0x0A000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope I answered your doubt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to copy App start address to some register( Application start address is not fixed, OX0A000 or 0x09000) and jump to the register address.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;facing problems with blx and loading the address to PC(please fallow the first post, if I use these two methods , it goes to default ISR).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ambarish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Jan 2018 05:17:35 GMT</pubDate>
    <dc:creator>ambarishhundeka</dc:creator>
    <dc:date>2018-01-22T05:17:35Z</dc:date>
    <item>
      <title>Jumping from bootloader to Application</title>
      <link>https://community.nxp.com/t5/S32K/Jumping-from-bootloader-to-Application/m-p/733573#M1869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi NXP team,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using S32K144 controller in our project.&lt;/P&gt;&lt;P&gt;I am facing some problems with "&amp;nbsp;jump to application from boot loader".&lt;/P&gt;&lt;P&gt;my application may starts from 0xA000 or 0x9000 address as per our requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem 1:&lt;/P&gt;&lt;P&gt;code is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JumptoApp(T_U32 *ptr)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;FSL_SCB-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;VTOR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = (&lt;/SPAN&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;uint32_t&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;)&amp;amp;__VECTOR_TABLE; //don't want to relocate vector table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; DISABLE_INTERRUPTS();&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;asm&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"&lt;SPAN style="text-decoration: underline;"&gt;ldr&lt;/SPAN&gt; r0,=0x0000A000");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;asm&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"&lt;SPAN style="text-decoration: underline;"&gt;blx&lt;/SPAN&gt; r0"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;__attribute__&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;((section (&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;".App_codearea"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;))) &lt;/SPAN&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;void Application&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;void&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;int&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; b;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;b = 10;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;while&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;(1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// ENABLE_INTERRUPTS();&lt;/SPAN&gt;&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;SPAN style="color: #2a00ff; font-size: small;"&gt;.App_codearea section starts from &lt;SPAN style="color: #2a00ff; font-size: small;"&gt;0x0000A000&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If I run the above code , then it goes to default isr, it is not jumping to application.&lt;/P&gt;&lt;P&gt;if I use &lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;asm&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"&lt;SPAN style="text-decoration: underline;"&gt;bl&lt;/SPAN&gt; &lt;SPAN style="color: #2a00ff; font-size: small;"&gt;0x0000A000&lt;/SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;) it is jumping to the application address.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;if I load the PC with 0x8000 address also , it jumps to application and goes to default ISR.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;why above code is not jumping to application?&lt;SPAN style="font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;Problem 2 :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;could you please tell me how to load the other registers with&amp;nbsp; pointer value?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JumptoApp(T_U32 *ptr)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;//how to load the register with pointer value (passed as input argument to this function)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;&amp;nbsp;asm&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"&lt;SPAN style="text-decoration: underline;"&gt;ldr&lt;/SPAN&gt; r1, ptr"&lt;/SPAN&gt;); ????&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 05:05:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Jumping-from-bootloader-to-Application/m-p/733573#M1869</guid>
      <dc:creator>ambarishhundeka</dc:creator>
      <dc:date>2018-01-18T05:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Jumping from bootloader to Application</title>
      <link>https://community.nxp.com/t5/S32K/Jumping-from-bootloader-to-Application/m-p/733574#M1870</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;is on address 0xA000 (or 0x9000)&amp;nbsp; application entry point - main function? By default S32DS project starts with IRQ vector table, flash config and reset handler. All this stuff is maintained by bootloader. App itself should start with some HW config with jump into main() or with main() directly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jiri&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 18:29:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Jumping-from-bootloader-to-Application/m-p/733574#M1870</guid>
      <dc:creator>jiri_kral</dc:creator>
      <dc:date>2018-01-18T18:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Jumping from bootloader to Application</title>
      <link>https://community.nxp.com/t5/S32K/Jumping-from-bootloader-to-Application/m-p/733575#M1871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;address 0xA000 (or 0x9000)&amp;nbsp; application entry point -&amp;nbsp; Application() function start address.&lt;/P&gt;&lt;P&gt;yes, by default S32DS projects start with IRQ, flash config etc, as you mentioned it in the above reply and it jump to main.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for&amp;nbsp;the testing purpose&amp;nbsp;, calling the function BLC_Main() in main() function and performing some operation.&amp;nbsp; jump to application from bootloader based on some condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created the App_codeArea section in the linker file , placed the Application() code to the App_codeArea section.&lt;/P&gt;&lt;P&gt;so Application() starts from the 0x0A000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope I answered your doubt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to copy App start address to some register( Application start address is not fixed, OX0A000 or 0x09000) and jump to the register address.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;facing problems with blx and loading the address to PC(please fallow the first post, if I use these two methods , it goes to default ISR).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ambarish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2018 05:17:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Jumping-from-bootloader-to-Application/m-p/733575#M1871</guid>
      <dc:creator>ambarishhundeka</dc:creator>
      <dc:date>2018-01-22T05:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Jumping from bootloader to Application</title>
      <link>https://community.nxp.com/t5/S32K/Jumping-from-bootloader-to-Application/m-p/733576#M1872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just adding a link to this thread:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/469549"&gt;https://community.nxp.com/thread/469549&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 11:32:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Jumping-from-bootloader-to-Application/m-p/733576#M1872</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2018-02-14T11:32:42Z</dc:date>
    </item>
  </channel>
</rss>

