Objective
These lessons cover a basic general exception code example for the PIC32MX MCU.
The project implements a custom _general_exception_handler() function that is triggered by either a trap exception or an illegal address exception, depending on which line of "bad" code is un-commented in main.c.
Simply uncomment one of the "bad" lines of code, then build and run in debug mode. The project contains a while(1); loop inside the general exception handler. When this is reached, the code can be halted, and the "Watches" window may be examined to view the Cause, Status and EPC registers to determine the cause of the exception. The disassembly listing output file should also be examined to verify the EPC value.
The hardware for this project uses the ArduinoTM compatible chipKIT WF-32 board from Digilent Inc.
