LPC54102 secondary bootloader jump

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC54102 secondary bootloader jump

Jump to solution
1,286 Views
svensavic
Contributor III

I have problem trying to start the application that is loaded with the secondary bootloader at the location 0x8000. 

I did a flash memory dump, and the 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.

In the application project settings I have set Flash start as 0x8000 and flash size which corresponds to the mcu size - 32kb.

In the bootloader I run following commands to make the jump:

   static void boot_jump (uint32_t address) 
   {     
   asm(" LDR SP, [R0]");   //load new stack pointer address     
   asm(" LDR PC, [R0, #4]");//load new program counter address 
   } 

   void bootSystem (void) 
   {     
   SCB->VTOR = USER_FLASH_START & 0x1FFFFF80;     
   boot_jump(USER_FLASH_START); 
   }

All interrupts are disabled before calling bootSystem function.

Debugging the bootloader application I just repeatedly end up in the main function. (0x0000)

Any idea ? 

Labels (1)
0 Kudos
1 Solution
1,113 Views
svensavic
Contributor III

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...

View solution in original post

0 Kudos
1 Reply
1,114 Views
svensavic
Contributor III

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...

0 Kudos