更改FR8008GP向量地址
-
-
@zr 跳转卡死在这里 __set_MSP((volatile uint32_t)CoreRemapStart->MSP);,会是什么原因呢?
-
@liurenwoxing 看下你app呢边正常跑不,他是我们boot跳到你的boot,你的boot再跳到你的app
-
@zr 我现在是我的boot正常工作,可以收到上位机发送过来的数据并可以写入到FR8008GP 0x10020000地址即预留了128KB的boot flash空间,现在要跳到0x10020000地址。
1.现在看起来跳转不正常 APP没工作,FR8008GP也没有重启。
2.APP中,SCT jump_table空间是否可以注释掉 ER_TABLE +0,还是要怎样 处理?
; {
; *(jump_table_0)
; *(jump_table_1)
; *(jump_table_2)
; *(jump_table_3)
; *(jump_table_4)
; }
3.这个FR800X和其他MCU有区别啊,项目里面也看不到像其他M3 MCU SystemInit()设置app 的SCB->VTOR = 0x10020000;
-
@liurenwoxing
app中的.sct链接文件的起始地址改了吗
-
-
@zr 有改ROM 0x10020000 0x01000000;0x100000
-
@zr 有没有IAP跳转的例程可以参考的啊?
-
@liurenwoxing
没有,你把你这块的代码发一下
-
此回复已被删除!
-
@zr APP 的 sct偏移128KB bootloader 空间
ROM 0x10020000 0x01000000;0x100000
{
ER_TABLE +0
{
*(jump_table_0)
*(jump_table_1)
*(jump_table_2)
*(jump_table_3)
*(jump_table_4)
}ER_RO 0x10022000 FIXED { *(+RO) } GUI_MENU_DATA +0 ALIGN 0x4 { *(gui_menu) } ER_BOOT 0x11000000 { boot_vectors.o (RESET, +FIRST) } USER_RE_RAM 0x11001000 { *(ram_code) } ER_RW +0 { *(+RW) *(STACK) } ER_STACK +0 { *(stack_section) } ER_ZI +0 { *(+ZI) } HEAP_KE +0 { *(heap_ke) }}
typedef void (*func_ptr_t)(void);
static uint32_t JumpAddr;
static func_ptr_t JumpToApp;
/**- @brief Jump from boot to app function.
- @param [in] u32Addr APP address
- @retval LL_ERR APP address error
*/
int32_t IAP_JumpToApp(uint32_t u32Addr) // u32Addr = 0X10022000 // 0X20000 128KB bootloader 空间 + 0X2000偏移8KB jump表
{
uint32_t u32StackTop = *((__IO uint32_t *)(u32Addr));
IAP_PeriphDeinit(); /* Jump to user application */ JumpAddr = *(__IO uint32_t *)(u32Addr +4);// printf("3 JumpAddr = 0x%08X \r\n",JumpAddr ); JumpToApp = (func_ptr_t)JumpAddr; /* Initialize user application's Stack Pointer */ __set_MSP(u32StackTop); // SCB->VTOR = u32Addr ; // JumpToApp();// app_boot_retarget(u32Addr);
return LL_ERR;}
-
@liurenwoxing 你boot的链接文件呢,boot可以直接用gpio例程来搞

