mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
Arduino.mk: allow user avrdude flags
This commit is contained in:
parent
8b6ad6d559
commit
fff4e87619
@ -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)
|
HARDWARE_CORE := $(shell grep $(BOARD).build.core $(BOARDFILE) | cut -d = -f 2)
|
||||||
UPLOAD_SPEED := $(shell grep $(BOARD).upload.speed $(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),)
|
ifeq ($(UPLOAD_PROTOCOL),)
|
||||||
UPLOAD_PROTOCOL := $(shell grep $(BOARD).upload.protocol $(BOARDFILE) | cut -d = -f 2)
|
UPLOAD_PROTOCOL := $(shell grep $(BOARD).upload.protocol $(BOARDFILE) | cut -d = -f 2)
|
||||||
endif
|
endif
|
||||||
@ -431,7 +434,7 @@ all: $(SKETCHELF) $(SKETCHEEP) $(SKETCHHEX)
|
|||||||
|
|
||||||
.PHONY: upload
|
.PHONY: upload
|
||||||
upload: $(SKETCHHEX)
|
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:
|
configure:
|
||||||
$(warning WARNING - A $(SKETCHBOOK)/config.mk file has been written)
|
$(warning WARNING - A $(SKETCHBOOK)/config.mk file has been written)
|
||||||
|
Loading…
Reference in New Issue
Block a user