From 893adf7f984f01e196db93d7db30d16ca9023cd7 Mon Sep 17 00:00:00 2001 From: Simon John Date: Sat, 8 Nov 2014 02:51:39 +0000 Subject: [PATCH 1/2] Arduino changed the download link again, this time it uses a script, curl handles it ok luckily. --- HISTORY.md | 1 + tests/script/bootstrap/arduino.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 0b82eca..d20aada 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -31,6 +31,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it - Fix: objcopy quoting issue on Windows. (Issue #272). (https://github.com/sej7278) - Fix: Add "avrispmkii" to the list of isp that don't have a port. (Issue #279). (https://github.com/sej7278) - Fix: Make CXX compile .cpp files instead of CC. (Issue #285). (https://github.com/sej7278) +- Fix: Changed IDE download URL *again* for Travis-CI. (https://github.com/sej7278) ### 1.3.4 (2014-07-12) - Tweak: Allow spaces in "Serial.begin (....)". (Issue #190) (https://github.com/pdav) diff --git a/tests/script/bootstrap/arduino.sh b/tests/script/bootstrap/arduino.sh index 0260448..7c2c9ac 100644 --- a/tests/script/bootstrap/arduino.sh +++ b/tests/script/bootstrap/arduino.sh @@ -20,7 +20,7 @@ if [ -z "$ARDUINO_DIR" ] || ! test -e $ARDUINO_DIR || [ $OS == "cygwin" ]; then EXTRACT_COMMAND="tar -xzf" fi - ARDUINO_URL=http://downloads.arduino.cc/$ARDUINO_FILE + ARDUINO_URL=http://arduino.cc/download.php?f=/$ARDUINO_FILE _pushd $DEPENDENCIES_FOLDER if ! test -e $ARDUINO_FILE From 05b57c3cc3160e3c66dea7b88e707e9327b96bf4 Mon Sep 17 00:00:00 2001 From: Thomas Hebb Date: Fri, 7 Nov 2014 17:59:30 -0500 Subject: [PATCH 2/2] Allow avrdude to erase the chip before programming during ispload We currently pass the -D (do not erase) option to avrdude unconditionally in order to work around an Arduino Mega bootloader bug. However, this has the side-effect of breaking the ispload target for all non-XMEGA chips, since a write operation on these chips essentially ANDs the new program with the existing memory contents. If the memory is not first erased to contain only 0xff, the resulting image is garbage. This patch makes it so we pass -D when we're using the Arduino bootloader but don't pass it when we're using ISP directly. --- Arduino.mk | 8 ++++---- HISTORY.md | 1 + arduino-mk-vars.md | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Arduino.mk b/Arduino.mk index 0c29498..12737b3 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -1209,10 +1209,8 @@ endif # Default avrdude options # -V Do not verify # -q - suppress progress output -# -D - Disable auto erase for flash memory -# (-D is needed for Mega boards. See https://github.com/sudar/Arduino-Makefile/issues/114#issuecomment-25011005) ifndef AVRDUDE_OPTS - AVRDUDE_OPTS = -q -V -D + AVRDUDE_OPTS = -q -V endif AVRDUDE_COM_OPTS = $(AVRDUDE_OPTS) -p $(MCU) @@ -1220,7 +1218,9 @@ ifdef AVRDUDE_CONF AVRDUDE_COM_OPTS += -C $(AVRDUDE_CONF) endif -AVRDUDE_ARD_OPTS = -c $(AVRDUDE_ARD_PROGRAMMER) -b $(AVRDUDE_ARD_BAUDRATE) -P +# -D - Disable auto erase for flash memory +# (-D is needed for Mega boards. See https://github.com/sudar/Arduino-Makefile/issues/114#issuecomment-25011005) +AVRDUDE_ARD_OPTS = -D -c $(AVRDUDE_ARD_PROGRAMMER) -b $(AVRDUDE_ARD_BAUDRATE) -P ifeq ($(CURRENT_OS), WINDOWS) # get_monitor_port checks to see if the monitor port exists, assuming it is # a file. In Windows, avrdude needs the port in the format 'com1' which is diff --git a/HISTORY.md b/HISTORY.md index d20aada..5a9d100 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -32,6 +32,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it - Fix: Add "avrispmkii" to the list of isp that don't have a port. (Issue #279). (https://github.com/sej7278) - Fix: Make CXX compile .cpp files instead of CC. (Issue #285). (https://github.com/sej7278) - Fix: Changed IDE download URL *again* for Travis-CI. (https://github.com/sej7278) +- Fix: Allow avrdude to erase the chip before programming during ispload (https://github.com/tchebb) ### 1.3.4 (2014-07-12) - Tweak: Allow spaces in "Serial.begin (....)". (Issue #190) (https://github.com/pdav) diff --git a/arduino-mk-vars.md b/arduino-mk-vars.md index f6f001b..73bed78 100644 --- a/arduino-mk-vars.md +++ b/arduino-mk-vars.md @@ -1195,7 +1195,7 @@ AVRDUDE_ISP_BAUDRATE = 19200 Options to pass to `avrdude`. -Defaults to `-q -V -D` (quiet, don't verify, don't auto-erase). User values are not *ANDed* to the defaults, you have to set each option you require. +Defaults to `-q -V` (quiet, don't verify). User values are not *ANDed* to the defaults, you have to set each option you require. **Example:**