Add support for BOARD_SPEED setting.
This is needed to specify CPU speed for boards.txt files that use this format: "{board_tag}.menu.speed.{board_speed}.build.f_cpu" For example, the Watterott ATmega328PB library: https://github.com/watterott/ATmega328PB-Testing
This commit is contained in:
parent
5a0c80bf0c
commit
0f02622467
1 changed files with 11 additions and 1 deletions
12
Arduino.mk
12
Arduino.mk
|
@ -641,6 +641,11 @@ else
|
|||
$(call show_config_variable,BOARD_TAG,[USER])
|
||||
endif
|
||||
|
||||
ifdef BOARD_SPEED
|
||||
BOARD_SPEED := $(strip $(BOARD_SPEED))
|
||||
$(call show_config_variable,BOARD_SPEED,[USER])
|
||||
endif
|
||||
|
||||
# If NO_CORE is set, then we don't have to parse boards.txt file
|
||||
# But the user might have to define MCU, F_CPU etc
|
||||
ifeq ($(strip $(NO_CORE)),)
|
||||
|
@ -686,7 +691,12 @@ ifeq ($(strip $(NO_CORE)),)
|
|||
endif
|
||||
|
||||
ifndef F_CPU
|
||||
F_CPU := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).build.f_cpu)
|
||||
ifdef BOARD_SPEED
|
||||
F_CPU := $(call PARSE_BOARD,$(BOARD_TAG),menu.speed.$(BOARD_SPEED).build.f_cpu)
|
||||
endif
|
||||
ifndef F_CPU
|
||||
F_CPU := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).build.f_cpu)
|
||||
endif
|
||||
ifndef F_CPU
|
||||
F_CPU := $(call PARSE_BOARD,$(BOARD_TAG),build.f_cpu)
|
||||
endif
|
||||
|
|
Loading…
Reference in a new issue