[CCC DEV] avrdude arduino target

Adam Sampson ats at offog.org
Mon Jul 5 10:02:38 BST 2010


Hi all,

At the moment, we ship a modified copy of avrdude.conf in the KRoC tree,
and use it when calling avrdude. However, recent versions of avrdude
support an "arduino" target anyway, which also handles resetting the
Arduino board automatically -- and our config file doesn't work properly
any more with those versions (at least, on my laptop).

Are there any platforms we're supporting that need the older avrdude, or
would it be safe to make the changes below -- get rid of avrdude.conf
and reset-arduino, and just use avrdude -c arduino?

Index: occam/Makefile
===================================================================
--- occam/Makefile	(revision 6557)
+++ occam/Makefile	(working copy)
@@ -39,8 +39,7 @@
 AVRDUDE_WRITE_OCCAM = -D -U flash:w:$(PROG).hex
 
 upload: $(PROG).hex
-	../reset-arduino $(UPLOAD_PORT)
-	$(AVRDUDE) -C ../avrdude.conf $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_OCCAM)
+	$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_OCCAM)
 	../read-arduino $(UPLOAD_PORT)
 
 clean:
Index: configure.ac
===================================================================
--- configure.ac	(revision 6557)
+++ configure.ac	(working copy)
@@ -58,7 +58,7 @@
 
 CFLAGS="-g -Wall -Os -mmcu=$MCU"
 
-AVRDUDE_FLAGS='-V -F -p $(MCU) -P $(UPLOAD_PORT) -b $(UPLOAD_RATE) -c stk500v1'
+AVRDUDE_FLAGS='-V -F -p $(MCU) -P $(UPLOAD_PORT) -b $(UPLOAD_RATE) -c arduino'
 AC_SUBST(AVRDUDE_FLAGS)
 
 AC_OUTPUT([Makefile config.mk])
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 6557)
+++ Makefile.am	(working copy)
@@ -26,8 +26,7 @@
 	$(OBJCOPY) -O ihex -R .eeprom tvm-arduino tvm-arduino.hex
 
 upload: tvm-arduino.hex
-	./reset-arduino $(UPLOAD_PORT)
-	$(AVRDUDE) -C avrdude.conf $(AVRDUDE_FLAGS) -U flash:w:tvm-arduino.hex
+	$(AVRDUDE) $(AVRDUDE_FLAGS) -U flash:w:tvm-arduino.hex
 	./read-arduino $(UPLOAD_PORT)
 
 # All the source files need libtvm to be built first.

-- 
Adam Sampson <ats at offog.org>                         <http://offog.org/>




More information about the developers mailing list