Hi, Can someone help me please. I'm new to both ARM's and WinARM. I have a board with an LPC2368 which I have been able to write simple interrupt routines for EINT0, and timers 0 and 1, using the Keil evaluation software. I'm now using WInARM with Eclipse (Galileo) and cannot get the interrupts to work. I have the makefile set to NO THUMB and include both startup.s and swi_handler.s. I notice when I build the project I get the following message although it seems to create both the hex and bin files Creating Extended Listing: main.lss arm-elf-objdump -h -S -C main.elf > main.lss /usr/bin/sh: /c/winarm/bin/arm-elf-objdump: Invalid argument make: *** [main.lss] Error 126 If I complie again it compiles with no errors. For brevity I've stripped out some of the comments, extint.c is void _attribute_ ((interrupt("IRQ"))) EINT0_Handler (void); volatile DWORD eint0_counter=0; void EINT0_Handler (void) { EXTINT = EINT0; /* clear interrupt */ IENABLE; /* handles nested interrupt */ eint0_counter++; if ( eint0_counter & 0x01 ) /* alternate the LED display */ { FIO3SET = 0x04000000; /* LED(P3[25]) = OFF */ } else { FIO3CLR = 0x04000000; /* LED(P3[25]) = ON */ } IDISABLE; VICVectAddr = 0; /* Acknowledge Interrupt */ } /*****************************************************************/ DWORD EINTInit( void ) { PINSEL4 = 0x00100000; /* set P2.10 as EINT0 and*/ FIO3CLR = 0x02000000; // LED(P3[25]) = ON IO2_INT_EN_F = 0x200; /* Port2.10 is falling edge. */ EXTMODE = EINT0_EDGE; /* INT0 edge trigger */ EXTPOLAR = 0; /* INT0 is falling edge by default */ if ( install_irq(EINT0_INT,(void *)EINT0_Handler,HIGHEST_PRIORITY )==FALSE) { return (FALSE); } return( TRUE ); } Many thanks Alastair
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
Log in with Google account
No account? Register here.