23.3.4.7 .vector_0 .. .vector_63 Sections (PIC32MX Interrupt Vector Tables)

PIC32MX devices use an Interrupt Vector Controller that provides 64 interrupt vectors with uniform, user-configurable spacing.

For these devices, each vector in the table is created as an output section located at an absolute address based on values of the _ebase_address and _vector_spacing symbols. There is one .vector_n output section for each of the 64 vectors in the table.

These sections contain the handler for each of the interrupt vectors. These sections are located at the correct vectored addresses using the formula:

_ebase_address + 0x200 + (_vector_spacing << 5) * n

where n is the respective vector number.

Each of the sections is followed by an assert that ensures the code located at the vector does not exceed the vector spacing specified.

.vector_n _ebase_address + 0x200 + (_vector_spacing << 5) * n :
  {
    KEEP(*(.vector_n))
  } > exception_mem
ASSERT (SIZEOF(.vector_n) < (_vector_spacing << 5), "function at exception vector n too large")