Guru Meditation Error: Core 1 panic'ed (IllegalInstruction)
What it looks like
Guru Meditation Error: Core 1 panic'ed (IllegalInstruction). Exception was unhandled. Memory dump at 0x400d2a10: 00000000 00000000 00000000
What it means
The CPU reached bytes that are not a valid instruction. On the RISC-V chips it reads "Illegal instruction". With GCC, the most common cause in Arduino code is a function declared to return a value that falls off its end without a return statement.
Likely causes
- A non-void function with a path that has no return statement. GCC is allowed to emit an invalid instruction there.
- Memory corruption that overwrote code pointers or the stack.
- Firmware built for one chip flashed to another.
How to fix it
- Turn on all compiler warnings (File > Preferences > Compiler warnings: All) and fix every "control reaches end of non-void function" warning.
- Check that the board selected in Tools > Board matches the chip on your board.
- Decode the backtrace to find the function.
Paste your full log
The lines around the error usually say more. Paste everything from the reset to the backtrace and the crash translator explains each part. It runs in your browser; nothing is sent anywhere.