Well the SIGILL indicates that the processor has been asked to execute an instruction word that does not actually correspond to a valid instruction. There can be many causes of this here are a few
- Corruption of program memory
- Failure to actually program the program memory
- Corruption of the program pointer (which can happen through corruption of the stack pointer to corruption of the stack)
Unfortunately these are not easy bugs to find, examination of the stack (if possible) after the signal has happened might help, but you will need to understand how your processor forms it stack frames. Examining the processor registers after the signal may also help as you can be able to spot corruption of 1 or more of them.