illegal instruction after reset

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

illegal instruction after reset

565 Views
bjrajendra
Senior Contributor I

Hello all,

I'm using MPC5602P on CW2.9. I tried to write simple application for blinking LED with reset instruction in sector 0x00020000. and I changed the .lcf file accordingly. Here are my changes.

lcf1.png

but once the program executes with reset instruction executes it is showing illegal instruction and the program counter changed to 0x00000060 the corresponding screen shot is shared.

illegal_instructioin2.JPG

Is there any settings I need to do for executing the application,

Thanks in advance,

Raju

Labels (1)
2 Replies

423 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

This is quite obvious, you have to have data in that location in your .map file otherwise the flash will show erased status.

At least for PE, which always erase flash before load.

Peter

423 Views
bjrajendra
Senior Contributor I

Hi,

I got it, What am I thinking is reset vector we edit in our user application is just for updating the mot file and can not be  used for debugging. Once the reset happens MCU will go to its default vector location 0x00000000. So it is showing the illegal instruction. If I change only reset vector location from 0x00020000 to 0x00000000 (just for debugging) then it will work as earlier even after reset.

Thanks all,

Raju

0 Kudos