From 3d391ebf63b72e281adb8a3c4197640a0e060499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Battrel=2C=20Th=C3=A9o?= Date: Wed, 29 May 2024 09:48:59 +0200 Subject: [PATCH] boards: use sysbuild for nrf53 Remove custom build steps for nrf53 and rely on sysbuild instead. --- autopts/ptsprojects/boards/nrf53.py | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/autopts/ptsprojects/boards/nrf53.py b/autopts/ptsprojects/boards/nrf53.py index aa62a50c3a..edd86a15ae 100644 --- a/autopts/ptsprojects/boards/nrf53.py +++ b/autopts/ptsprojects/boards/nrf53.py @@ -18,7 +18,6 @@ board_type = 'nrf5340dk/nrf5340/cpuapp' - def build_and_flash(zephyr_wd, board, debugger_snr, conf_file=None, *args): """Build and flash Zephyr binary :param zephyr_wd: Zephyr source path @@ -28,24 +27,14 @@ def build_and_flash(zephyr_wd, board, debugger_snr, conf_file=None, *args): """ logging.debug("%s: %s %s %s", build_and_flash.__name__, zephyr_wd, board, conf_file) - - tester_dir = os.path.join(zephyr_wd, 'tests', 'bluetooth', 'tester') - controller_dir = os.path.join(zephyr_wd, 'samples', 'bluetooth', 'hci_ipc') + tester_dir = os.path.join(zephyr_wd, "tests", "bluetooth", "tester") check_call('rm -rf build/'.split(), cwd=tester_dir) - check_call('rm -rf build/'.split(), cwd=controller_dir) - bttester_overlay = 'nrf5340_hci_ipc.conf' + cmd = ['west', 'build', '--sysbuild', '-p', 'auto', '-b', board] + if conf_file and conf_file not in ['default', 'prj.conf']: + cmd.extend(('--', f'-DOVERLAY_CONFIG=\'{conf_file}\'')) - if conf_file and conf_file != 'default' and conf_file != 'prj.conf': - bttester_overlay += f';{conf_file}' - - cmd = ['west', 'build', '-b', board, '--', f'-DOVERLAY_CONFIG=\'{bttester_overlay}\''] check_call(cmd, cwd=tester_dir) - check_call(['west', 'flash', '--skip-rebuild', '--recover', '-i', debugger_snr], cwd=tester_dir) - - cmd = ['west', 'build', '-b', 'nrf5340dk/nrf5340/cpunet', '--', - f'-DOVERLAY_CONFIG=\'nrf5340_cpunet_iso-bt_ll_sw_split.conf;' - f'../../../tests/bluetooth/tester/nrf5340_hci_ipc_cpunet.conf\''] - check_call(cmd, cwd=controller_dir) - check_call(['west', 'flash', '--skip-rebuild', '-i', debugger_snr], cwd=controller_dir) + check_call(['west', 'flash', '--skip-rebuild', '--recover', + '-i', debugger_snr], cwd=tester_dir)