<?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>LPC Microcontrollers中的主题 Re: Jump from bootloader to actual firmware</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514496#M728</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by DennisFrie on Thu Sep 25 12:45:19 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: LabRat&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: DennisFrie&lt;/STRONG&gt;&lt;BR /&gt;Seems to give the exact same result.It ends here again, seems to be the same address (but one off)&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;If I read your board library correct, there's a LED at PIO0.3 (LED1). &lt;BR /&gt;&lt;BR /&gt;What you are seeing is the loop waiting for an interrupt.&lt;BR /&gt;&lt;BR /&gt;If you run the application there should be a LED toggling with 7.5 Hz...&lt;BR /&gt;&lt;BR /&gt;Can you see something like that?&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using the exact LPCopen example for now, as I want to change as little as possible until I've found the problem. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use the LPCXpresso board and only toggle the green LED on PIO0_3. Unfortunately nothing happens. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I upload your code/periph_blink directly to 0x0000 the green led flashes just fine&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 17:12:30 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T17:12:30Z</dc:date>
    <item>
      <title>Jump from bootloader to actual firmware</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514473#M705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by DennisFrie on Wed Sep 24 15:37:41 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi guys&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using a secondary bootloader on my LPC1549, but keep getting a hardfault error, when calling the main firmware. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The bootloader is placed in flash address 0x00 and the main firmware is loaded to 0x2000.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Atm. I'm testing with a very basic sketch, where the "bootloader" just calls the main-firmware. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is what I'm doing atm:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
// Start by disabling interrupts, before changing interrupt vectors
__disable_irq();

// Set vector table offset
SCB-&amp;gt;VTOR = 0x2000; // Note, can be anded with max allowed address, 0x3FFFFF80

// Create pointer to new program address
void (*code_ptr)(void) = (void (*)(void))0x2000;

// Call firmware at address 0x2000 (from pointer above)
code_ptr();

&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at application note AN10866 for LPC17xx, the program counter and stack pointer is changed, but I'm not sure if the vector table offset is enough on LPC15xx. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Trying to change the stack using the code below, my LPC dev. board crashses completely&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
asm volatile("ldr r0, =0x2000"); // Point to top stack
asm volatile("ldr r0, [r0]");
asm volatile("mov sp, r0");

