[Tinyos-help] AVR GCC compiler problems
regehr at cs.utah.edu
Wed Feb 27 20:14:18 PST 2008
Just to amplify on Janos and Kevin's messages a bit.... when RAM is
corrupted or changing optimization level changes the behavior of a program
the culprit is always one of the following:
- program depends on unspecified behavior e.g.
- order of application of side effects between sequence points
- order of evaluation of function arguments
- program executes an operation with undefined behavior, most often
but not limited to use of uninitialized data or pointer/array
- something platform dependent e.g.
- inline asm error
- stack overflow
- flaky node
- memory mapping problem
- peripheral doing something funny
- compiler bug
In most cases a compiler bug is not the problem, but of course that does
happen too. If you do end up with a demonstrable compiler bug, please
post a concise failure-inducing program to the avr-gcc mailing list, they
take that kind of thing seriously over there.
When writing embedded C it's never a bad idea to have a copy of this
document sitting around:
More readable documents exist but this one contains the real answers.
More information about the Tinyos-help