1.bootloader跳转到应用程序的部分:
跳转到0x08008000
typedef void (*pFunction)(void);
pFunction Jump_To_Application;
if (((*(__IO uint32_t*)0x08008000) & 0x2FFE0000 ) == 0x20000000){
JumpAddress = *(__IO uint32_t*) (0x08008000 + 4); /* Jump to user application */
Jump_To_Application = (pFunction) JumpAddress;
__set_MSP(*(__IO uint32_t*) 0x08008000); /* Initialize user application's Stack Pointer */
Jump_To_Application();
}
2.应用程序需要设置的部分就是在程序开头要重新设置中断向量表:
NVIC_SetVectorTable(0x8008000,0x00);
3.keil做相应的设置