asm volatile("ldr r0, =0x2004"); // Point to Reset handler
asm volatile("ldr r0, [r0]");
asm volatile("mov pc, r0");
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;__set_MSP(*(__IO uint32_t*)0x2000); and call 0x2004 instead, but same result&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any good hints as to what I'm missing here?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When compiling the primary firmware, the compiler is set to use start from address 0x2000.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Without the updated vector table, I keep getting a hardfault-error (0x13C). With the updated vector table it ends at 0x213C (same hardfault vector, just with the offset).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514473#M705</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Jump from bootloader to actual firmware</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514474#M706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by LabRat on Wed Sep 24 15:51:08 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Obviously you don't know what's in that vector table&amp;nbsp; :) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[u]M3 Vector table:[/u]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x0000 Initial SP value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x0004 Reset&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x0008 Hard fault&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x000C NMI&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x0010 Memory management fault&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x0014 Usage fault&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x0018 Bus fault&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x001C Checksum of word 0-6&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x0020 Reserved&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x0024 Reserved&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x0028 Reserved&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x002C SVCall&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x0030 PendSV&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x0034 Reserved for Debug&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x0038 Reserved&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x003C Systick&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x0040 IRQ0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x0044 IRQ1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You problem is that you don't load the new stack pointer and then you don't jump to Reset&amp;nbsp; :) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your code is trying to jump to stack pointer...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514474#M706</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Jump from bootloader to actual firmware</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514475#M707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by DennisFrie on Wed Sep 24 16:26:27 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Well I've tried pretty much everything in that regard, but get the same fault. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Setting main stack pointer to 0x2000:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;__set_MSP(*(__IO uint32_t*)0x2000);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-and calling what I would expect to be reset:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;void (*code_ptr)(void) = (void (*)(void))(startAddress+4);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;code_ptr();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;gives the same result. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the quick answer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514475#M707</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Jump from bootloader to actual firmware</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514476#M708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by LabRat on Wed Sep 24 16:33:58 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Then check the vector table of application code...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it a working program? Does it include correct checksum?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Use 'Instruction Stepping Mode' to debug your bootloader...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514476#M708</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Jump from bootloader to actual firmware</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514477#M709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by starblue on Thu Sep 25 01:51:52 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fforum%2Fhardfault-when-lpc1788-bootloader-jumps-user-application" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/forum/hardfault-when-lpc1788-bootloader-jumps-user-application&lt;/A&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514477#M709</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Jump from bootloader to actual firmware</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514478#M710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by DennisFrie on Thu Sep 25 03:05:32 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: LabRat&lt;/STRONG&gt;&lt;BR /&gt;Then check the vector table of application code...&lt;BR /&gt;&lt;BR /&gt;Is it a working program? Does it include correct checksum?&lt;BR /&gt;&lt;BR /&gt;Use 'Instruction Stepping Mode' to debug your bootloader...&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've really been trying to keep it as simple as possible. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To begin with, I've used the blinky example in LPCopen for LPC15xx. The memory is changed like seen below and simply compiled to a bin-file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;[img]&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F3947315%2FCompilerChangedAddress.png%5B%2Fimg%5D" rel="nofollow noopener noreferrer" target="_blank"&gt;https://dl.dropboxusercontent.com/u/3947315/CompilerChangedAddress.png[/img]&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The bin-file is uploaded to 0x2000 using the program flash utility&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;[img]&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F3947315%2FUploadTo0x2000.png%5B%2Fimg%5D" rel="nofollow noopener noreferrer" target="_blank"&gt;https://dl.dropboxusercontent.com/u/3947315/UploadTo0x2000.png[/img]&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another sketch is created, which only function at the moment is to call the program at 0x2000. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
// Start by disabling interrupts, before changing interrupt vectors
__disable_irq();

// Set vector table offset
SCB-&amp;gt;VTOR = 0x2000; // Note, can be anded with max allowed address, 0x3FFFFF80

// Create pointer to reset handler at new program address
void (*code_ptr)(void) = (void (*)(void))0x2004;

__set_MSP(*(__IO uint32_t*)0x2000); // Set top stack handler

code_ptr();
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was sitting with a friend for hours yesterday trying to get it figured out. We have tried pretty much everything, but I'm sure we're just missing or misunderstanding something fairly obvious &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514478#M710</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Jump from bootloader to actual firmware</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514479#M711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by DennisFrie on Thu Sep 25 03:06:17 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: starblue&lt;/STRONG&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fforum%2Fhardfault-when-lpc1788-bootloader-jumps-user-application" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/forum/hardfault-when-lpc1788-bootloader-jumps-user-application&lt;/A&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, we have been reading tons of LPC17xx examples and threads but haven't found the answer to our problem. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514479#M711</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Jump from bootloader to actual firmware</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514480#M712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by LabRat on Thu Sep 25 03:25:40 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;There's a typo in your Flash setup: 0x40000 - 0x2000 is not 0x38000&amp;nbsp; :bigsmile: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a correct checksum in your application image?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Use Peripheral View-&amp;gt;MFlash256 to check sector 2 (and post it...)...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Did you debug your code? Is it loading correct stack pointer and Reset address before it jumps? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Wild guess: your jump address is wrong&amp;nbsp; :) &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514480#M712</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Jump from bootloader to actual firmware</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514481#M713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by LabRat on Thu Sep 25 03:36:41 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;You are jumping to 0x2004 instead of address in 0x2004&amp;nbsp; :(( &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Use:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;void (*code_ptr)(void) = (void (*)(void))(*(uint32_t*)0x2004); &lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and [color=#f00]&lt;/SPAN&gt;&lt;STRONG&gt;debug&lt;/STRONG&gt;&lt;SPAN&gt;[/color] it !!!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514481#M713</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Jump from bootloader to actual firmware</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514482#M714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by DennisFrie on Thu Sep 25 06:50:02 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: LabRat&lt;/STRONG&gt;&lt;BR /&gt;There's a typo in your Flash setup: 0x40000 - 0x2000 is not 0x38000&amp;nbsp; :bigsmile: &lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Wups&amp;nbsp; 0:) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: LabRat&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Is there a correct checksum in your application image?&lt;BR /&gt;&lt;BR /&gt;Use Peripheral View-&amp;gt;MFlash256 to check sector 2 (and post it...)...&lt;BR /&gt;&lt;BR /&gt;Did you debug your code? Is it loading correct stack pointer and Reset address before it jumps? &lt;BR /&gt;&lt;BR /&gt;Wild guess: your jump address is wrong&amp;nbsp; &lt;SPAN class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: LabRat&lt;/STRONG&gt;&lt;BR /&gt;You are jumping to 0x2004 instead of address in 0x2004&amp;nbsp; :(( &lt;BR /&gt;&lt;BR /&gt;Use:&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;void (*code_ptr)(void) = (void (*)(void))(*(uint32_t*)0x2004); &lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;and [color=#f00]&lt;STRONG&gt;debug&lt;/STRONG&gt;[/color] it !!!!&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hmm, jumping to 0x2004 should get the new address from that register? When debugging the vector points to the address 0x2004, I got the impression it should jump to 0x2004 and use the address from that. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Uploading the blinky sketch to 0x2000 and the jumper-code/bootloader to 0x00, this is the initial memory in the flash&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;[img]&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F3947315%2FbootloaderDebug%2FFirstMemory.png%5B%2Fimg%5D" rel="nofollow noopener noreferrer" target="_blank"&gt;https://dl.dropboxusercontent.com/u/3947315/bootloaderDebug/FirstMemory.png[/img]&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The flash at 0x2000 should be updated correct too&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;[img]&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F3947315%2FbootloaderDebug%2FSecondMemory.png%5B%2Fimg%5D" rel="nofollow noopener noreferrer" target="_blank"&gt;https://dl.dropboxusercontent.com/u/3947315/bootloaderDebug/SecondMemory.png[/img]&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Debugging the initial code. Initially&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;[img]&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F3947315%2FbootloaderDebug%2FStartUpState.png%5B%2Fimg%5D" rel="nofollow noopener noreferrer" target="_blank"&gt;https://dl.dropboxusercontent.com/u/3947315/bootloaderDebug/StartUpState.png[/img]&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Before the jump&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;[img]&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F3947315%2FbootloaderDebug%2FRegisterBeforeCall.png%5B%2Fimg%5D" rel="nofollow noopener noreferrer" target="_blank"&gt;https://dl.dropboxusercontent.com/u/3947315/bootloaderDebug/RegisterBeforeCall.png[/img]&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Fatal error when running that part.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;[img]&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F3947315%2FbootloaderDebug%2FsteppingInto.png%5B%2Fimg%5D" rel="nofollow noopener noreferrer" target="_blank"&gt;https://dl.dropboxusercontent.com/u/3947315/bootloaderDebug/steppingInto.png[/img]&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I gotta admit, currently I'm not quite sure what I'm looking for. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your help is much appreciated, thanks. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514482#M714</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Jump from bootloader to actual firmware</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514483#M715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by starblue on Thu Sep 25 07:02:50 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: LabRat&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;void (*code_ptr)(void) = (void (*)(void))(*(uint32_t*)0x2004); &lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Oh the horrors of C function type notation, better use a typedef. You should also be able to get rid of the redundant cast (untested):&lt;/SPAN&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
typedef void (*f_ptr_t)(void);
f_ptr_t code_ptr = *(*f_ptr_t) 0x2004;&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;SPAN&gt;Without the typedef that would be written like this, I think:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;void (*code_ptr)(void) = *(void (**)(void)) 0x2004; &lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514483#M715</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Jump from bootloader to actual firmware</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514484#M716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by starblue on Thu Sep 25 07:06:19 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: DennisFrie&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: starblue&lt;/STRONG&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fforum%2Fhardfault-when-lpc1788-bootloader-jumps-user-application" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/forum/hardfault-when-lpc1788-bootloader-jumps-user-application&lt;/A&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks, we have been reading tons of LPC17xx examples and threads but haven't found the answer to our problem.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Apparently you haven't read it carefully enough, then. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Specifically, you shouldn't jump to 0x2004, but to the address that is stored in 0x2004, which is explicitly discussed in the thread (the original poster also got it wrong at first, it seems to be somewhat hard to grasp.)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514484#M716</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: Jump from bootloader to actual firmware</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514485#M717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by LabRat on Thu Sep 25 07:11:20 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: DennisFrie&lt;/STRONG&gt;&lt;BR /&gt;I gotta admit, currently I'm not quite sure what I'm looking for. &lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;[color=#f00]blx r2&amp;nbsp; [/color]&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If your bootloader code is correct, Reset address of application (addresss in 0x2004) is now in r2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;0x2191 is the correct address and blx should jump to 0x2190 (LSB is thumb indicator).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now it's important to use 'Instruction Stepping' (I-&amp;gt; Icon in Debug View) to see if this jump is executed...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;See: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Ffaq%2Flpcxpresso%2Fdisassembly-view" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.lpcware.com/content/faq/lpcxpresso/disassembly-view&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514485#M717</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Jump from bootloader to actual firmware</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514486#M718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by LabRat on Thu Sep 25 07:18:53 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: starblue&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: LabRat&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;void (*code_ptr)(void) = (void (*)(void))(*(uint32_t*)0x2004); &lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;Oh the horrors of C function type notation, better use a typedef. You should also be able to get rid of the redundant cast (untested):&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
typedef void (*f_ptr_t)(void);
f_ptr_t code_ptr = *(*f_ptr_t) 0x2004;&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;Without the typedef that would be written like this, I think:&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;void (*code_ptr)(void) = *(void (**)(void)) 0x2004; &lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Would prefer to use a simple pointer (tested):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt; void (*user_code_entry)(void);
 uint32_t *p;
