LPC54102 secondary bootloader jump

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LPC54102 secondary bootloader jump

跳至解决方案
1,283 次查看
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 ? 

标签 (1)
0 项奖励
1 解答
1,110 次查看
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 项奖励
1 回复
1,111 次查看
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 项奖励