mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-19 05:42:28 +00:00
update build_all.py to support both single board and family group
This commit is contained in:
parent
4f41501fc7
commit
ffe0fc7537
@ -40,7 +40,12 @@ all_examples.sort()
|
|||||||
all_boards = []
|
all_boards = []
|
||||||
|
|
||||||
for entry in os.scandir("hw/bsp"):
|
for entry in os.scandir("hw/bsp"):
|
||||||
if entry.is_dir():
|
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)
|
all_boards.append(entry.name)
|
||||||
|
|
||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
@ -67,15 +72,14 @@ def build_size(example, board):
|
|||||||
|
|
||||||
def skip_example(example, board):
|
def skip_example(example, board):
|
||||||
ex_dir = 'examples/' + example
|
ex_dir = 'examples/' + example
|
||||||
|
|
||||||
board_mk = 'hw/bsp/{}/board.mk'.format(board)
|
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:
|
with open(board_mk) as mk:
|
||||||
mk_contents = mk.read()
|
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
|
# Skip all OPT_MCU_NONE these are WIP port
|
||||||
if '-DCFG_TUSB_MCU=OPT_MCU_NONE' in mk_contents:
|
if '-DCFG_TUSB_MCU=OPT_MCU_NONE' in mk_contents:
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user