avr-gcc-list
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]