11.9 Interrupt Vector Tables [DD]

By convention, the linker initializes the RESET vector and interrupt vector tables automatically, using information provided in the standard linker scripts.

The MPLAB XC32 compiler provides a special syntax for writing interrupt handlers. See the MPLAB® XC32 C Compiler User’s Guide for PIC32A MCU (DS-50003831) for more information.

Assembly language programmers can install interrupt handlers simply by following the standard naming conventions. Interrupt handlers declared with the standard names and defined as globals are automatically installed into the vector tables.

By convention, the entry point named __reset takes control at device Reset. All applications written in assembly language must include a Reset function with this name. For C programs, the Reset function is provided in libpic30, which initializes the C run-time environment.

Note: Applications may provide a default interrupt handler, which will be installed into any unused vector table entries. In assembly language, the name of the default interrupt handler is __DefaultInterrupt. In C the name is _DefaultInterrupt.

If the application does not provide a default interrupt handler, the linker will create one in section .isr that contains a reset instruction. Creation of a default interrupt handler by the linker may be suppressed with the --no-isr option. In that case unused slots in the interrupt vector tables will be filled with zeros.