Line 36 is the last line of the asm block below:
asm ( "@ MOV R0, %0\n" "@ MOV R1, %1\n" "@ MOV R2, %2\n" "swi 3\n" : : "r" (irq), "r" (isr), "r" (pri) );
I think the code was written for GCC not ARM C. How should this be written correctly using Keil compiler please
Thanks, David
I deleted interrupt.c and changed interrupt.h to read:
__swi(0) void IrqDisable (void); /* Disable all IRQ */ __swi(1) void IrqEnable (void); /* Enable all IRQ */ __swi(2) void ClearVector (void); /* Unregister all ISRs */ __swi(3) void RegisterIrq (int irq, void(*isr)(void), int pri); /* Register an ISR as IRQ */ __swi(4) void SelectFiq (int irq); /* Switch an interrtupt source as FIQ */ __swi(5) void LoadFiqRegs (long *regs); /* Load shadow regs R8-R12 from memory */ __swi(6) void StoreFiqRegs (long *regs); /* Store shadow regs R8-R12 to memory */
That seems to have a) resolved any issues with asm format and b) simplified the code!!