AnsweredAssumed Answered

problem of MPC5746R Bootloader jump to APP

Question asked by lei he on Nov 26, 2018
Latest reply on Dec 11, 2018 by lei he

configration: 

bootloader:

APP:

 

My jumping code :

__asm__("e_lis %r12,0x0100");
__asm__("e_or2i %r12,0x0000"); //JUMP_ADDRESS
__asm__("mtlr %r12");
__asm__("se_blrl");

 

After debug, I found correct address was loaded in LR executing "mtlr %r12".(referance debug picture). But it's not runing step by step with instruction after executing "se_blrl". When I stop it, it jump to a error address(referance stop picture).

 

debug:

 

stop:

 

 

.......................

So I change the code  :

__asm__("e_lis %r12,0x0100");
__asm__("e_or2i %r12,0x0000"); //JUMP_ADDRESS
__asm__("mtlr %r12");
__asm__("se_blr");

 

It can jump to correct address,also can go ahead step by step. But when running ,also not good. Stop in 0x10;.....

 

So,I want to know the different of "se_blrl" with "se_blr". And how to jump to APP correctly.

 

Thanks~

Attachments

Outcomes