On Wed, 10 Dec 2003 18:12:28 +0000, Michael Pont wrote:
> If you are using >= 3.31, you should not need the
> assembly-language interrupt harness (if you are using a
> version before this, you will need the harness).
I'm going to reply to my own post (and be a little more specific...).
When programming in C, I prefer to use ISRs without an assembly-language harness. With 3.3.1 you can - in my (thus far fairly limited) experience with this compiler - get away with this. This was not possible with previous versions of GCC that I have tried.
However, this only applies *** with simple ISRs ***. With non-trivial ISRS (including, for example, function calls) we've run into problems. If I understand the GCC bug reports correctly, this bug may be fixed in GCC 3.4, sometime next year?
At present, I've gone back to use assembly-language harnesses for all my ISRs.
I believe you can code the interrupt ISR in C if the ONLY thing you
do in the ISR function is call a function that actually does the
work. It does require an extra level of call. Hmmm, I wonder if
it were marked 'inline'...
Regards
-Bill Knight
R O SoftWare
// this 'work' function is NOT coded as an interrupt
void workISR(void)
{
// do whatever is required here to service the interrupt
}
// this function has the interrupt attribute
void xxxISR(void)
{
workISR();
}Message
Re: Interrupt works in Keil simulator but not in target
2003-12-10 by Bill Knight
Attachments
- No local attachments were found for this message.