diff options
| author | Donna Whisnant <dewhisna@users.noreply.github.com> | 2018-11-11 13:01:52 -0600 |
|---|---|---|
| committer | Donna Whisnant <dewhisna@users.noreply.github.com> | 2018-11-11 13:01:52 -0600 |
| commit | 0f02622467e3cdcc4ac2e44d23437c548385756a (patch) | |
| tree | 2898e806b1c2b225cf699b4140509023dc36bc92 /Arduino.mk | |
| parent | 5a0c80bf0c8fbfd5a997998a7c08ba9596c72a3f (diff) | |
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
Diffstat (limited to 'Arduino.mk')
| -rw-r--r-- | Arduino.mk | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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 |
