[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] Is this a Bug??????
From: |
Ed Maste |
Subject: |
RE: [avr-gcc-list] Is this a Bug?????? |
Date: |
Wed, 31 Jul 2002 09:44:21 -0400 |
> Well then I figured out a work around. I declared
> timer_flag as volatile, and BOB's your uncle, it
> works.
That's not a workaround. That's what you have to
do to tell the compiler that the value of the
timer_flag might be changed by some mechanism other
than the function it's compiling (e.g. in an ISR).
You might be interested in the -fvolatile-global
gcc flag, although I haven't actually tried it.
(for information on that flag, see
http://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code%20Gen%20Options
)
-ed
avr-gcc-list at http://avr1.org
- Re: [avr-gcc-list] Is this a Bug??????, (continued)
- Re: [avr-gcc-list] Is this a Bug??????, Andreas Schwarz, 2002/08/01
- Re: [avr-gcc-list] Is this a Bug??????, Jeff Dairiki, 2002/08/01
- Re: [avr-gcc-list] Is this a Bug??????, Geoffrey Wossum, 2002/08/01
- [avr-gcc-list] problems with toolset on linux, Steve Joiner, 2002/08/01
- Re: [avr-gcc-list] Is this a Bug??????, David Breeze, 2002/08/01
- RE: [avr-gcc-list] Is this a Bug??????,
Ed Maste <=