Skip to content

Instantly share code, notes, and snippets.

@abythell
Created January 8, 2013 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abythell/4487291 to your computer and use it in GitHub Desktop.
Save abythell/4487291 to your computer and use it in GitHub Desktop.
Patch for Arduino firmware for programming via STK500
diff --git a/hardware/arduino/firmwares/atmegaxxu2/arduino-usbdfu/makefile b/hardware/arduino/firmwares/atmegaxxu2/arduino-usbdfu/make
index 1fb4ed3..a2782ac 100755
--- a/hardware/arduino/firmwares/atmegaxxu2/arduino-usbdfu/makefile
+++ b/hardware/arduino/firmwares/atmegaxxu2/arduino-usbdfu/makefile
@@ -116,7 +116,7 @@ OBJDIR = .
# Path to the LUFA library
-LUFA_PATH = ../..
+LUFA_PATH = ../../LUFA
# LUFA library compile-time options and predefined tokens
@@ -358,10 +358,10 @@ AVRDUDE_LOCK = -U lock:w:0x0F:m
# Type: avrdude -c ?
# to get a full listing.
#
-AVRDUDE_PROGRAMMER = avrispmkii
+AVRDUDE_PROGRAMMER = stk500v2
# com1 = serial port. Use lpt1 to connect to parallel port.
-AVRDUDE_PORT = usb
+AVRDUDE_PORT = /dev/ttyS0
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
ZIPTREK\abythell@andrew:~/Software/Arduino/hardware/arduino/firmwares/atmegaxxu2$ clear
ZIPTREK\abythell@andrew:~/Software/Arduino/hardware/arduino/firmwares/atmegaxxu2$ git diff arduino-usbdfu/makefile arduino-usbserial/makefile
diff --git a/hardware/arduino/firmwares/atmegaxxu2/arduino-usbdfu/makefile b/hardware/arduino/firmwares/atmegaxxu2/arduino-usbdfu/make
index 1fb4ed3..a2782ac 100755
--- a/hardware/arduino/firmwares/atmegaxxu2/arduino-usbdfu/makefile
+++ b/hardware/arduino/firmwares/atmegaxxu2/arduino-usbdfu/makefile
@@ -116,7 +116,7 @@ OBJDIR = .
# Path to the LUFA library
-LUFA_PATH = ../..
+LUFA_PATH = ../../LUFA
# LUFA library compile-time options and predefined tokens
@@ -358,10 +358,10 @@ AVRDUDE_LOCK = -U lock:w:0x0F:m
# Type: avrdude -c ?
# to get a full listing.
#
-AVRDUDE_PROGRAMMER = avrispmkii
+AVRDUDE_PROGRAMMER = stk500v2
# com1 = serial port. Use lpt1 to connect to parallel port.
-AVRDUDE_PORT = usb
+AVRDUDE_PORT = /dev/ttyS0
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
diff --git a/hardware/arduino/firmwares/atmegaxxu2/arduino-usbserial/makefile b/hardware/arduino/firmwares/atmegaxxu2/arduino-usbseria
index 79d6be2..f60f744 100755
--- a/hardware/arduino/firmwares/atmegaxxu2/arduino-usbserial/makefile
+++ b/hardware/arduino/firmwares/atmegaxxu2/arduino-usbserial/makefile
@@ -123,7 +123,7 @@ OBJDIR = .
# Path to the LUFA library
-LUFA_PATH = ../..
+LUFA_PATH = ../../LUFA
# LUFA library compile-time options
@@ -369,10 +369,10 @@ LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
# Type: avrdude -c ?
# to get a full listing.
#
-AVRDUDE_PROGRAMMER = avrispmkii
+AVRDUDE_PROGRAMMER = stk500v2
# com1 = serial port. Use lpt1 to connect to parallel port.
-AVRDUDE_PORT = usb
+AVRDUDE_PORT = /dev/ttyS0
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment