1#!/usr/bin/env bash
2# Copyright 2023-2024 Nordic Semiconductor ASA
3# SPDX-License-Identifier: Apache-2.0
4
5# Compile all the applications needed by the bsim tests in these subfolders
6
7#set -x #uncomment this line for debugging
8set -ue
9
10: "${ZEPHYR_BASE:?ZEPHYR_BASE must be set to point to the zephyr root\
11 directory}"
12
13source ${ZEPHYR_BASE}/tests/bsim/compile.source
14
15app=samples/bluetooth/peripheral_hr \
16  sysbuild=1 \
17  compile
18app=tests/bsim/bluetooth/samples/central_hr_peripheral_hr \
19  sysbuild=1 \
20  extra_conf_file=${ZEPHYR_BASE}/samples/bluetooth/central_hr/prj.conf \
21  compile
22app=samples/bluetooth/peripheral_hr \
23  sysbuild=1 \
24  conf_overlay=overlay-extended.conf \
25  compile
26app=tests/bsim/bluetooth/samples/central_hr_peripheral_hr \
27  sysbuild=1 \
28  extra_conf_file=${ZEPHYR_BASE}/samples/bluetooth/central_hr/prj.conf \
29  conf_overlay=${ZEPHYR_BASE}/samples/bluetooth/central_hr/overlay-extended.conf \
30  compile
31app=samples/bluetooth/peripheral_hr \
32  sysbuild=1 \
33  conf_overlay=overlay-phy_coded.conf \
34  compile
35app=tests/bsim/bluetooth/samples/central_hr_peripheral_hr \
36  sysbuild=1 \
37  extra_conf_file=${ZEPHYR_BASE}/samples/bluetooth/central_hr/prj.conf \
38  conf_overlay=${ZEPHYR_BASE}/samples/bluetooth/central_hr/overlay-phy_coded.conf \
39  compile
40if [ ${BOARD} == "nrf52_bsim/native" ]; then
41  app=tests/bsim/bluetooth/samples/battery_service \
42    conf_file=prj.conf \
43    compile
44fi
45
46wait_for_background_jobs
47