--- In lpc2000@yahoogroups.com, "unity0724" <unity0724@...> wrote:
>
> Question: Could it be the IDEs (Keil/Eclipse) are issuing
> different compiler switches?? I can't think of anything else.
>
> If you still cannot get the help from here, may be send a
> post to WinARM Forum:
> http://en.mikrocontroller.net/forum/17
>
> There is also some 2xUART ISR code examples in the WinARM package.
> I do not know if that can be of anything useful to you.
> http://www.siwawi.arubi.uni-
> kl.de/avr_projects/arm_projects/index.html
>
> Regards
>
> --- In lpc2000@yahoogroups.com, vineet jain <vineetrvce@> wrote:
> >
> > Hello,
> > I need some help in writing IRQ routines in GCC, it works the
> way I wrote for KEIL GCC but doesn't with the Eclipse one.
> >
> > Stubs are placed in the sample code for Eclipse IDE:
> > Excerpt from the code:
> >
> > void IRQ_Routine (void) __attribute__ ((interrupt("IRQ")));
> >
> > and then way below:
> >
> > void IRQ_Routine (void) {
> > while (1) ;
> > }
> >
> > I need to write two routines as IRQ for RTC and UART0
> > How do I write them.
> >
> > These are the prototypes I am using for both and way below are the
> definitions:
> >
> > void Uart0_IRQ (void) __attribute__ ((interrupt("IRQ")));
> > void RTC_IRQ (void) __attribute__ ((interrupt("IRQ")));
> > .
> > .
> > .
> > .
> > void Uart0_IRQ (void)
> > { VICVectAddr = 0x00000000;
> > }
> >
> > void RTC_IRQ (void)
> > {unsigned int value;
> > if (ILR & 0x00000001)
> > { value = (CTIME0 & SEC_Mask) >> SEC_Bits;
> > TO_ASCII(value); // send the ascii value to serial
> port....UART0
> > ILR = 0x00000001;
> > }
> > VICVectAddr = 0x00000000;
> > }
> >
> > Please suggest.
> >
> > Thanks in advance,
> > Vineet.
> >
> >
> >
> >
> > ---------------------------------
> > Get amazing travel prices for air and hotel in one click on Yahoo!
> FareChase
> >
> > [Non-text portions of this message have been removed]
> >
>
It looks like you are trying to use the VIC to dispatch the interrupt
to the appropriate handler. After all, there is only one 'IRQ' entry
point and it can't point to two different routines.
I don't see where the VIC is being set up with the interrupt
addresses. Further, if you do use the VIC to dispatch, the default
IRQ routine will not be used.
The interrupt handlers entered via VIC should be declared as:
void IntHandler1 (void) __attribute__ ((interrupt));
void IntHandler2 (void) __attribute__ ((interrupt));
Richard