<?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のトピックSecondary Bootloader hard fault exception (LPC824)</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Secondary-Bootloader-hard-fault-exception-LPC824/m-p/1782648#M55095</link>
    <description>&lt;P&gt;Hello All &amp;amp; happy New Year 2024.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an issue getting my bootloader to jump into a downloaded application. I'm hoping someone has had the same issue, and can help me solve it.&lt;/P&gt;&lt;P&gt;The SBL and process are based on AN11782, which is for my target LPC824, on the max demo board.&lt;/P&gt;&lt;P&gt;I've quickly built a blinky application to use as my application, which is loaded into Flash&amp;nbsp;@ 0x2000:&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT size="2" color="#339966"&gt;1 of 1 ( 0) Writing sectors 8-13 at 0x00002000 with 5284 bytes&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#339966"&gt;( 0) at 00002000: 0 bytes - 0/5284&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#339966"&gt;( 19) at 00002000: 1024 bytes - 1024/5284&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#339966"&gt;( 38) at 00002400: 1024 bytes - 2048/5284&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#339966"&gt;( 58) at 00002800: 1024 bytes - 3072/5284&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#339966"&gt;( 77) at 00002C00: 1024 bytes - 4096/5284&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#339966"&gt;( 96) at 00003000: 1024 bytes - 5120/5284&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#339966"&gt;(100) at 00003400: 1024 bytes - 6144/5284&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The SBL I've rebuilt (also from blinky example in 824 sdk), since new SDK and MCUExpresso have issues with the older code in AN11782.&lt;/P&gt;&lt;P&gt;It has these key functions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;void execute_new_firmware(uint32_t addr)
{
	// This function copies interrupt vectors to 0x1000 0000 and remaps vectors to sram
	remap_vectors(addr);


	/* Jump to user application */
	JumpAddress = *(uint32_t*) (addr + 4);
	Jump_To_Application = (pFunction) (FIRMWARE_START + 4);
	__set_MSP(0x10002000);
	Jump_To_Application();
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And remaps vectors:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;void remap_vectors(uint32_t addr)
{
    uint32_t* src,*dst;
    int32_t size;

    src=(uint32_t*)addr;
    dst = (uint32_t*)FIRMWARE_START;
    size = VECT_SIZE;

    while(size &amp;gt; 0)
    {
        *dst++ = *src++;
        size -= 4;
    }

    // remap vectors to internal RAM
	LPC_SYSCON-&amp;gt;SYSMEMREMAP = 0x1;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The app note wants the memory remapped to SRAM, and I'm not clear. Should the flash contents&amp;nbsp;@0x2000 also be copied to 0x1000 0000 as well as the vectors in this case? This is not part of the application note, so I did not attempt.&lt;/P&gt;&lt;P&gt;My main function, which has the verification/signature pulled only because I haven't got to that just yet. My goal is just to jump to application first...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;int main(void)
{
	uint8_t err;
	uint32_t fw_addr;

	/* Generic Initialization */
	SystemCoreClockUpdate(); 
    BOARD_InitBootPins();
    BOARD_InitBootClocks();

 
	while(1)
	{
		if(boot_chk_info.new_addr!=BLANK_VALUE_32B) {	//new firmware updated
			/* verify the new firmware */
			err = verify_fw();
			if(!err) {	//ready for new f/w execution
				if(RO_boot_addr.cur_addr != boot_chk_info.new_addr) {
//					fw_addr = boot_chk_info.new_addr;
					RW_boot_addr.new_addr = RO_boot_addr.cur_addr;
					RW_boot_addr.cur_addr = boot_chk_info.new_addr;
					/* NOTE: must firstly update f/w boot info then check info!!!*/
//					update_boot_info();
				}
//				update_chk_info();
			}
		}
		fw_addr = RO_boot_addr.cur_addr;

		/* execute firmware*/ 
		execute_new_firmware(fw_addr); // From original app note 
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The check_info.new_address is blank, so we skip to 'exectute_new_firmware(0x2000)' which is where I'm failing.&lt;/P&gt;&lt;P&gt;The code debug steps fine, up to calling "JumpToApplication()" whereupon I get a hard fault. My Registers before the final call:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brentsinger_0-1704339397375.png" style="width: 545px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/256602i6DDEED7A34C68BE1/image-dimensions/545x668?v=v2" width="545" height="668" role="button" title="brentsinger_0-1704339397375.png" alt="brentsinger_0-1704339397375.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The final call itself wants to move the PC to 0x1000 0004 - (FIRMWARE_START + 4)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brentsinger_3-1704339703205.png" style="width: 653px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/256605i3D5292AB688DEF3A/image-dimensions/653x147?v=v2" width="653" height="147" role="button" title="brentsinger_3-1704339703205.png" alt="brentsinger_3-1704339703205.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Immediately after that final JumpToApplication() call I have this in Registers:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brentsinger_2-1704339625978.png" style="width: 607px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/256604i76CC365F9D6F5DDC/image-dimensions/607x328?v=v2" width="607" height="328" role="button" title="brentsinger_2-1704339625978.png" alt="brentsinger_2-1704339625978.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The PC&amp;nbsp;@ 0x548, and NOT 0x1000 0004. Is that significant?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then when let to run freely, the debugger gives me a hard fault, and I'm not good at decoding these. Stack issue?? Please help.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brentsinger_4-1704339868706.png" style="width: 675px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/256606i01D0758EF624947F/image-dimensions/675x417?v=v2" width="675" height="417" role="button" title="brentsinger_4-1704339868706.png" alt="brentsinger_4-1704339868706.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm at a loss and I need some help to figure out why the App note doesn't work for me. My files are attached, hardware is just the LPC824max demo board + MCU-Link.&lt;/P&gt;&lt;P&gt;This is exposing my ignorance of how the boot process really works at a fine level; so please feel free to explain it to me like I'm a 12 year old.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Payment in good karma and possibly beer if I am able one day &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt; Thanks in advance.&lt;/P&gt;&lt;P&gt;Brent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jan 2024 03:55:09 GMT</pubDate>
    <dc:creator>brentsinger</dc:creator>
    <dc:date>2024-01-04T03:55:09Z</dc:date>
    <item>
      <title>Secondary Bootloader hard fault exception (LPC824)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Secondary-Bootloader-hard-fault-exception-LPC824/m-p/1782648#M55095</link>
      <description>&lt;P&gt;Hello All &amp;amp; happy New Year 2024.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an issue getting my bootloader to jump into a downloaded application. I'm hoping someone has had the same issue, and can help me solve it.&lt;/P&gt;&lt;P&gt;The SBL and process are based on AN11782, which is for my target LPC824, on the max demo board.&lt;/P&gt;&lt;P&gt;I've quickly built a blinky application to use as my application, which is loaded into Flash&amp;nbsp;@ 0x2000:&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT size="2" color="#339966"&gt;1 of 1 ( 0) Writing sectors 8-13 at 0x00002000 with 5284 bytes&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#339966"&gt;( 0) at 00002000: 0 bytes - 0/5284&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#339966"&gt;( 19) at 00002000: 1024 bytes - 1024/5284&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#339966"&gt;( 38) at 00002400: 1024 bytes - 2048/5284&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#339966"&gt;( 58) at 00002800: 1024 bytes - 3072/5284&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#339966"&gt;( 77) at 00002C00: 1024 bytes - 4096/5284&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#339966"&gt;( 96) at 00003000: 1024 bytes - 5120/5284&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#339966"&gt;(100) at 00003400: 1024 bytes - 6144/5284&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The SBL I've rebuilt (also from blinky example in 824 sdk), since new SDK and MCUExpresso have issues with the older code in AN11782.&lt;/P&gt;&lt;P&gt;It has these key functions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;void execute_new_firmware(uint32_t addr)
{
	// This function copies interrupt vectors to 0x1000 0000 and remaps vectors to sram
	remap_vectors(addr);


	/* Jump to user application */
	JumpAddress = *(uint32_t*) (addr + 4);
	Jump_To_Application = (pFunction) (FIRMWARE_START + 4);
	__set_MSP(0x10002000);
	Jump_To_Application();
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And remaps vectors:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;void remap_vectors(uint32_t addr)
{
    uint32_t* src,*dst;
    int32_t size;

    src=(uint32_t*)addr;
    dst = (uint32_t*)FIRMWARE_START;
    size = VECT_SIZE;

    while(size &amp;gt; 0)
    {
        *dst++ = *src++;
        size -= 4;
    }

    // remap vectors to internal RAM
	LPC_SYSCON-&amp;gt;SYSMEMREMAP = 0x1;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The app note wants the memory remapped to SRAM, and I'm not clear. Should the flash contents&amp;nbsp;@0x2000 also be copied to 0x1000 0000 as well as the vectors in this case? This is not part of the application note, so I did not attempt.&lt;/P&gt;&lt;P&gt;My main function, which has the verification/signature pulled only because I haven't got to that just yet. My goal is just to jump to application first...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;int main(void)
{
	uint8_t err;
	uint32_t fw_addr;

	/* Generic Initialization */
	SystemCoreClockUpdate(); 
    BOARD_InitBootPins();
    BOARD_InitBootClocks();

 
	while(1)
	{
		if(boot_chk_info.new_addr!=BLANK_VALUE_32B) {	//new firmware updated
			/* verify the new firmware */
			err = verify_fw();
			if(!err) {	//ready for new f/w execution
				if(RO_boot_addr.cur_addr != boot_chk_info.new_addr) {
//					fw_addr = boot_chk_info.new_addr;
					RW_boot_addr.new_addr = RO_boot_addr.cur_addr;
					RW_boot_addr.cur_addr = boot_chk_info.new_addr;
					/* NOTE: must firstly update f/w boot info then check info!!!*/
//					update_boot_info();
				}
//				update_chk_info();
			}
		}
		fw_addr = RO_boot_addr.cur_addr;

		/* execute firmware*/ 
		execute_new_firmware(fw_addr); // From original app note 
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The check_info.new_address is blank, so we skip to 'exectute_new_firmware(0x2000)' which is where I'm failing.&lt;/P&gt;&lt;P&gt;The code debug steps fine, up to calling "JumpToApplication()" whereupon I get a hard fault. My Registers before the final call:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brentsinger_0-1704339397375.png" style="width: 545px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/256602i6DDEED7A34C68BE1/image-dimensions/545x668?v=v2" width="545" height="668" role="button" title="brentsinger_0-1704339397375.png" alt="brentsinger_0-1704339397375.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The final call itself wants to move the PC to 0x1000 0004 - (FIRMWARE_START + 4)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brentsinger_3-1704339703205.png" style="width: 653px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/256605i3D5292AB688DEF3A/image-dimensions/653x147?v=v2" width="653" height="147" role="button" title="brentsinger_3-1704339703205.png" alt="brentsinger_3-1704339703205.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Immediately after that final JumpToApplication() call I have this in Registers:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brentsinger_2-1704339625978.png" style="width: 607px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/256604i76CC365F9D6F5DDC/image-dimensions/607x328?v=v2" width="607" height="328" role="button" title="brentsinger_2-1704339625978.png" alt="brentsinger_2-1704339625978.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The PC&amp;nbsp;@ 0x548, and NOT 0x1000 0004. Is that significant?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then when let to run freely, the debugger gives me a hard fault, and I'm not good at decoding these. Stack issue?? Please help.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brentsinger_4-1704339868706.png" style="width: 675px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/256606i01D0758EF624947F/image-dimensions/675x417?v=v2" width="675" height="417" role="button" title="brentsinger_4-1704339868706.png" alt="brentsinger_4-1704339868706.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm at a loss and I need some help to figure out why the App note doesn't work for me. My files are attached, hardware is just the LPC824max demo board + MCU-Link.&lt;/P&gt;&lt;P&gt;This is exposing my ignorance of how the boot process really works at a fine level; so please feel free to explain it to me like I'm a 12 year old.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Payment in good karma and possibly beer if I am able one day &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt; Thanks in advance.&lt;/P&gt;&lt;P&gt;Brent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 03:55:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Secondary-Bootloader-hard-fault-exception-LPC824/m-p/1782648#M55095</guid>
      <dc:creator>brentsinger</dc:creator>
      <dc:date>2024-01-04T03:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Secondary Bootloader hard fault exception (LPC824)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Secondary-Bootloader-hard-fault-exception-LPC824/m-p/1783298#M55099</link>
      <description>&lt;P&gt;I now think that the issue is the reset vector in the binary I've uploaded.&lt;/P&gt;&lt;P&gt;In the app example from&amp;nbsp;&lt;SPAN&gt;AN11782 each of the two provided binaries for app have reset vectors: 0x50ED and 0x20ED which tracks to their intended flash address in the example.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;My blinky app reset vect is 0xE9 and that's actually where the PC is jumping. So my linker script is the issue? That's not covered in the app note.&lt;/P&gt;&lt;P&gt;Also, the SP for both those example binaries is 0x2000, which tracks with call to set MSP&amp;nbsp;@0x10002000. For my blinky it's 0x1FE0, so I imagine this is a linker script thing as well.&lt;/P&gt;&lt;P&gt;Does this all track?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 02:17:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Secondary-Bootloader-hard-fault-exception-LPC824/m-p/1783298#M55099</guid>
      <dc:creator>brentsinger</dc:creator>
      <dc:date>2024-01-05T02:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Secondary Bootloader hard fault exception (LPC824)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Secondary-Bootloader-hard-fault-exception-LPC824/m-p/1783333#M55100</link>
      <description>&lt;P&gt;To make the reset vector offset happen in the binary all I had to do was:&lt;/P&gt;&lt;P&gt;a) change the flash region from 0x0 -&amp;gt; 0x2000, and reduce size to 0x6000.&lt;/P&gt;&lt;P&gt;b) clean and compile.&lt;/P&gt;&lt;P&gt;It is now 0x20e9 in the blinky binary. Upon download and execution, I get a successful jump to a new addresses in this order&lt;/P&gt;&lt;P&gt;--&amp;gt; 0x1000004 (reset vector in sram, which contains 0x000020e9, i.e. in the correct region of flash + thumb mode (right?))&lt;/P&gt;&lt;P&gt;--&amp;gt; hardfault hander @ 0x2548 with this trace:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brentsinger_0-1704424172215.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/256781i929B8ABA27780C99/image-size/medium?v=v2&amp;amp;px=400" role="button" title="brentsinger_0-1704424172215.png" alt="brentsinger_0-1704424172215.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And active faults:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brentsinger_1-1704424449271.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/256782i3DDAB01E50C7A9E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="brentsinger_1-1704424449271.png" alt="brentsinger_1-1704424449271.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Registers:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brentsinger_2-1704424479213.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/256783i7A081EE620D54317/image-size/medium?v=v2&amp;amp;px=400" role="button" title="brentsinger_2-1704424479213.png" alt="brentsinger_2-1704424479213.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So does this suggest bootloader working, but the application is bad and causing a hard fault?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 03:17:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Secondary-Bootloader-hard-fault-exception-LPC824/m-p/1783333#M55100</guid>
      <dc:creator>brentsinger</dc:creator>
      <dc:date>2024-01-05T03:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Secondary Bootloader hard fault exception (LPC824)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Secondary-Bootloader-hard-fault-exception-LPC824/m-p/1783551#M55102</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/217461"&gt;@brentsinger&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For secondary bootloader, recommend check below steps:&lt;/P&gt;
&lt;P&gt;1) First confirm your application can work/debug well without bootloader, start address from 0x00.&lt;/P&gt;
&lt;P&gt;2) Then change linker file make your application start from 0x2000, then debug it, confirm it works well, about how to debug, you can refer to :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/LPC-Microcontrollers/Lpc845-app-code-can-t-debug-after-bootloader/m-p/856989" target="_blank"&gt;https://community.nxp.com/t5/LPC-Microcontrollers/Lpc845-app-code-can-t-debug-after-bootloader/m-p/856989&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To do this, edit the launch configuration (by double clicking on the .launch file that will have been created in your project) and change the "reset handling" option to "SOFT".&lt;/P&gt;
&lt;P&gt;3)Then download bootloader, debug, check whether can jump into application.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW,&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;AN11782 use LPC11U68 send new firmware to target board, what tool do you used? PC application?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Alice&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 09:06:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Secondary-Bootloader-hard-fault-exception-LPC824/m-p/1783551#M55102</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2024-01-05T09:06:48Z</dc:date>
    </item>
  </channel>
</rss>

