2020-02-11 08:49发布
Lu.Shi 发表于 2019-9-3 09:17 需要的,我的理解修改icf文件就是中断向量重定向,bootloader不熟悉属于新手上路,理解不对请指正哈 ...
最多设置5个标签!
我贴一段跳转的代码,给你参考一下吧。
- // 引导固件的接口的类型定义
- typedef void (*pfn_load_firmware_t)(void);
- void BOOT_LoadFirmware(uint32_t firmwareEntry)
- {
- static pfn_load_firmware_t s_loadFirmware;
- static uint32_t s_stackPointer;
-
- AlwaysDisableInterrupt();
- SCB->VTOR = (uint32_t)FIRMWARE_VECTOR_TABLE_ABSOLUTE_ADDR;
- s_stackPointer = FIRMWARE_VECTOR_TABLE_ABSOLUTE_ADDR[0];
- __set_MSP(s_stackPointer);
- __set_PSP(s_stackPointer);
- s_loadFirmware = (pfn_load_firmware_t)firmwareEntry;
- s_loadFirmware();
-
- while (1)
- {
- ;
- }
- }
复制代码一周热门 更多>