I've been writing code for an alarm clock based on the Arduino Uno, and then uploading it to a simulation in Proteus to test it out. Everything was working perfectly until I decided to try changing the Uno for a Mega2560.
I didn't even finish connecting the Mega before deciding against it, and used Ctrl+Z to return to the working state with the Uno, but it just stopped working completely.
At first it was giving me an invalid opcode error 0x9419. This error has now stopped showing but now a different error comes up. It says can't load the .elf file into the arduino. I've tried several times, and tried using a hex file too, but nothing works.
I can still write my code but now I can't test as I'm going along, so anybody with any experience in Proteus I would be very appreciative if you could help.
Edit: the opcode error has now come back and the .elf error has disappeared, even though I've not changed anything. The full error is "Invalid opcode 0x9419 at PC=0x16A0"