From 7802b0b939b318af9803a861380954d3357f5d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ayt=C3=BCrk=20D=C3=BCzen?= Date: Fri, 6 Sep 2024 14:19:50 +0200 Subject: [PATCH] zephyr: adapt 53 for sysbuild MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use sysbuild in tester app. No need to call manual cpurad/cpuapp anymore. hci_ipc build will be triggered automatically. Signed-off-by: Aytürk Düzen --- autopts/ptsprojects/boards/nrf53.py | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/autopts/ptsprojects/boards/nrf53.py b/autopts/ptsprojects/boards/nrf53.py index 38d0c1ba8b..e79ef3cd7b 100644 --- a/autopts/ptsprojects/boards/nrf53.py +++ b/autopts/ptsprojects/boards/nrf53.py @@ -28,24 +28,16 @@ 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' - if conf_file and conf_file != 'default' and conf_file != 'prj.conf': - bttester_overlay += f';{conf_file}' + cmd = ['west', 'build', '-p', 'auto', '-b', board] + if conf_file and conf_file not in ['default', 'prj.conf']: + if 'audio' in conf_file: + conf_file += ';overlay-le-audio-ctlr.conf' + cmd.extend(('--', f'-DOVERLAY_CONFIG=\'{conf_file}\'')) - cmd = ['west', 'build', '-b', board, '--', f'-DEXTRA_CONF_FILE=\'{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'-DEXTRA_CONF_FILE=\'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)