<?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のトピックLPC54102 secondary bootloader jump</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54102-secondary-bootloader-jump/m-p/1050380#M40680</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have problem trying to start the application that is loaded with the secondary bootloader at the location 0x8000.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did a flash memory dump, and the&amp;nbsp;location 0x8000 and further matches the binary file of the application I am loading. So problem is either in the setup of the application project or the bootloader sequence for the program jump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the application project settings I have set Flash start as 0x8000 and flash size which corresponds to the mcu size - 32kb.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the bootloader I run following commands to make the jump:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static void boot_jump (uint32_t address) 
&amp;nbsp;&amp;nbsp;&amp;nbsp;{     
&amp;nbsp;&amp;nbsp;&amp;nbsp;asm(" LDR SP, [R0]");   //load new stack pointer address     
&amp;nbsp;&amp;nbsp;&amp;nbsp;asm(" LDR PC, [R0, #4]");//load new program counter address 
&amp;nbsp;&amp;nbsp;&amp;nbsp;} 

&amp;nbsp;&amp;nbsp;&amp;nbsp;void bootSystem (void) 
&amp;nbsp;&amp;nbsp;&amp;nbsp;{     
&amp;nbsp;&amp;nbsp;&amp;nbsp;SCB-&amp;gt;VTOR = USER_FLASH_START &amp;amp; 0x1FFFFF80;     
&amp;nbsp;&amp;nbsp;&amp;nbsp;boot_jump(USER_FLASH_START); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/PRE&gt;&lt;P&gt;All interrupts are disabled before calling bootSystem function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Debugging the bootloader application I just repeatedly end up in the main function. (0x0000)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea ?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 18 Apr 2020 19:44:57 GMT</pubDate>
    <dc:creator>svensavic</dc:creator>
    <dc:date>2020-04-18T19:44:57Z</dc:date>
    <item>
      <title>LPC54102 secondary bootloader jump</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54102-secondary-bootloader-jump/m-p/1050380#M40680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have problem trying to start the application that is loaded with the secondary bootloader at the location 0x8000.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did a flash memory dump, and the&amp;nbsp;location 0x8000 and further matches the binary file of the application I am loading. So problem is either in the setup of the application project or the bootloader sequence for the program jump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the application project settings I have set Flash start as 0x8000 and flash size which corresponds to the mcu size - 32kb.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the bootloader I run following commands to make the jump:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static void boot_jump (uint32_t address) 
&amp;nbsp;&amp;nbsp;&amp;nbsp;{     
&amp;nbsp;&amp;nbsp;&amp;nbsp;asm(" LDR SP, [R0]");   //load new stack pointer address     
&amp;nbsp;&amp;nbsp;&amp;nbsp;asm(" LDR PC, [R0, #4]");//load new program counter address 
&amp;nbsp;&amp;nbsp;&amp;nbsp;} 

&amp;nbsp;&amp;nbsp;&amp;nbsp;void bootSystem (void) 
&amp;nbsp;&amp;nbsp;&amp;nbsp;{     
&amp;nbsp;&amp;nbsp;&amp;nbsp;SCB-&amp;gt;VTOR = USER_FLASH_START &amp;amp; 0x1FFFFF80;     
&amp;nbsp;&amp;nbsp;&amp;nbsp;boot_jump(USER_FLASH_START); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/PRE&gt;&lt;P&gt;All interrupts are disabled before calling bootSystem function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Debugging the bootloader application I just repeatedly end up in the main function. (0x0000)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea ?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Apr 2020 19:44:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54102-secondary-bootloader-jump/m-p/1050380#M40680</guid>
      <dc:creator>svensavic</dc:creator>
      <dc:date>2020-04-18T19:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54102 secondary bootloader jump</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54102-secondary-bootloader-jump/m-p/1050381#M40681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, there was nothing wrong with the code for reset of the mcu. Issue was with the .hex parser and pushing application to the flash rom. I had 1 byte misaligned when hex line was not in size of 16 bytes...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Apr 2020 22:21:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54102-secondary-bootloader-jump/m-p/1050381#M40681</guid>
      <dc:creator>svensavic</dc:creator>
      <dc:date>2020-04-18T22:21:20Z</dc:date>
    </item>
  </channel>
</rss>

