Interrupt Handler

Paul Georgief pgeorgief at ucsd.edu
Thu May 31 05:18:14 UTC 2007


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 error.
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,
Paul



More information about the coldfire-gnu-discuss mailing list