From 50be60e05c69ef898b32cdb1e0d04c1f78e5b7f6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 18 Jan 2020 20:36:31 +1100 Subject: [PATCH] Tools: update configure_all.py to help check all builds for Copter-4.0 --- Tools/scripts/configure_all.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Tools/scripts/configure_all.py b/Tools/scripts/configure_all.py index ebe29cd58c..93e1b40038 100755 --- a/Tools/scripts/configure_all.py +++ b/Tools/scripts/configure_all.py @@ -13,9 +13,11 @@ import argparse parser = argparse.ArgumentParser(description='configure all ChibiOS boards') parser.add_argument('--build', action='store_true', default=False, help='build as well as configure') +parser.add_argument('--build-target', default='copter', help='build target') parser.add_argument('--stop', action='store_true', default=False, help='stop on build fail') parser.add_argument('--no-bl', action='store_true', default=False, help="don't check bootloader builds") parser.add_argument('--pattern', default='*') +parser.add_argument('--python', default='python') args = parser.parse_args() os.environ['PYTHONUNBUFFERED'] = '1' @@ -46,22 +48,24 @@ for board in get_board_list(): if not fnmatch.fnmatch(board, args.pattern): continue print("Configuring for %s" % board) - run_program(["./waf", "configure", "--board", board], "configure: " + board) + run_program([args.python, "waf", "configure", "--board", board], "configure: " + board) if args.build: if board == "iomcu": target = "iofirmware" + elif board in ['CUAV_GPS', 'ZubaxGNSS'] or board.startswith('f103') or board.startswith('f303'): + target = "AP_Periph" else: - target = "copter" - run_program(["./waf", target], "build: " + board) + target = args.build_target + run_program([args.python, "waf", target], "build: " + board) if args.no_bl: continue # check for bootloader def hwdef_bl = os.path.join('libraries/AP_HAL_ChibiOS/hwdef/%s/hwdef-bl.dat' % board) if os.path.exists(hwdef_bl): print("Configuring bootloader for %s" % board) - run_program(["./waf", "configure", "--board", board, "--bootloader"], "configure: " + board + "-bl") + run_program([args.python, "waf", "configure", "--board", board, "--bootloader"], "configure: " + board + "-bl") if args.build: - run_program(["./waf", "bootloader"], "build: " + board + "-bl") + run_program([args.python, "waf", "bootloader"], "build: " + board + "-bl") if len(failures) > 0: print("Failed builds:")