Technical Support

C51: INTERRUPT CODE NOT IN CORRECT SPACE

QUESTION

When I declare an interrupt, the linker seems to locate my code in the middle of the interrupt vector table space. Why does this happen?

ANSWER

The Keil linker is very efficient at locating code. If the interrupt vector table is empty, the linker can and will locate interrupt code there.

If you don't want the linker to do this, then you may create a file to contain dummy interrupts. For example:

static void dummy_ISR_0 (void) interrupt 0
{
}

static void dummy_ISR_1 (void) interrupt 1
{
}

static void dummy_ISR_2 (void) interrupt 2
{
}

static void dummy_ISR_3 (void) interrupt 3
{
}

Last Reviewed: Monday, May 10, 2004


Did this article provide the answer you needed?
 
Yes
No
Not Sure