Dear all, am using LPC2366 if i use macros IENABLE and IDISABLE as in AN10381_1_Nesting_of _Interrupts.pdf. // Macro for enabling interrupts, moving to System mode and relevant stack operations #define IENABLE /* Nested Interrupts Entry */ \ __asm { MRS LR, SPSR } /* Copy SPSR_irq to LR */ \ __asm { STMFD SP!, {LR} } /* Save SPSR_irq */ \ __asm { MSR CPSR_c, #0x1F } /* Enable IRQ (Sys Mode) */ \ __asm { STMFD SP!, {LR} } /* Save LR */ \ // Macro for disabling interrupts, switching back to IRQ and relevant stack operations #define IDISABLE /* Nested Interrupts Exit */ \ __asm { LDMFD SP!, {LR} } /* Restore LR */ \ __asm { MSR CPSR_c, #0x92 } /* Disable IRQ (IRQ Mode) */ \ __asm { LDMFD SP!, {LR} } /* Restore SPSR_irq to LR */ \ __asm { MSR SPSR_cxsf, LR } /* Copy LR to SPSR_irq */ \ i got the following error.Can any one suggest whats the problem?? compiling irq2366.c... ..\Src\LowLevel\irq2366.c(250): error: #20: identifier "LR" is undefined ..\Src\LowLevel\irq2366.c(250): error: #20: identifier "SP" is undefined ..\Src\LowLevel\irq2366.c(250): error: #20: identifier "LR" is undefined ..\Src\LowLevel\irq2366.c(250): warning: #1287-D: LDM/STM instruction may be expanded ..\Src\LowLevel\irq2366.c(250): error: #20: identifier "SP" is undefined ..\Src\LowLevel\irq2366.c(250): error: #20: identifier "LR" is undefined
Thanks in Advance.