Forum: ARM programming with GCC/GNU tools Interrupt problem

von (unknown) (Guest)

Attached files:

Rate this post
0 useful
not useful
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 */
   if ( eint0_counter & 0x01 )  /* alternate the LED display */
   FIO3SET = 0x04000000;  /* LED(P3[25]) = OFF */
   FIO3CLR = 0x04000000;  /* LED(P3[25]) = ON */
   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 
   return (FALSE);
   return( TRUE );

 Many thanks



Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.