From 10d7ea9358990eca1a78dc76b8561a62153b71a4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 6 Apr 2022 11:18:32 +1000 Subject: [PATCH] Tools: recognise "AUTOBUILD_TARGETS None" and make for easier testing on command line --- Tools/scripts/board_list.py | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/Tools/scripts/board_list.py b/Tools/scripts/board_list.py index b3d3c8d152..d6a20ca33f 100755 --- a/Tools/scripts/board_list.py +++ b/Tools/scripts/board_list.py @@ -89,9 +89,13 @@ class BoardList(object): # a hwdef can specify which vehicles this target is valid for: match = re.match(r"AUTOBUILD_TARGETS\s*(.*)", line) if match is not None: - board.autobuild_targets = [ - x.rstrip().lstrip().lower() for x in match.group(1).split(",") - ] + mname = match.group(1) + if mname.lower() == 'none': + board.autobuild_targets = [] + else: + board.autobuild_targets = [ + x.rstrip().lstrip().lower() for x in mname.split(",") + ] def read_hwdef(self, filepath): fh = open(filepath) @@ -121,12 +125,6 @@ class BoardList(object): "iomcu", 'iomcu_f103_8MHz', - # evaluation boards - 'H757I_EVAL', - 'H757I_EVAL_intf', - "Nucleo-G491", - "NucleoH743", - # bdshot "CubeYellow-bdshot", "fmuv3-bdshot", @@ -168,11 +166,6 @@ class BoardList(object): "G4-ESC", "HereID", "HerePro", - - # evaluation boards - "H757I_EVAL", - "Nucleo-L476", - "Nucleo-L496", ] ret = [] for x in self.boards: @@ -186,3 +179,11 @@ class BoardList(object): AUTOBUILD_BOARDS = BoardList().find_autobuild_boards() AP_PERIPH_BOARDS = BoardList().find_ap_periph_boards() + +if __name__ == '__main__': + import sys + if len(sys.argv) < 2: + print("Usage: board_list.py TARGET") + sys.exit(1) + board_list = BoardList() + print(sorted(board_list.find_autobuild_boards(sys.argv[1])))