From fff4e87619087eb7ce1f765c04fa5e3fdb2e2628 Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Fri, 7 Dec 2012 13:24:41 -0800 Subject: [PATCH] Arduino.mk: allow user avrdude flags --- libraries/AP_Common/Arduino.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/AP_Common/Arduino.mk b/libraries/AP_Common/Arduino.mk index 068a6db088..6113a2caa8 100644 --- a/libraries/AP_Common/Arduino.mk +++ b/libraries/AP_Common/Arduino.mk @@ -364,6 +364,9 @@ F_CPU := $(shell grep $(BOARD).build.f_cpu $(BOARDFILE) | cut -d = -f 2) HARDWARE_CORE := $(shell grep $(BOARD).build.core $(BOARDFILE) | cut -d = -f 2) UPLOAD_SPEED := $(shell grep $(BOARD).upload.speed $(BOARDFILE) | cut -d = -f 2) +# User can define USERAVRDUDEFLAGS = -V in their config.mk to skip verification +USERAVRDUDEFLAGS ?= + ifeq ($(UPLOAD_PROTOCOL),) UPLOAD_PROTOCOL := $(shell grep $(BOARD).upload.protocol $(BOARDFILE) | cut -d = -f 2) endif @@ -431,7 +434,7 @@ all: $(SKETCHELF) $(SKETCHEEP) $(SKETCHHEX) .PHONY: upload upload: $(SKETCHHEX) - $(AVRDUDE) -c $(UPLOAD_PROTOCOL) -p $(MCU) -P $(PORT) -b$(UPLOAD_SPEED) -U flash:w:$(SKETCHHEX):i + $(AVRDUDE) -c $(UPLOAD_PROTOCOL) -p $(MCU) -P $(PORT) -b$(UPLOAD_SPEED) $(USERAVRDUDEFLAGS) -U flash:w:$(SKETCHHEX):i configure: $(warning WARNING - A $(SKETCHBOOK)/config.mk file has been written)