avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] program error?


From: Joerg Wunsch
Subject: Re: [avrdude-dev] program error?
Date: Mon, 24 Mar 2003 10:31:07 +0100
User-agent: Mutt/1.2.5i

As Sander Pool wrote:

> Well, as the avrdude developers you can certainly make it behave
> just the way you like it. As a -user- though I would say that I
> don't like programs that need flags to do the right thing.

Well, avrdude /always/ needs flags in order to do something useful. :)

So just get used to always say "avrdude ... -ei filename", or maybe
even "avrdude ... -yei filename" (i found Brian's erase/reprogram
counter option quite useful).

Even better, just drop all that stuff into your Makefile, and say
"make program".  No need to ever remember which options are needed...

Here's what i'm using in my Makefiles:

AVRVERIFY?=no
AVRPROGFLAGS= -p $(MCU) -ye
.if $(AVRVERIFY) != "yes"
AVRPROGFLAGS+=-V
.endif

program: $(HEXFILE)
        avrdude $(AVRPROGFLAGS) -i $(HEXFILE)

(Sorry, the .if statement is shown in BSD make syntax.  I don't know
the appropriate GNU make if statement syntax offhand.)

The idea is that "AVRVERIFY" can be set outside (e. g. in the
environment or on the make command line) to "yes".  By default, when
developing, i don't want verification to save time.  (I know that my
hardware works and can reliably program the chip, unless the
connection between target and programmer is broken, but in that case,
even programming itself will fail.)

MCU is set elsewhere in the Makefile since it is also needed to
construct the appropriate -mmcu= option for $(CFLAGS).

The macros are still named AVRPROG*, for historical reasons.
-- 
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/




reply via email to

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