<?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 to user application from custom bootloader in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464145#M27892</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, didn't realize it was picking up the jump address from somewhere else&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Dec 2015 20:48:23 GMT</pubDate>
    <dc:creator>ndavies</dc:creator>
    <dc:date>2015-12-04T20:48:23Z</dc:date>
    <item>
      <title>Jumping to user application from custom bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464142#M27889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm coding a bootloader and a MQX user application using KSDK and KDS on a KL27 custom board. I've followed &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-328202" rel="noopener noreferrer" target="_blank"&gt;this awesome guide&lt;/A&gt; to properly change the linker files (.ld) so the bootloader was placed at 0x00000000 and the main application at 0x00004000.&lt;/P&gt;&lt;P&gt;After looking up in the .map file, I saw the "Reset_Handler" symbol was placed at address 0x0000442D. This way, my bootloader is able to successfully jump to the user application with &lt;SPAN style="line-height: 1.5;"&gt;this piece of code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="_jivemacro_uid_1449251409792796 jive_macro_code jive_text_macro" data-renderedposition="155_8_1232_16" jivemacro_uid="_1449251409792796"&gt;&lt;P&gt;__asm("bl 0x0000442D");&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far so good. The issue is that I wouldn't like to hardcode that address in bootloader's code &lt;IMG alt="Smiley Sad" class="emoticon emoticon-smileysad" id="smileysad" src="https://community.nxp.com/i/smilies/16x16_smiley-sad.png" title="Smiley Sad" /&gt;&lt;/P&gt;&lt;P&gt;I've seen in other threads a common approach to do that, but I couldn't make it work and I don't know why (wouldn't be a valid approach for my specific MCU?). The thing is that this snippet fails in my case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="_jivemacro_uid_14492514287346473 jive_macro_code jive_text_macro" data-renderedposition="277_8_1232_144" jivemacro_uid="_14492514287346473"&gt;&lt;P&gt;#define USER_APP_ADDRESS&amp;nbsp;&amp;nbsp; 0x00004000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void JumpToUserApplication(uint32_t userSP, uint32_t userStartup) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; __asm("msr msp, r0");&lt;/P&gt;&lt;P&gt;&amp;nbsp; __asm("msr psp, r0");&lt;/P&gt;&lt;P&gt;&amp;nbsp; __asm("mov pc,&amp;nbsp; r1");&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JumpToUserApplication(*((unsigned long*)USER_APP_ADDRESS), *((unsigned long*)(USER_APP_ADDRESS+4)));&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody know what could be wrong or knows other ways to jump to the user application without hardcoding its entry point address?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 13:24:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464142#M27889</guid>
      <dc:creator>alexferreirós</dc:creator>
      <dc:date>2020-11-02T13:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Jumping to user application from custom bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464143#M27890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alex,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to or a 0x01 onto to your jump address. On the cortex-m4 cores the least significant bit of the requested jump to address must be set. This tells the processor to remain in Thumb instruction mode. Since these cores only supports the thumb instruction set, jumping to to an even address causes a hard fault.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice the &lt;STRONG&gt;__asm("bl 0x0000442D"); &lt;/STRONG&gt;instruction is a jump to an odd address, even though the code actually exists starting on the even address.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Norm&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2015 19:43:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464143#M27890</guid>
      <dc:creator>ndavies</dc:creator>
      <dc:date>2015-12-04T19:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Jumping to user application from custom bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464144#M27891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The jump code is pretty standard so if it doesn't work for your application it may be that the application doesn't have its reset vector located at 0x4000.&lt;/P&gt;&lt;P&gt;Look in the binary (or SREC) etc. that you want to load and check that the first long word is the expected stack pointer address and the second is the entry point that you expect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use this code for KL parts:&lt;/P&gt;&lt;PRE&gt;extern void start_application(unsigned long app_link_location)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; asm(" ldr r1, [r0,#0]");&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // get the stack pointer value from the program's reset vector
