在线时间5 小时
UID3527891
注册时间2018-12-14
NXP金币0
该用户从未签到
新手上路

- 积分
- 34
- 最后登录
- 2019-4-26
|

楼主 |
发表于 2019-1-28 09:36:03
|
显示全部楼层
bootloader跳转相关代码
- #define APP_START_ADDRESS 0x4000
- void JumpToUserApplication( unsigned int userSP, unsigned int userStartup);
- 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)APP_START_ADDRESS;
- /* Jump to application PC (r1) */
- __asm("mov pc, r1");
- }
复制代码
应用程序
- MEMORY
- {
- /* Flash */
- m_interrupts (RX) : ORIGIN = 0x00004000, LENGTH = 0x00000400
- m_flash_config (RX) : ORIGIN = 0x00004400, LENGTH = 0x00000010
- m_text (RX) : ORIGIN = 0x00004410, LENGTH = 0x0017EBF0
- /* SRAM_L */
- m_data (RW) : ORIGIN = 0x1FFE0000, LENGTH = 0x00020000
- /* SRAM_U */
- m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x0001F000
- }
复制代码
现在无法跳转,是不是还要设置其他地方 |
|