Merge pull request #437 from straccio/master
Search in submenu chip or cpu for vars
This commit is contained in:
commit
5a83288e6a
1 changed files with 13 additions and 13 deletions
26
Arduino.mk
26
Arduino.mk
|
@ -572,7 +572,7 @@ endif
|
|||
|
||||
ifndef PARSE_BOARD
|
||||
# result = $(call READ_BOARD_TXT, 'boardname', 'parameter')
|
||||
PARSE_BOARD = $(shell grep -v '^\#' $(BOARDS_TXT) | grep "^[ \t]*$(1).$(2)=" | cut -d = -f 2)
|
||||
PARSE_BOARD = $(shell grep -Ev '^\#' $(BOARDS_TXT) | grep -E "^[ \t]*$(1).$(2)=" | cut -d = -f 2)
|
||||
endif
|
||||
|
||||
# If NO_CORE is set, then we don't have to parse boards.txt file
|
||||
|
@ -591,7 +591,7 @@ ifeq ($(strip $(NO_CORE)),)
|
|||
|
||||
# Which variant ? This affects the include path
|
||||
ifndef VARIANT
|
||||
VARIANT := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).build.variant)
|
||||
VARIANT := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).build.variant)
|
||||
ifndef VARIANT
|
||||
VARIANT := $(call PARSE_BOARD,$(BOARD_TAG),build.variant)
|
||||
endif
|
||||
|
@ -601,7 +601,7 @@ ifeq ($(strip $(NO_CORE)),)
|
|||
endif
|
||||
|
||||
# see if we are a caterina device like leonardo or micro
|
||||
CATERINA := $(findstring caterina,$(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).bootloader.file))
|
||||
CATERINA := $(findstring caterina,$(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).bootloader.file))
|
||||
ifndef CATERINA
|
||||
# 1.5+ method if not a submenu
|
||||
CATERINA := $(findstring caterina,$(call PARSE_BOARD,$(BOARD_TAG),bootloader.file))
|
||||
|
@ -613,14 +613,14 @@ ifeq ($(strip $(NO_CORE)),)
|
|||
|
||||
# processor stuff
|
||||
ifndef MCU
|
||||
MCU := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).build.mcu)
|
||||
MCU := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).build.mcu)
|
||||
ifndef MCU
|
||||
MCU := $(call PARSE_BOARD,$(BOARD_TAG),build.mcu)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef F_CPU
|
||||
F_CPU := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).build.f_cpu)
|
||||
F_CPU := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).build.f_cpu)
|
||||
ifndef F_CPU
|
||||
F_CPU := $(call PARSE_BOARD,$(BOARD_TAG),build.f_cpu)
|
||||
endif
|
||||
|
@ -639,14 +639,14 @@ ifeq ($(strip $(NO_CORE)),)
|
|||
|
||||
# normal programming info
|
||||
ifndef AVRDUDE_ARD_PROGRAMMER
|
||||
AVRDUDE_ARD_PROGRAMMER := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).upload.protocol)
|
||||
AVRDUDE_ARD_PROGRAMMER := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).upload.protocol)
|
||||
ifndef AVRDUDE_ARD_PROGRAMMER
|
||||
AVRDUDE_ARD_PROGRAMMER := $(call PARSE_BOARD,$(BOARD_TAG),upload.protocol)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef AVRDUDE_ARD_BAUDRATE
|
||||
AVRDUDE_ARD_BAUDRATE := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).upload.speed)
|
||||
AVRDUDE_ARD_BAUDRATE := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).upload.speed)
|
||||
ifndef AVRDUDE_ARD_BAUDRATE
|
||||
AVRDUDE_ARD_BAUDRATE := $(call PARSE_BOARD,$(BOARD_TAG),upload.speed)
|
||||
endif
|
||||
|
@ -658,21 +658,21 @@ ifeq ($(strip $(NO_CORE)),)
|
|||
endif
|
||||
|
||||
ifndef ISP_HIGH_FUSE
|
||||
ISP_HIGH_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).bootloader.high_fuses)
|
||||
ISP_HIGH_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).bootloader.high_fuses)
|
||||
ifndef ISP_HIGH_FUSE
|
||||
ISP_HIGH_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),bootloader.high_fuses)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef ISP_LOW_FUSE
|
||||
ISP_LOW_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).bootloader.low_fuses)
|
||||
ISP_LOW_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).bootloader.low_fuses)
|
||||
ifndef ISP_LOW_FUSE
|
||||
ISP_LOW_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),bootloader.low_fuses)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef ISP_EXT_FUSE
|
||||
ISP_EXT_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).bootloader.extended_fuses)
|
||||
ISP_EXT_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).bootloader.extended_fuses)
|
||||
ifndef ISP_EXT_FUSE
|
||||
ISP_EXT_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),bootloader.extended_fuses)
|
||||
endif
|
||||
|
@ -683,7 +683,7 @@ ifeq ($(strip $(NO_CORE)),)
|
|||
endif
|
||||
|
||||
ifndef BOOTLOADER_FILE
|
||||
BOOTLOADER_FILE := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).bootloader.file)
|
||||
BOOTLOADER_FILE := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).bootloader.file)
|
||||
ifndef BOOTLOADER_FILE
|
||||
BOOTLOADER_FILE := $(call PARSE_BOARD,$(BOARD_TAG),bootloader.file)
|
||||
endif
|
||||
|
@ -694,7 +694,7 @@ ifeq ($(strip $(NO_CORE)),)
|
|||
endif
|
||||
|
||||
ifndef HEX_MAXIMUM_SIZE
|
||||
HEX_MAXIMUM_SIZE := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).upload.maximum_size)
|
||||
HEX_MAXIMUM_SIZE := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).upload.maximum_size)
|
||||
ifndef HEX_MAXIMUM_SIZE
|
||||
HEX_MAXIMUM_SIZE := $(call PARSE_BOARD,$(BOARD_TAG),upload.maximum_size)
|
||||
endif
|
||||
|
@ -1504,7 +1504,7 @@ show_boards:
|
|||
@$(CAT) $(BOARDS_TXT) | grep -E '^[a-zA-Z0-9_\-]+.name' | sort -uf | sed 's/.name=/:/' | column -s: -t
|
||||
|
||||
show_submenu:
|
||||
@$(CAT) $(BOARDS_TXT) | grep -E '[a-zA-Z0-9_\-]+.menu.cpu.[a-zA-Z0-9_\-]+=' | sort -uf | sed 's/.menu.cpu./:/' | sed 's/=/:/' | column -s: -t
|
||||
@$(CAT) $(BOARDS_TXT) | grep -E '[a-zA-Z0-9_\-]+.menu.(cpu|chip).[a-zA-Z0-9_\-]+=' | sort -uf | sed 's/.menu.(cpu|chip)./:/' | sed 's/=/:/' | column -s: -t
|
||||
|
||||
monitor:
|
||||
ifeq ($(MONITOR_CMD), 'putty')
|
||||
|
|
Loading…
Reference in a new issue