diff options
| author | Ha Thach <[email protected]> | 2021-01-22 11:29:42 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-01-22 11:29:42 +0700 |
| commit | edd91d28f5afa175d7f52ec1bf1845ff29aabab9 (patch) | |
| tree | 712d223dd102497b8d4764db50d9b3eaa7f82fef /tools | |
| parent | 388abe9d9cc0a7c360fd902e01461a53bb7b3f42 (diff) | |
| parent | 0cf2b02791bee41583f58b65c57bdac4ca1faf45 (diff) | |
Merge pull request #599 from hathach/group-boards-into-family
Group boards into family
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/build_all.py | 16 | ||||
| -rw-r--r-- | tools/build_esp32s.py | 7 |
2 files changed, 12 insertions, 11 deletions
diff --git a/tools/build_all.py b/tools/build_all.py index 172cb2070..787011e26 100644 --- a/tools/build_all.py +++ b/tools/build_all.py @@ -40,8 +40,13 @@ all_examples.sort() all_boards = [] for entry in os.scandir("hw/bsp"): - if entry.is_dir(): - all_boards.append(entry.name) + if entry.is_dir() and entry.name != "esp32s2": + if os.path.isdir(entry.path + "/boards"): + # family directory + for subentry in os.scandir(entry.path + "/boards"): + if subentry.is_dir(): all_boards.append(subentry.name) + else: + all_boards.append(entry.name) if len(sys.argv) > 1: input_boards = list(set(all_boards).intersection(sys.argv)) @@ -67,15 +72,14 @@ def build_size(example, board): def skip_example(example, board): ex_dir = 'examples/' + example + board_mk = 'hw/bsp/{}/board.mk'.format(board) + if not os.path.exists(board_mk): + board_mk = list(glob.iglob('hw/bsp/*/boards/{}/../../family.mk'.format(board)))[0] with open(board_mk) as mk: mk_contents = mk.read() - # Skip all ESP32-S2 board for CI - if 'CROSS_COMPILE = xtensa-esp32s2-elf-' in mk_contents: - return 1 - # Skip all OPT_MCU_NONE these are WIP port if '-DCFG_TUSB_MCU=OPT_MCU_NONE' in mk_contents: return 1 diff --git a/tools/build_esp32s.py b/tools/build_esp32s.py index 44364806b..c63bbf6d2 100644 --- a/tools/build_esp32s.py +++ b/tools/build_esp32s.py @@ -34,12 +34,9 @@ all_boards = [] if len(sys.argv) > 2: all_boards.append(sys.argv[2]) else: - for entry in os.scandir("hw/bsp"): + for entry in os.scandir("hw/bsp/esp32s2/boards"): if entry.is_dir(): - with open(entry.path + '/board.mk') as mk: - # Only includes ESP32-S2 board - if 'CROSS_COMPILE = xtensa-esp32s2-elf-' in mk.read(): - all_boards.append(entry.name) + all_boards.append(entry.name) all_boards.sort() |
