At 01:21 AM 10/11/04 +0000, you wrote:
>The best way around all these issues, IMHO, is to use an assember
>wrapper that calls C functions. The wrapper can then be tuned to meet
>all your needs (eg. supporting nested interrupts, thumb safety etc)
>in a far more predictable and controllable way than trying to do
>stuff in C.
As long as we are getting into religious discussions Amen! :) I've seen C
interrupt routines either have broken (non-functioning) implementations
and/or so burdened with overhead as to be practically useless.
The wrapper approach is the one I take (and did with the newlib lpc
stuff). I also distrust inline assembly, I've seen it break too many
compilers and I've yet to see an implementation that completely defined
what was safe. The documentation usually has a few words to the effect
that if you "interfere with the registers the compiler is using for
something else the results are undefined". If I want or need assembly I
write assembly, not assembly masquerading as C.
On the other hand I have heard that the newer versions of GCC do handle
interrupts better.
Robert
" 'Freedom' has no meaning of itself. There are always restrictions,
be they legal, genetic, or physical. If you don't believe me, try to
chew a radio signal. "
Kelvin Throop, IIIMessage
Re: [lpc2000] Re: problem with interrupts
2004-10-11 by Robert Adsett
Attachments
- No local attachments were found for this message.