AnsweredAssumed Answered

Exact address for jumping to user application from bootloader

Question asked by BJ RAJENDRANATH on Nov 23, 2017
Latest reply on Nov 24, 2017 by BJ RAJENDRANATH

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

Outcomes