From 05b57c3cc3160e3c66dea7b88e707e9327b96bf4 Mon Sep 17 00:00:00 2001 From: Thomas Hebb Date: Fri, 7 Nov 2014 17:59:30 -0500 Subject: 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-vars.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arduino-mk-vars.md') 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:** -- cgit v1.2.3