[fpc-devel] Interrupt vector table generation

Marco van de Voort marcov at stack.nl
Mon Mar 7 13:49:48 CET 2011


In our previous episode, Jeppe Johansen said:
> A better idea, I think, is to use the old interrupt procedure directive. 
> For some embedded platforms simply allow also specifying a interrupt 
> vector/index after the interrupt keyword. Ex:
> 
> procedure USARTRxInterrupt; interrupt 10;
> begin
>     // Handler code
> end;

I do know how GCC does it with the embedded target (dspic) that I use at
work:

the name of the interrupt routine is hardwired to the table entry. This
allows to get rid of the number constants (which are maintained centrally)
all together.

It also allows to keep code portable between different versions that might
have a different interrupt table layout (since the CPU dependant mapping
from names to numbers would be different).
 



More information about the fpc-devel mailing list