....
 p = (uint32_t *)(sector * 0x1000);
&amp;nbsp; __set_MSP(*p);
 p++;
 user_code_entry = (void (*)(void))(*p);
 user_code_entry();
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514486#M718</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Jump from bootloader to actual firmware</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514487#M719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by DennisFrie on Thu Sep 25 07:55:29 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hmm interesting.. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems to jump just fine to the next part of the code, but fail in the next code&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Before stepping in:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;[img]&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F3947315%2FbootloaderDebug%2F1StepIn.png%5B%2Fimg%5D" rel="nofollow" target="_blank"&gt;https://dl.dropboxusercontent.com/u/3947315/bootloaderDebug/1StepIn.png[/img]&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Stepping just fine into 0x2190&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;[img]&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F3947315%2FbootloaderDebug%2F2FirstStep2190.png%5B%2Fimg%5D" rel="nofollow" target="_blank"&gt;https://dl.dropboxusercontent.com/u/3947315/bootloaderDebug/2FirstStep2190.png[/img]&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;R2 is still pointing to 0x2191 here&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;[img]&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F3947315%2FbootloaderDebug%2F3R2NotChanged.png%5B%2Fimg%5D" rel="nofollow" target="_blank"&gt;https://dl.dropboxusercontent.com/u/3947315/bootloaderDebug/3R2NotChanged.png[/img]&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Continuing in the code, R2 is being set to 0x00 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;[img]&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F3947315%2FbootloaderDebug%2F4R2Changed.png%5B%2Fimg%5D" rel="nofollow" target="_blank"&gt;https://dl.dropboxusercontent.com/u/3947315/bootloaderDebug/4R2Changed.png[/img]&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looks like an initialization problem in the second code?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514487#M719</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: Jump from bootloader to actual firmware</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514488#M720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by DennisFrie on Thu Sep 25 08:03:59 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: starblue&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: DennisFrie&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: starblue&lt;/STRONG&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fforum%2Fhardfault-when-lpc1788-bootloader-jumps-user-application" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/forum/hardfault-when-lpc1788-bootloader-jumps-user-application&lt;/A&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks, we have been reading tons of LPC17xx examples and threads but haven't found the answer to our problem.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;Apparently you haven't read it carefully enough, then. &lt;BR /&gt;&lt;BR /&gt;Specifically, you shouldn't jump to 0x2004, but to the address that is stored in 0x2004, which is explicitly discussed in the thread (the original poster also got it wrong at first, it seems to be somewhat hard to grasp.)&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Being fairly new to the specific stack-pointers on M3, it's not always quite obvious - my apologies if we missed something obvious already written somewhere else. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514488#M720</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: Jump from bootloader to actual firmware</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514489#M721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by LabRat on Thu Sep 25 08:19:38 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: DennisFrie&lt;/STRONG&gt;&lt;BR /&gt;Looks like an initialization problem in the second code?&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's not looking wrong...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's jumping to 0x2190 and executing ResetISR from your application, I guess...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you 'Resume' now, what's not working?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514489#M721</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Jump from bootloader to actual firmware</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514490#M722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by DennisFrie on Thu Sep 25 08:36:23 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;If I continue, it ends up in these lines (marked on the right)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;[img]&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F3947315%2FbootloaderDebug%2FstockHere.png%5B%2Fimg%5D" rel="nofollow" target="_blank"&gt;https://dl.dropboxusercontent.com/u/3947315/bootloaderDebug/stockHere.png[/img]&lt;/A&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514490#M722</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Jump from bootloader to actual firmware</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514491#M723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by LabRat on Thu Sep 25 08:41:43 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: DennisFrie&lt;/STRONG&gt;&lt;BR /&gt;If I continue, it ends up in these lines (marked on the right)&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looks like part of ResetISR (which includes several loops...).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After jumping into application you can try to debug your application with debug informations...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;See: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Ffaq%2Flpcxpresso%2Fdebugging-running-system" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/faq/lpcxpresso/debugging-running-system&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514491#M723</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Jump from bootloader to actual firmware</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514492#M724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by DennisFrie on Thu Sep 25 11:13:09 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The only change done in the blinky-example, is the flash-address. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately, after running the code, my debugger can't connect to the LPC15xx at all, hence debugging the system while running doesn't work (but neat trick otherwise)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've had to clear the flash using the primary USB bootloader every-time, as the programmer can't connect afterwards. No idea why. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;[img]&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F3947315%2FbootloaderDebug%2FdebugConnectProblem.png%5B%2Fimg%5D" rel="nofollow" target="_blank"&gt;https://dl.dropboxusercontent.com/u/3947315/bootloaderDebug/debugConnectProblem.png[/img]&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I started over with a completely clean workspace, but no luck.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've uploaded the workspace here if anyone can take a look it will be a great help. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F3947315%2FBootload_Test.zip" rel="nofollow" target="_blank"&gt;https://dl.dropboxusercontent.com/u/3947315/Bootload_Test.zip&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There's a .bin file called Blinky_0x2000 and Blinky_0x0000 - one compiled for 0x0000 address and the other one for 0x2000&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Jump-from-bootloader-to-actual-firmware/m-p/514492#M724</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:28Z</dc:date>
    </item>
  </channel>
</rss>

