Perhaps you need "extern C" magic?
extern "C" {
static void timer0ISR(void) __attribute__ ((interrupt ("IRQ")));
};
Dunno. I'm not an ARM person.
--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks for MSP430, ARM, AVR and (soon) MAXQ processors
> -----Original Message-----
> From: fl429 [mailto:fl429@...]
> Sent: 07 February 2005 17:41
> To: lpc2000@yahoogroups.com
> Subject: [lpc2000] CrossStudio: C++ interrupt service
>
>
>
> Hi, folks,
>
> I am trying out a few things on a IAR Kickstart board, with
> CrossStudio 1.3.
>
> I'd like to write code in C++ instead of C. My test C++ code
> ran ok until I added an interrupt service routine, for Timer0
> as my test example.
>
> I have a ISR like this: (in a .cpp file)
>
> static void timer0ISR(void) __attribute__ ((interrupt ("IRQ")));
>
> static void timer0ISR()
> {
> // doing something here
>
>
> }
>
> void SetupTimer0()
> {
> //
> // Init VIC here, not shown
> //
> VICVectAddr0 = (unsigned int)timer0ISR;
> //
> // etc
>
> }
>
> The problem is the result code always calls the default
> DO-Nothing handler in the "Philips_210x_startup.s" and stalls there.
>
> The same piece of code in C seems ok.
>
> Any ideas ?
>
> Thanks,
>
> Lei
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>Message
RE: [lpc2000] CrossStudio: C++ interrupt service
2005-02-07 by Paul Curtis
Attachments
- No local attachments were found for this message.