Parse MONITOR_PORT from boards.txt as 'upload.port'

Sometimes a programmer is unseparable from the port.
I.e. linuxspi and /dev/spidev0.0

Defining the port in the boards.txt results in thinner project
Makefiles.
This commit is contained in:
Gabrielius Mickevicius 2014-12-28 23:27:24 +02:00
parent 3754e5c012
commit cc4e64a650

View file

@ -618,6 +618,14 @@ ifeq ($(strip $(NO_CORE)),)
endif
endif
ifndef MONITOR_PORT
MONITOR_PORT := $(call PARSE_BOARD,$(BOARD_TAG),upload.port)
ifndef MONITOR_PORT
# might be a submenu
MONITOR_PORT := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).upload.port)
endif
endif
ifndef AVRDUDE_ARD_BAUDRATE
AVRDUDE_ARD_BAUDRATE := $(call PARSE_BOARD,$(BOARD_TAG),upload.speed)
ifndef AVRDUDE_ARD_BAUDRATE