本帖最后由 db520136 于 2019-7-15 14:43 编辑
IAR 中 STM32F103 boot 跳转,执行 if(((*(volatile uint32_t*)app_addr)&0x2FFE0000)==0x20000000)这句的时候就跑飞了! 有大佬知道原因的吗?指点下!
void IAP_JumpToAPP(unsigned long app_addr)
{
__set_PRIMASK(1); //关闭总中断
SCB->VTOR = FLASH_BASE | 0x4000; //设置中断向量表偏移
if(((*(volatile uint32_t*)app_addr)&0x2FFE0000)==0x20000000) //检查栈顶地址是否合法.
{
__set_MSP(*(__IO uint32_t*) app_addr);
jump2app = (iapfun)*(unsigned long *)(app_addr+4);
jump2app();
}
}
仿真, 提示:
The processor has escalated a configurable-priority exception to HardFault.
A precise data access error has occurred (CFSR.PRECISERR, BFAR) at data address 0x80004000.
Exception occured at PC = 0x8000ed4, LR = 0x8000d09
See the call stack for more information.
我的 boot icf文件配置
app icf文件配置
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>