Rich Bair

Unimplemented Instruction

Discussion created by Rich Bair on Dec 1, 2006
Latest reply on Dec 1, 2006 by CompilerGuru
I am testing the checksum feature of the automatic linker (banked memory too so _CHECKSUM_USE_FAR_PTR is defined). To do this I'm taking my *.sx file and corrupting it prior to converting to a *.phy file and flashing to ensure my checksum code works.

Case 1: When corrupting the data field of an instruction everything works.

Case 2: When corrupting an instruction (say CLRB to NOP) everything works

Case 3: This is where it's not working so well! I take a known section of code that I can control running via the interface and I corrupt some code byte to an illegal op code (say 0x8D). At startup the system notified me of the error as expected. The application continues. I fore the section with the illegal op code to execute. I have a handler for the unimplemented instruction. This handler is basically

for ( ; ; ) {

Now, what's strange is that the system resets. The COP doesn't automatically reset the system on an illegal op code does it? Any other thoughts (I'm pretty certain my vector table is setup correctly and the ISR is located in non-banked)?


Message Edited by rhb3 on 2006-12-0102:45 AM