Tools: make configure_all.py smarter about AP_Periph builds

This commit is contained in:
Andrew Tridgell 2021-03-15 16:23:49 +11:00
parent 2842730868
commit 5b7723d3d0

View File

@ -61,6 +61,18 @@ if args.start is not None:
sys.exit(1)
board_list = board_list[args.start-1:]
def is_ap_periph(board):
hwdef = os.path.join('libraries/AP_HAL_ChibiOS/hwdef/%s/hwdef.dat' % board)
try:
r = open(hwdef, 'r').read()
if r.find('periph/hwdef.dat') != -1 or r.find('AP_PERIPH') != -1:
print("%s is AP_Periph" % board)
return True
except Exception as ex:
pass
return False
for board in board_list:
done.append(board)
print("Configuring for %s [%u/%u failed=%u]" % (board, len(done), len(board_list), len(failures)))
@ -71,7 +83,7 @@ for board in board_list:
if args.build:
if board == "iomcu":
target = "iofirmware"
elif board in ['CUAV_GPS', 'ZubaxGNSS'] or board.startswith('f103') or board.startswith('f303'):
elif is_ap_periph(board):
target = "AP_Periph"
else:
target = args.build_target