diff options
Diffstat (limited to 'Arduino.mk')
| -rw-r--r-- | Arduino.mk | 33 |
1 files changed, 29 insertions, 4 deletions
@@ -641,6 +641,11 @@ else $(call show_config_variable,BOARD_TAG,[USER]) endif +ifdef BOARD_CLOCK + BOARD_CLOCK := $(strip $(BOARD_CLOCK)) + $(call show_config_variable,BOARD_CLOCK,[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_CLOCK + F_CPU := $(call PARSE_BOARD,$(BOARD_TAG),menu.(speed|clock).$(BOARD_CLOCK).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 @@ -731,21 +741,36 @@ ifeq ($(strip $(NO_CORE)),) endif ifndef ISP_HIGH_FUSE - ISP_HIGH_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).bootloader.high_fuses) + ifdef BOARD_CLOCK + ISP_HIGH_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),menu.(speed|clock).$(BOARD_CLOCK).bootloader.high_fuses) + endif + ifndef ISP_HIGH_FUSE + ISP_HIGH_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).bootloader.high_fuses) + endif 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.(chip|cpu).$(BOARD_SUB).bootloader.low_fuses) + ifdef BOARD_CLOCK + ISP_LOW_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),menu.(speed|clock).$(BOARD_CLOCK).bootloader.low_fuses) + endif + ifndef ISP_LOW_FUSE + ISP_LOW_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).bootloader.low_fuses) + endif 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.(chip|cpu).$(BOARD_SUB).bootloader.extended_fuses) + ifdef BOARD_CLOCK + ISP_EXT_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),menu.(speed|clock).$(BOARD_CLOCK).bootloader.extended_fuses) + endif + ifndef ISP_EXT_FUSE + ISP_EXT_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),menu.(chip|cpu).$(BOARD_SUB).bootloader.extended_fuses) + endif ifndef ISP_EXT_FUSE ISP_EXT_FUSE := $(call PARSE_BOARD,$(BOARD_TAG),bootloader.extended_fuses) endif |
