在线时间2 小时
UID3584161
注册时间2020-7-22
NXP金币0
该用户从未签到
新手上路
- 积分
- 17
- 最后登录
- 2021-4-5
|
我的boot ld链接脚本配置如图
/* Flash */
m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400
m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x00019000
app
/* Flash */
m_interrupts (RX) : ORIGIN = 0x0001A000, LENGTH = 0x00000400
m_flash_config (RX) : ORIGIN = 0x0001A400, LENGTH = 0x00000010
m_text (RX) : ORIGIN = 0x0001A410, LENGTH = 0x0007FBF0
跳转函数
图一
__asm volatile ("cpsid i":::"memory");
/* Jump to user application */
jumpaddr = *(uint32_t*) (appxaddr + 4);
jumptoapp = (pfunction) jumpaddr;
jumptoapp();
图二 搬的官方历程
void JumpToUserApplication( unsigned int userSP, unsigned int userStartup)
{
/* Check if Entry address is erased and return if erased */
if(userSP == 0xFFFFFFFF){
return;
}
/* Set up stack pointer */
__asm("msr msp, r0");
__asm("msr psp, r0");
/* Relocate vector table */
S32_SCB->VTOR = (uint32_t)FLASH_APP_ADDR;
/* Jump to application PC (r1) */
__asm("mov pc, r1");
}
这两种跳转都尝试过 跳转过去app无法正常运行,会进入HardFault_Handler中断
不知道什么问题 噗
|
|