Exact address for jumping to user application from bootloader

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Exact address for jumping to user application from bootloader

715件の閲覧回数
bjrajendra
Senior Contributor I

Hello all,

I developed a bootloader using the Serial bootloader example for MPC5634M.  I developed Flash bootloader in sector B0F0 and user application in B0F5. My device is MPC5602P on CW2.9. and PE Micro debugger.

But when I'm writing instructions in __start file, the ori instruction is not performing well.

 step1.  lis    r8,0x0003
 step2.  ori    r8,r8,0xFFF8 
 step3.  lwz    r6,0(r9)

 

step1. should update r8 with 0x00030000 it does exactly.

step2. This should update r8 register to 0x0003FFF8 but my r8 register updating with 0xFFFFFFF8

 

 

step3. should load value of the address r8. As r8 is 0xFFFFFFF8 instead of 0x0003FFF8 it is showing an error of " Error in ONCE status register during instruction execution"

 

 

can anyone suggest any other operation I can do this perform this operation. and Is it necessary to add the __start file in my bootloadeer project. Instead I tried assembly operation at the very start of bootloader main() for jump to user application.

Q2) The jumping to the address is working well in main() function. Now as per application note, we need to jump to 0x00020004 address to start the user application. But if I do that IVOR8 trap is happening. I also tried jumping to very first address 0x00020000, still the error is same. My only problem is the finding the right address to jump to user application. To which address location we need to jump to execute the exact user application.

I'm attaching here the sequence of jump instructions images.

Kindly do the needful.

Thanks in advance,

BJ Rajendranath

ラベル(1)
0 件の賞賛
1 返信

435件の閲覧回数
bjrajendra
Senior Contributor I

Hello all,

Now I got something. Once it jumps to user application, in the assembler section it can be seen the execution of system call instruction (se_sc instruction) which actually creating IVOR8 interrupt. One can see the below screen shot which is executing se_sc instruction and therefor the IVOR8 interrupt occurs. Now I need to know the things to be performed in my bootloader application so that the execution of se_sc instruction wont lead to IVOR8 trap. Some thing I need to do with vector address shifting.

se_mr2.JPG

Hope some one understands my problem and comeback with solution,

Thanks,

Raju

0 件の賞賛