[coldfire-gnu-discuss] Interrupt Handler

Paul McConkey paul.mcconkey at cambridgeimaging.co.uk
Fri Jun 1 17:16:21 UTC 2007

This is what I do for MCF5282:




-----Original Message-----
From: Paul Georgief [mailto:pgeorgief at ucsd.edu] 
Sent: 31 May 2007 06:18
To: coldfire-gnu-discuss at codesourcery.com
Subject: [coldfire-gnu-discuss] Interrupt Handler

I have some old code I wrote on Codewarrior and have been moving it over
to gcc.  But, I'm stuck!  I'm trying to write my ISR in C and have been
having a problem figuring out the syntax used to implement the ISR.
I've tried:

/* The old(?) GCC way that I'm used to */ void __attribute__
((interrupt)) my_Foo_ISR (void) { }

/* The Codewarrior way */
__interrupt__ void my_Foo_ISR (void) {

/* Another GCC way -- specific to another chip */ interrupt (interruptX)
my_Foo_ISR (void) { }

and a few other weird attempts....

Either GCC says it ignores the syntax or it stops and says there is an
I give up - what is the proper way?  Is there an example that is
available somewhere specifically showing this for the coldfire g++ port?

Also, I've read the getting started manual (regarding the interrupts)
- and it confused me.  I know it'll make perfect sense once I see an
example, but right now it is quite confusing.

I have the following setup:
Windows Host (XP)
Sourcery G++ 4.1-39  ELF Version
Target: mcf5235

Any help would be appreciated!

Thank You,

More information about the coldfire-gnu-discuss mailing list