Open GoogleCodeExporter opened 9 years ago
I've tried to compile on an older Debian system (squeeze), but the corruption
of F_CPU is the same there. Setting AVR_FREQ as command line parameter is not
good.
Interestingly, if you replace (Makefile line 115):
override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ)
$(DEFS)
with something like this:
override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET)
-DF_CPU=$(SOMETHING_ELSE) $(DEFS)
and run:
make atmega168 SOMETHING_ELSE=16000000L
it works just fine.
So it seems that something corrupts AVR_FREQ before it is put into F_CPU.
Original comment by madworm_...@spitzenpfeil.org
on 11 Jun 2014 at 9:09
OK, this is really odd.
Replacing ALL instances of "AVR_FREQ ?= ..." with "AVR_FREQ = ..." fixes the
corruption problem. Of course this defeats using default values.
Original comment by madworm_...@spitzenpfeil.org
on 11 Jun 2014 at 9:39
The version of optiboot that is distributed with the arduino IDE 1.0.5 doesn't
have any of the "?=" assignments.
Original comment by madworm_...@spitzenpfeil.org
on 11 Jun 2014 at 10:13
The optiboot distributed with the IDE hasn't been changed since 4.4 (the
initial "fixed" optiboot) because most of the changes since then have been
irrelevant to the actual arduino platforms.
This does seem really weird.
(Duplicated with ubuntu 12.04. Does not occur when using "remake" (my favorite
makefile debugging tool.) Sigh.)
Original comment by wes...@gmail.com
on 12 Jun 2014 at 3:23
I get the same nonsense with "remake-3.82_0.8-1.5.x86_64" (openSUSE).
However, on my Debian squeeze VPS "remake 3.81+dbg0.2~dfsg.1-1" works, "make
3.81-8" doesn't.
Original comment by madworm_...@spitzenpfeil.org
on 12 Jun 2014 at 5:21
Hmmm.
This doesn't work:
"make atmega644p AVR_FREQ=..."
But this does:
"AVR_FREQ=... make atmega644p"
Original comment by madworm_...@spitzenpfeil.org
on 12 Jun 2014 at 5:36
http://savannah.gnu.org/bugs/?34806 mentions this as "fixed", back in 2011.
Unfortunately, "everyone" seems to still distribute 3.81 or so (from 2006.)
(Sigh.)
Original comment by wes...@gmail.com
on 28 Jun 2014 at 9:37
Hmmm. I've filed a bug with my distro of choice. Maybe someone there will show
an interest.
Original comment by madworm_...@spitzenpfeil.org
on 28 Jun 2014 at 10:06
Well, I got a response on the bug-tracker. They're asking what packages of the
distro are affected by this... I have a gut feeling I know where this is going.
Original comment by madworm_...@spitzenpfeil.org
on 16 Jul 2014 at 4:01
Original issue reported on code.google.com by
madworm_...@spitzenpfeil.org
on 11 Jun 2014 at 8:56Attachments: