We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
When I used the IENABLE and IDISABLE routines in Keil CARM compiler it all worked fine. Now I'm using Keil realview and suddenly I get some strange errors when I compile my code.
error: #20: identifier "LR" is undefined error: #20: identifier "SP" is undefined
I also tried some routines from NXP (see below). These compiled ok but I think something is missing in the routines because the program crashes when I use them for nesting interrupts.
Can someone tell me how to make these routines work in Realview?
Kind regards, Sander
/* routines from KEIL */ #define IENABLE \ __asm { MRS LR, SPSR } \ __asm { STMFD SP!, {LR} } \ __asm { MSR CPSR_c, #0x1F } \ __asm { STMFD R15!, {LR} } \
#define IDISABLE \ __asm { LDMFD SP!, {LR} } \ __asm { MSR CPSR_c, #0x92 } \ __asm { LDMFD SP!, {LR} } \ __asm { MSR SPSR_cxsf, LR } \
/* routines from NXP */ static uint32 sysreg; /* used as LR register */ #define IENABLE __asm { MRS sysreg, SPSR; MSR CPSR_c, #SYS32Mode; STMFD SP!, {sysreg} }
#define IDISABLE __asm { MSR CPSR_c, #(IRQ32Mode|I_Bit); MSR SPSR_cxsf, sysreg }
again no support from Keil?!
Where you expecting support from Keil on this forum?
This is not a support forum. This is a forum for end-users of Keil products.
If you want support from Keil, please contact their support!
Well I was hoping for some support from anyone.