4.8.3 Specifying the Interrupt Vector

The process of populating the interrupt vector locations is fully automatic, provided you define interrupt functions (as shown in 4.8.1 Writing an Interrupt Service Routine). The compiler will automatically link each ISR entry point to the appropriate fixed vector location.

The location of the interrupt vectors cannot be changed at runtime, nor can you change the code linked to the vector. That is, you cannot have alternate interrupt functions for the same vector and select which will be active during program execution. An error will result if there are more than one interrupt function defined for the same vector.

Interrupt vectors that have not been specified explicitly in the project can be assigned a default function address by defining an interrupt function that uses BADISR_vect as its vector.