@@ -579,41 +579,38 @@ ifeq ($(strip $(NO_CORE)),)
579
579
580
580
# Which variant ? This affects the include path
581
581
ifndef VARIANT
582
- VARIANT := $(call PARSE_BOARD,$(BOARD_TAG ) ,build.variant)
582
+ VARIANT := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu. $( BOARD_SUB ) . build.variant)
583
583
ifndef VARIANT
584
- # might be a submenu
585
- VARIANT := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .build.variant)
584
+ VARIANT := $(call PARSE_BOARD,$(BOARD_TAG ) ,build.variant)
586
585
endif
587
586
$(call show_config_variable,VARIANT,[COMPUTED],(from build.variant))
588
587
else
589
588
$(call show_config_variable,VARIANT,[USER])
590
589
endif
591
590
592
591
# see if we are a caterina device like leonardo or micro
593
- CATERINA := $(findstring caterina,$(call PARSE_BOARD,$(BOARD_TAG ) ,bootloader.path ) )
592
+ CATERINA := $(findstring caterina,$(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu. $( BOARD_SUB ) . bootloader.file ) )
594
593
ifndef CATERINA
595
- # bootloader.path is deprecated in 1.5, its now part of bootloader.file
594
+ # 1.5+ method if not a submenu
596
595
CATERINA := $(findstring caterina,$(call PARSE_BOARD,$(BOARD_TAG ) ,bootloader.file) )
597
596
endif
598
597
ifndef CATERINA
599
- # might be a submenu
600
- CATERINA := $(findstring caterina,$(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu. $( BOARD_SUB ) . bootloader.file ) )
598
+ # 1.0 method uses deprecated bootloader.path
599
+ CATERINA := $(findstring caterina,$(call PARSE_BOARD,$(BOARD_TAG ) ,bootloader.path ) )
601
600
endif
602
601
603
602
# processor stuff
604
603
ifndef MCU
605
- MCU := $(call PARSE_BOARD,$(BOARD_TAG ) ,build.mcu)
604
+ MCU := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu. $( BOARD_SUB ) . build.mcu)
606
605
ifndef MCU
607
- # might be a submenu
608
- MCU := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .build.mcu)
606
+ MCU := $(call PARSE_BOARD,$(BOARD_TAG ) ,build.mcu)
609
607
endif
610
608
endif
611
609
612
610
ifndef F_CPU
613
- F_CPU := $(call PARSE_BOARD,$(BOARD_TAG ) ,build.f_cpu)
611
+ F_CPU := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu. $( BOARD_SUB ) . build.f_cpu)
614
612
ifndef F_CPU
615
- # might be a submenu
616
- F_CPU := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .build.f_cpu)
613
+ F_CPU := $(call PARSE_BOARD,$(BOARD_TAG ) ,build.f_cpu)
617
614
endif
618
615
endif
619
616
@@ -630,18 +627,16 @@ ifeq ($(strip $(NO_CORE)),)
630
627
631
628
# normal programming info
632
629
ifndef AVRDUDE_ARD_PROGRAMMER
633
- AVRDUDE_ARD_PROGRAMMER := $(call PARSE_BOARD,$(BOARD_TAG ) ,upload.protocol)
630
+ AVRDUDE_ARD_PROGRAMMER := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu. $( BOARD_SUB ) . upload.protocol)
634
631
ifndef AVRDUDE_ARD_PROGRAMMER
635
- # might be a submenu
636
- AVRDUDE_ARD_PROGRAMMER := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .upload.protocol)
632
+ AVRDUDE_ARD_PROGRAMMER := $(call PARSE_BOARD,$(BOARD_TAG ) ,upload.protocol)
637
633
endif
638
634
endif
639
635
640
636
ifndef AVRDUDE_ARD_BAUDRATE
641
- AVRDUDE_ARD_BAUDRATE := $(call PARSE_BOARD,$(BOARD_TAG ) ,upload.speed)
637
+ AVRDUDE_ARD_BAUDRATE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu. $( BOARD_SUB ) . upload.speed)
642
638
ifndef AVRDUDE_ARD_BAUDRATE
643
- # might be a submenu
644
- AVRDUDE_ARD_BAUDRATE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .upload.speed)
639
+ AVRDUDE_ARD_BAUDRATE := $(call PARSE_BOARD,$(BOARD_TAG ) ,upload.speed)
645
640
endif
646
641
endif
647
642
@@ -651,26 +646,23 @@ ifeq ($(strip $(NO_CORE)),)
651
646
endif
652
647
653
648
ifndef ISP_HIGH_FUSE
654
- ISP_HIGH_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,bootloader.high_fuses)
649
+ ISP_HIGH_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu. $( BOARD_SUB ) . bootloader.high_fuses)
655
650
ifndef ISP_HIGH_FUSE
656
- # might be a submenu
657
- ISP_HIGH_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .bootloader.high_fuses)
651
+ ISP_HIGH_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,bootloader.high_fuses)
658
652
endif
659
653
endif
660
654
661
655
ifndef ISP_LOW_FUSE
662
- ISP_LOW_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,bootloader.low_fuses)
656
+ ISP_LOW_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu. $( BOARD_SUB ) . bootloader.low_fuses)
663
657
ifndef ISP_LOW_FUSE
664
- # might be a submenu
665
- ISP_LOW_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .bootloader.low_fuses)
658
+ ISP_LOW_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,bootloader.low_fuses)
666
659
endif
667
660
endif
668
661
669
662
ifndef ISP_EXT_FUSE
670
- ISP_EXT_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,bootloader.extended_fuses)
663
+ ISP_EXT_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu. $( BOARD_SUB ) . bootloader.extended_fuses)
671
664
ifndef ISP_EXT_FUSE
672
- # might be a submenu
673
- ISP_EXT_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .bootloader.extended_fuses)
665
+ ISP_EXT_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,bootloader.extended_fuses)
674
666
endif
675
667
endif
676
668
@@ -679,10 +671,9 @@ ifeq ($(strip $(NO_CORE)),)
679
671
endif
680
672
681
673
ifndef BOOTLOADER_FILE
682
- BOOTLOADER_FILE := $(call PARSE_BOARD,$(BOARD_TAG ) ,bootloader.file)
674
+ BOOTLOADER_FILE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu. $( BOARD_SUB ) . bootloader.file)
683
675
ifndef BOOTLOADER_FILE
684
- # might be a submenu
685
- BOOTLOADER_FILE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .bootloader.file)
676
+ BOOTLOADER_FILE := $(call PARSE_BOARD,$(BOARD_TAG ) ,bootloader.file)
686
677
endif
687
678
endif
688
679
@@ -691,10 +682,9 @@ ifeq ($(strip $(NO_CORE)),)
691
682
endif
692
683
693
684
ifndef HEX_MAXIMUM_SIZE
694
- HEX_MAXIMUM_SIZE := $(call PARSE_BOARD,$(BOARD_TAG ) ,upload.maximum_size)
685
+ HEX_MAXIMUM_SIZE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu. $( BOARD_SUB ) . upload.maximum_size)
695
686
ifndef HEX_MAXIMUM_SIZE
696
- # might be a submenu
697
- HEX_MAXIMUM_SIZE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .upload.maximum_size)
687
+ HEX_MAXIMUM_SIZE := $(call PARSE_BOARD,$(BOARD_TAG ) ,upload.maximum_size)
698
688
endif
699
689
endif
700
690
0 commit comments