<?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: LPC11u34 secondary bootloader dont jump</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11u34-secondary-bootloader-dont-jump/m-p/1200400#M43282</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have tried with my MCUXpresso tools, I can pass the compilation with the code:&lt;/P&gt;
&lt;P&gt;void loadApp(int addr)&lt;BR /&gt;{&lt;BR /&gt;__asm("ldr r1, [r0]"); // Get SP value&lt;BR /&gt;__asm("msr msp, r1"); // load SP&lt;BR /&gt;__asm("ldr r1, [r0, #4]"); // Get app reset vector&lt;/P&gt;
&lt;P&gt;__asm("add r1,r1,#1"); //the lsb of PC must be 1 for thumb instruction&lt;BR /&gt;__asm("cpsie i");&lt;BR /&gt;__asm("BLX r1");&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
    <pubDate>Wed, 16 Dec 2020 12:18:08 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2020-12-16T12:18:08Z</dc:date>
    <item>
      <title>LPC11u34 secondary bootloader dont jump</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11u34-secondary-bootloader-dont-jump/m-p/1199741#M43268</link>
      <description>&lt;P&gt;I trying to implement a secondary bootloader for LPC11U34. I save my app on a AT45DB041 and when the lpc boot I detect a new firmware on SPIFlash and copy the content for lpc flash. This is running ok. On my Keil project I modified my app ROM to run from 0x1000 to 0xA000 , RAM from 0x10000200 and I realoccated the vector table for RAM(0x10000000). But when I call loadApp(); the SBL dont jump to my app and crash. I based my SBL&amp;nbsp; in the&amp;nbsp;AN11257 and AN11961. I tried others way to execute my code but all crash. Anybody can help me?&lt;/P&gt;&lt;P&gt;for SBL&lt;BR /&gt;#define SBL_SLV_FIRMWARE_START 0x1000&lt;BR /&gt;__asm void loadApp(int addr)&lt;BR /&gt;{&lt;BR /&gt;ldr r1, [r0] ; Get SP value&lt;BR /&gt;msr msp, r1 ; load SP&lt;BR /&gt;ldr r1, [r0, #4] ; Get app reset vector&lt;BR /&gt;cpsie i&lt;BR /&gt;BX r1&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;for App&lt;BR /&gt;#define VCT_TBL_SIZE 512&lt;BR /&gt;#define APP_FLASH_START_ADDR ((uint8_t *)0x1000)&lt;BR /&gt;#define APP_RAM_START_ADDR ((uint8_t *)0x10000000)&lt;/P&gt;&lt;P&gt;void Vector_TBL_Relocate(void){&lt;BR /&gt;uint32_t i;&lt;BR /&gt;/* Copy interrupt vector table from Flash to RAM */&lt;BR /&gt;for(i = 0; i &amp;lt; VCT_TBL_SIZE; i++){&lt;BR /&gt;*(APP_RAM_START_ADDR + i) = *(APP_FLASH_START_ADDR + i);&lt;BR /&gt;}&lt;BR /&gt;/* Interrupt vectors mapped to user RAM*/&lt;BR /&gt;LPC_SYSCON-&amp;gt;SYSMEMREMAP = 0x1;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fernando Maesso&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 15:25:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11u34-secondary-bootloader-dont-jump/m-p/1199741#M43268</guid>
      <dc:creator>fernandomaesso</dc:creator>
      <dc:date>2020-12-15T15:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11u34 secondary bootloader dont jump</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11u34-secondary-bootloader-dont-jump/m-p/1200165#M43275</link>
      <description>&lt;P&gt;Hi, Fernando,&lt;/P&gt;
&lt;P&gt;Regarding your issue, I think the api function has issue:&lt;/P&gt;
&lt;P&gt;__asm void loadApp(int addr)&lt;BR /&gt;{&lt;BR /&gt;ldr r1, [r0] ; Get SP value&lt;BR /&gt;msr msp, r1 ; load SP&lt;BR /&gt;ldr r1, [r0, #4] ; Get app reset vector&lt;BR /&gt;cpsie i&lt;BR /&gt;BX r1&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;Pls try to modify it as:&lt;/P&gt;
&lt;P&gt;__asm void loadApp(int addr)&lt;BR /&gt;{&lt;BR /&gt;ldr r1, [r0] ; Get SP value&lt;BR /&gt;msr msp, r1 ; load SP&lt;BR /&gt;ldr r1, [r0, #4] ; Get app reset vector&lt;/P&gt;
&lt;P&gt;add r1,r1,#1 ;the lsb of PC must be 1 for thumb instruction&lt;BR /&gt;cpsie i&lt;BR /&gt;BLX r1&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;Pls have a try&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 07:28:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11u34-secondary-bootloader-dont-jump/m-p/1200165#M43275</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2020-12-16T07:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11u34 secondary bootloader dont jump</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11u34-secondary-bootloader-dont-jump/m-p/1200251#M43276</link>
      <description>&lt;P&gt;HI xiangjun_rong,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Thank for your reply. I added the line but i had a error&amp;nbsp;A1859E: Flag preserving form of this instruction not available. Have other way to set the bit?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 09:04:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11u34-secondary-bootloader-dont-jump/m-p/1200251#M43276</guid>
      <dc:creator>fernandomaesso</dc:creator>
      <dc:date>2020-12-16T09:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11u34 secondary bootloader dont jump</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11u34-secondary-bootloader-dont-jump/m-p/1200367#M43280</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Can you tell us what gives the error message "A1859E: Flag preserving form of this instruction not available."?&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 11:22:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11u34-secondary-bootloader-dont-jump/m-p/1200367#M43280</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2020-12-16T11:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11u34 secondary bootloader dont jump</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11u34-secondary-bootloader-dont-jump/m-p/1200389#M43281</link>
      <description>&lt;P&gt;&amp;nbsp;When compile I get this error. I´m using Keil UV5 with default compiler.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 11:59:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11u34-secondary-bootloader-dont-jump/m-p/1200389#M43281</guid>
      <dc:creator>fernandomaesso</dc:creator>
      <dc:date>2020-12-16T11:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11u34 secondary bootloader dont jump</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11u34-secondary-bootloader-dont-jump/m-p/1200400#M43282</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have tried with my MCUXpresso tools, I can pass the compilation with the code:&lt;/P&gt;
&lt;P&gt;void loadApp(int addr)&lt;BR /&gt;{&lt;BR /&gt;__asm("ldr r1, [r0]"); // Get SP value&lt;BR /&gt;__asm("msr msp, r1"); // load SP&lt;BR /&gt;__asm("ldr r1, [r0, #4]"); // Get app reset vector&lt;/P&gt;
&lt;P&gt;__asm("add r1,r1,#1"); //the lsb of PC must be 1 for thumb instruction&lt;BR /&gt;__asm("cpsie i");&lt;BR /&gt;__asm("BLX r1");&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 12:18:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11u34-secondary-bootloader-dont-jump/m-p/1200400#M43282</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2020-12-16T12:18:08Z</dc:date>
    </item>
  </channel>
</rss>

