So, how should I debug this error? Evidently I am not asking to solve the problem for me but, how should I proceed for debugging it and find the real error? The full code has 779 lines plus several library calls, and the line 150 happens to fall just before the loop() function (?), which should never repeat, being just a declaration. According the AVR Instruction Set Manual such opcode should (not sure about this?) be RETI - Return From Interrupt at the Program Line (?) no.150 = 0x096. ELF file inside LabCenter Proteus 8.0, for an Arduino Nano ATMEL Mega 328P, for a code involving the use of the SoftwareSerial.h Library, hence involving several loops, without user interaction, I am getting the following error: Invalid opcode 0x0024 at PC=0x0096 While running a program compiled in the Arduino IDE 1.8.5 and then using the.