Before using FreeRTOS on our PIC32MX, we were able to handle interrupts by simply using an ISR like:
void __ISR(_INTERRUPT_1_VECTOR, ipl7auto) {
// Handle interrupt here
}
But ever since introducing us to FreeRTOS, my instructor has had us use an assembly wrapper to handle the interrupt. We use an attribute to bind the interrupt vector to the function that we want to handle the interrupt, then use some assembly to save context and what not like this:
void __attribute__((interrupt(ipl5), vector (_EXTERNAL_2_VECTOR))) vEXT2InterruptWrapper (void);
Why is it that we need to do this in FreeRTOS?