&amp;nbsp;&amp;nbsp;&amp;nbsp; asm(" mov sp, r1");&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // copy the value to the stack pointer
&amp;nbsp;&amp;nbsp;&amp;nbsp; asm(" ldr r0, [r0,#4]");&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // get the program counter value from the program's reset vector
&amp;nbsp;&amp;nbsp;&amp;nbsp; asm(" blx r0");&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // jump to the start address }&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you would call it with&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;start_application(USER_APP_ADDRESS);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kinetis: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.utasker.com/kinetis.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Bare-Minimum Loader: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.utasker.com/docs/uTasker/uTasker_BM_Loader.pdf" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.utasker.com/docs/uTasker/uTasker_BM_Loader.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Serial Bootloader (Ethernet, USB, MSD, KBOOT, AN2295, SREC, SD-card): &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.utasker.com/forum/index.php?topic=1873.msg6796#msg6796" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.utasker.com/forum/index.php?topic=1873.msg6796#msg6796&lt;/A&gt;&lt;SPAN&gt; / &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.utasker.com/docs/uTasker/uTaskerSerialLoader.PDF" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.utasker.com/docs/uTasker/uTaskerSerialLoader.PDF&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;For the complete "out-of-the-box" Kinetis experience and faster time to market&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;:smileyinfo: Out-of-the-box boot loader support for 46 Kinetis boards, 8 modes and 10 IDEs (&lt;EM&gt;over 15'000 combinations from a single code source with no porting required&lt;/EM&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2015 20:09:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464144#M27891</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2015-12-04T20:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: Jumping to user application from custom bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464145#M27892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, didn't realize it was picking up the jump address from somewhere else&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2015 20:48:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464145#M27892</guid>
      <dc:creator>ndavies</dc:creator>
      <dc:date>2015-12-04T20:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: Jumping to user application from custom bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464146#M27893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works like a charm! Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Dec 2015 16:16:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464146#M27893</guid>
      <dc:creator>alexferreirós</dc:creator>
      <dc:date>2015-12-05T16:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Jumping to user application from custom bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464147#M27894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good to know anyway.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Dec 2015 16:20:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464147#M27894</guid>
      <dc:creator>alexferreirós</dc:creator>
      <dc:date>2015-12-05T16:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: Jumping to user application from custom bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464148#M27895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on LPC2648(ARM7). Facing the same issue as Alex got. Using reset vector address(Here 0x00030058), able to jump to app(starting address: 0x00030000) from my user defined boot(Starting address: 0x00000000).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But following codes didn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;__asm void boot_jump(){&lt;BR /&gt;/* Load main stack pointer with application stack pointer initial value,&lt;BR /&gt; stored at first location of application area */&lt;BR /&gt; ldr r0, =0x30000&lt;BR /&gt; ldr r0, [r0]&lt;BR /&gt; mov sp, r0&lt;BR /&gt; /* Load program counter with application reset vector address, located at&lt;BR /&gt; second word of application area. */&lt;BR /&gt; ldr r0, = 0x30004&lt;BR /&gt; ldr r0, [r0]&lt;BR /&gt; mov pc, r0&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;__asm void start_application(unsigned long location)&lt;BR /&gt;{&lt;BR /&gt; ldr r1, [r0,#0] // get the stack pointer value from the program's reset vector&lt;BR /&gt; mov sp, r1 // copy the value to the stack pointer&lt;BR /&gt; ldr r0, [r0,#4] // get the program counter value from the program's reset vector&lt;BR /&gt; bx r0 // jump to the start address &lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using keil compiler with which hex file is getting generated. I have used hex to bin converter and opened the generated bin in HxD Hex&amp;nbsp;editor to verify the stack and program counter address as part of the file. But didn't observe the addresses in the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What can be wrong and how to correct it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2017 10:53:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464148#M27895</guid>
      <dc:creator>utsavkumar</dc:creator>
      <dc:date>2017-10-10T10:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Jumping to user application from custom bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464149#M27896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You jump code looks OK, although the following is more efficient for the M4.&lt;/P&gt;&lt;P&gt;__asm void start_application(unsigned long location)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;ldr sp, [r0,#0]&lt;/P&gt;&lt;P&gt;ldr pc, [r0,#4]&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that you need to post the HEX and BIN files so that they can be checked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2017 15:02:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464149#M27896</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-10-10T15:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Jumping to user application from custom bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464150#M27897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the quick reply Mark. I have already tried the mentioned piece of code. It didn't work.&lt;/P&gt;&lt;P&gt;Sorry to say I am new to this forum and&amp;nbsp; I am not getting how&amp;nbsp;to post the hex and bin files here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2017 15:53:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464150#M27897</guid>
      <dc:creator>utsavkumar</dc:creator>
      <dc:date>2017-10-10T15:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Jumping to user application from custom bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464151#M27898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select "Use advanced editor" &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/14404iF63D60E47D1123F8/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;and then there will be an attachment method.&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/14443i054A96A430BBE549/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;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2017 17:58:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464151#M27898</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-10-10T17:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Jumping to user application from custom bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464152#M27899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for helping out in adding the attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already tried the piece of code that you have mentioned. It didn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached the Hex and bin files. I am using Keil IDE, which generated HEX files. Bin files, I have generated using online Hex to Bin converter(&lt;A class="link-titled" href="http://tomeko.net/online_tools/hex_to_file.php?lang=en" title="http://tomeko.net/online_tools/hex_to_file.php?lang=en"&gt;Hex to file (binary) converter&lt;/A&gt;&amp;nbsp;). Controller is LPC2648.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Boot.Hex &amp;amp; Boot.bin - Images for the user defined boot with starting address 0x00000000. Reset vector at&amp;nbsp;0x00000058(Refered map file)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;App.Hex &amp;amp; App.bin -&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Images for the&amp;nbsp;application where jump have to be made with starting address 0x00030000. Reset vector at 0x00030058&lt;/SPAN&gt;&lt;SPAN&gt;(Refered map file).&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;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Oct 2017 06:08:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464152#M27899</guid>
      <dc:creator>utsavkumar</dc:creator>
      <dc:date>2017-10-11T06:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Jumping to user application from custom bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464153#M27900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked the files and only then realised that you are working with an old ARM7 processor. This has nothing to do with Kinetis or Cortex M cores and the above code will certainly not work.... it is wise to consider moving to a more modern processor since they are so much better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if you want to jump from a boot loader to an application it is in fact very simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;start_application(_APP_START_); // jump to the application located at the address defined by _APP_START_&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;where&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;#define start_application(call_address)&amp;nbsp;&amp;nbsp; ((void (*)(void))call_address)(); // call specified address&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ARM7 just needs code at the start location which 'manually' sets up the stack pointer. I doesn't work at all like the Cortex M (which in fact copies the Motorola 68000 and Coldfire method).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact you could get all the methods needed from the uTasker LPC2XXX project [including boot loaders] (which allows applications written for the LPC2xxx family to also run on Kinetis parts with almost no porting effort). This project is however legacy since it seems that it is a few years since anyone used these chips...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2F" rel="nofollow" target="_blank"&gt;http://www.utasker.com/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Oct 2017 21:14:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464153#M27900</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-10-11T21:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Jumping to user application from custom bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464154#M27901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the clarification Mark. It is working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But one thing raised my&amp;nbsp; curiosity, how come from Hex or binary file, you found the processor?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 07:08:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464154#M27901</guid>
      <dc:creator>utsavkumar</dc:creator>
      <dc:date>2017-10-12T07:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: Jumping to user application from custom bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464155#M27902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The files that you attached are clearly not Cortex M code since the first two long words are not valid RAM and Flash address, there then follows immediately code, rather than interrupt vectors addresses (which will also be Flash addresses if fixed and present) and there is no valid Flash config data at 0x400..0x40f. Furthermore, the first long word in the binary file is 0xe5f09fe5, which is a typical pattern for the ARM7 ldr pc,[pc, #xx] [branch to a cost address value].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 09:45:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464155#M27902</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-10-12T09:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Jumping to user application from custom bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464156#M27903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 10:31:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Jumping-to-user-application-from-custom-bootloader/m-p/464156#M27903</guid>
      <dc:creator>utsavkumar</dc:creator>
      <dc:date>2017-10-12T10:31:26Z</dc:date>
    </item>
  </channel>
</rss>

