Content originally posted in LPCWare by michaelleekun on Thu Sep 03 13:51:06 MST 2015
I am using a LPCXpresso54102 board (cortex M4 only now) and I am trying to upgrade the user application with the secondary bootloader. It will copy the new binary to the "Sector 1 (0x00008000)" which was downloaded by the old user application to the other sector of flash area.
- Seconday bootloader runs at Sector 0 (0x00000000)
I have compiled (using LPCXpresso) the user application changing the start address to 0x8000. This one is working fine with the "AN11610: LPC5410x I2C SPI Secondary Bootloader" which means it should work if my Secondary Bootloader (above codes) is fine.
But if I run the Secondary Bootloader code, this one does not jump to the user application. The "user_entry" is set to "0x81FD" and the debugger stops working. I am not sure but I am missing something here.
Thank you in advance.
I am using a LPCXpresso54102 board (cortex M4 only now) and I am trying to upgrade the user application with the secondary bootloader. It will copy the new binary to the "Sector 1 (0x00008000)" which was downloaded by the old user application to the other sector of flash area.
- Seconday bootloader runs at Sector 0 (0x00000000)
|
I have compiled (using LPCXpresso) the user application changing the start address to 0x8000. This one is working fine with the "AN11610: LPC5410x I2C SPI Secondary Bootloader" which means it should work if my Secondary Bootloader (above codes) is fine.
But if I run the Secondary Bootloader code, this one does not jump to the user application. The "user_entry" is set to "0x81FD" and the debugger stops working. I am not sure but I am missing something here.
Thank you in advance.
Quote: michaelleekun
__set_MSP(SCB->VTOR);//load stackpointer with initial value
Well that certain looks broken to me. You want something like:
i.e. the contents of the first address of the image, not the address itself.
HTH!