<?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のトピックLPC5410xx secondary bootloader release optimisation</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5410xx-secondary-bootloader-release-optimisation/m-p/1050422#M40682</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to make secondary bootloader as small as possible. Therefore enabling code optimisation in the release configuration.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bootloader works fine in the debug and Level0 optimisation in the release, but as soon as I enable optimisation it doesnt work anymore. It seems like jumping is not really jumping on the right location. Or re-assigning of the vector is not working. Anyway I dont know how to debug this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Verification of the flash memory proves that application is loaded correctly to the specified location. So, issue seems to be within the jump procedure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;volatile static uint32_t USER_FLASH_START = 0x2000; &lt;/PRE&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;boot_jump(USER_FLASH_START); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 19 Apr 2020 12:50:20 GMT</pubDate>
    <dc:creator>svensavic</dc:creator>
    <dc:date>2020-04-19T12:50:20Z</dc:date>
    <item>
      <title>LPC5410xx secondary bootloader release optimisation</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5410xx-secondary-bootloader-release-optimisation/m-p/1050422#M40682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to make secondary bootloader as small as possible. Therefore enabling code optimisation in the release configuration.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bootloader works fine in the debug and Level0 optimisation in the release, but as soon as I enable optimisation it doesnt work anymore. It seems like jumping is not really jumping on the right location. Or re-assigning of the vector is not working. Anyway I dont know how to debug this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Verification of the flash memory proves that application is loaded correctly to the specified location. So, issue seems to be within the jump procedure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;volatile static uint32_t USER_FLASH_START = 0x2000; &lt;/PRE&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;boot_jump(USER_FLASH_START); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Apr 2020 12:50:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5410xx-secondary-bootloader-release-optimisation/m-p/1050422#M40682</guid>
      <dc:creator>svensavic</dc:creator>
      <dc:date>2020-04-19T12:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5410xx secondary bootloader release optimisation</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5410xx-secondary-bootloader-release-optimisation/m-p/1050423#M40683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you sure that this is where the problem is?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, generate the assembler listing for both optimisation levels, and compare:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://mcuoneclipse.com/2018/07/08/creating-disassembly-listings-with-gnu-tools-and-eclipse/" title="https://mcuoneclipse.com/2018/07/08/creating-disassembly-listings-with-gnu-tools-and-eclipse/"&gt;Creating Disassembly Listings with GNU Tools and Eclipse | MCU on Eclipse&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Apr 2020 16:45:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5410xx-secondary-bootloader-release-optimisation/m-p/1050423#M40683</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2020-04-19T16:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5410xx secondary bootloader release optimisation</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5410xx-secondary-bootloader-release-optimisation/m-p/1050424#M40684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Sven,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the bootloader works fine if you do not use optimization, it is okay. Because the bootloader code is written manually, it is efficient, I do not suggest you optimize it.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;XiangJun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2020 05:50:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5410xx-secondary-bootloader-release-optimisation/m-p/1050424#M40684</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2020-04-20T05:50:19Z</dc:date>
    </item>
  </channel>
</rss>

