diff --git a/libraries/AP_Common/Arduino.mk b/libraries/AP_Common/Arduino.mk index 3d19e12593..8d34a6fd54 100644 --- a/libraries/AP_Common/Arduino.mk +++ b/libraries/AP_Common/Arduino.mk @@ -325,10 +325,9 @@ MCU := $(shell grep $(BOARD).build.mcu $(BOARDFILE) | cut -d = -f 2) 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) -# This simply does not work, so hardcode it to the correct value -#UPLOAD_PROTOCOL := $(shell grep $(BOARD).upload.protocol $(BOARDFILE) | cut -d = -f 2) + ifeq ($(UPLOAD_PROTOCOL),) - UPLOAD_PROTOCOL := arduino +UPLOAD_PROTOCOL := $(shell grep $(BOARD).upload.protocol $(BOARDFILE) | cut -d = -f 2) endif ifeq ($(MCU),)