@@ -572,7 +572,7 @@ endif
572
572
573
573
ifndef PARSE_BOARD
574
574
# result = $(call READ_BOARD_TXT, 'boardname', 'parameter')
575
- PARSE_BOARD = $(shell grep -v '^\#' $(BOARDS_TXT ) | grep "^[ \t]* $(1 ) .$(2 ) =" | cut -d = -f 2)
575
+ PARSE_BOARD = $(shell grep -Ev '^\#' $(BOARDS_TXT ) | grep -E "^[ \t]* $(1 ) .$(2 ) =" | cut -d = -f 2)
576
576
endif
577
577
578
578
# If NO_CORE is set, then we don't have to parse boards.txt file
@@ -591,7 +591,7 @@ ifeq ($(strip $(NO_CORE)),)
591
591
592
592
# Which variant ? This affects the include path
593
593
ifndef VARIANT
594
- VARIANT := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .build.variant)
594
+ VARIANT := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.(chip| cpu) .$(BOARD_SUB ) .build.variant)
595
595
ifndef VARIANT
596
596
VARIANT := $(call PARSE_BOARD,$(BOARD_TAG ) ,build.variant)
597
597
endif
@@ -601,7 +601,7 @@ ifeq ($(strip $(NO_CORE)),)
601
601
endif
602
602
603
603
# see if we are a caterina device like leonardo or micro
604
- CATERINA := $(findstring caterina,$(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .bootloader.file) )
604
+ CATERINA := $(findstring caterina,$(call PARSE_BOARD,$(BOARD_TAG ) ,menu.(chip| cpu) .$(BOARD_SUB ) .bootloader.file) )
605
605
ifndef CATERINA
606
606
# 1.5+ method if not a submenu
607
607
CATERINA := $(findstring caterina,$(call PARSE_BOARD,$(BOARD_TAG ) ,bootloader.file) )
@@ -613,14 +613,14 @@ ifeq ($(strip $(NO_CORE)),)
613
613
614
614
# processor stuff
615
615
ifndef MCU
616
- MCU := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .build.mcu)
616
+ MCU := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.(chip| cpu) .$(BOARD_SUB ) .build.mcu)
617
617
ifndef MCU
618
618
MCU := $(call PARSE_BOARD,$(BOARD_TAG ) ,build.mcu)
619
619
endif
620
620
endif
621
621
622
622
ifndef F_CPU
623
- F_CPU := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .build.f_cpu)
623
+ F_CPU := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.(chip| cpu) .$(BOARD_SUB ) .build.f_cpu)
624
624
ifndef F_CPU
625
625
F_CPU := $(call PARSE_BOARD,$(BOARD_TAG ) ,build.f_cpu)
626
626
endif
@@ -639,14 +639,14 @@ ifeq ($(strip $(NO_CORE)),)
639
639
640
640
# normal programming info
641
641
ifndef AVRDUDE_ARD_PROGRAMMER
642
- AVRDUDE_ARD_PROGRAMMER := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .upload.protocol)
642
+ AVRDUDE_ARD_PROGRAMMER := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.(chip| cpu) .$(BOARD_SUB ) .upload.protocol)
643
643
ifndef AVRDUDE_ARD_PROGRAMMER
644
644
AVRDUDE_ARD_PROGRAMMER := $(call PARSE_BOARD,$(BOARD_TAG ) ,upload.protocol)
645
645
endif
646
646
endif
647
647
648
648
ifndef AVRDUDE_ARD_BAUDRATE
649
- AVRDUDE_ARD_BAUDRATE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .upload.speed)
649
+ AVRDUDE_ARD_BAUDRATE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.(chip| cpu) .$(BOARD_SUB ) .upload.speed)
650
650
ifndef AVRDUDE_ARD_BAUDRATE
651
651
AVRDUDE_ARD_BAUDRATE := $(call PARSE_BOARD,$(BOARD_TAG ) ,upload.speed)
652
652
endif
@@ -658,21 +658,21 @@ ifeq ($(strip $(NO_CORE)),)
658
658
endif
659
659
660
660
ifndef ISP_HIGH_FUSE
661
- ISP_HIGH_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .bootloader.high_fuses)
661
+ ISP_HIGH_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.(chip| cpu) .$(BOARD_SUB ) .bootloader.high_fuses)
662
662
ifndef ISP_HIGH_FUSE
663
663
ISP_HIGH_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,bootloader.high_fuses)
664
664
endif
665
665
endif
666
666
667
667
ifndef ISP_LOW_FUSE
668
- ISP_LOW_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .bootloader.low_fuses)
668
+ ISP_LOW_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.(chip| cpu) .$(BOARD_SUB ) .bootloader.low_fuses)
669
669
ifndef ISP_LOW_FUSE
670
670
ISP_LOW_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,bootloader.low_fuses)
671
671
endif
672
672
endif
673
673
674
674
ifndef ISP_EXT_FUSE
675
- ISP_EXT_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .bootloader.extended_fuses)
675
+ ISP_EXT_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.(chip| cpu) .$(BOARD_SUB ) .bootloader.extended_fuses)
676
676
ifndef ISP_EXT_FUSE
677
677
ISP_EXT_FUSE := $(call PARSE_BOARD,$(BOARD_TAG ) ,bootloader.extended_fuses)
678
678
endif
@@ -683,7 +683,7 @@ ifeq ($(strip $(NO_CORE)),)
683
683
endif
684
684
685
685
ifndef BOOTLOADER_FILE
686
- BOOTLOADER_FILE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .bootloader.file)
686
+ BOOTLOADER_FILE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.(chip| cpu) .$(BOARD_SUB ) .bootloader.file)
687
687
ifndef BOOTLOADER_FILE
688
688
BOOTLOADER_FILE := $(call PARSE_BOARD,$(BOARD_TAG ) ,bootloader.file)
689
689
endif
@@ -694,7 +694,7 @@ ifeq ($(strip $(NO_CORE)),)
694
694
endif
695
695
696
696
ifndef HEX_MAXIMUM_SIZE
697
- HEX_MAXIMUM_SIZE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.cpu.$(BOARD_SUB ) .upload.maximum_size)
697
+ HEX_MAXIMUM_SIZE := $(call PARSE_BOARD,$(BOARD_TAG ) ,menu.(chip| cpu) .$(BOARD_SUB ) .upload.maximum_size)
698
698
ifndef HEX_MAXIMUM_SIZE
699
699
HEX_MAXIMUM_SIZE := $(call PARSE_BOARD,$(BOARD_TAG ) ,upload.maximum_size)
700
700
endif
@@ -1504,7 +1504,7 @@ show_boards:
1504
1504
@$(CAT ) $(BOARDS_TXT ) | grep -E ' ^[a-zA-Z0-9_\-]+.name' | sort -uf | sed ' s/.name=/:/' | column -s: -t
1505
1505
1506
1506
show_submenu :
1507
- @$(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
1507
+ @$(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
1508
1508
1509
1509
monitor :
1510
1510
ifeq ($(MONITOR_CMD ) , 'putty')
0 commit comments