This commit makes the device tree configuration decide which link layer is compiled in. We do this to avoid hard-to-understand linker errors referencing device tree nodes. The following configuration creates a difficult to parse linker error: * BT_LL_CHOICE contains multiple entries, BT_LL_SW_SPLIT is selected. * Each BT_LL_CHOICE has its own unique device tree node with its own "compatible". * Only one of the link layer device tree nodes has status "okay", but not the one corresponding to BT_LL_SW_SPLIT. The linker error indicates that code using the HCI driver fails to link with the controller. This because the HCI driver device tree node references the link layer selected in devicetree which is not compiled in. By adding a dependendency to the device tree node, this can no longer happen. Instead, if BT_LL_SW_SPLIT is now selected in a configuration file, a Kconfig warning will be issued: ``` warning: The choice symbol BT_LL_SW_SPLIT (defined at subsys/bluetooth/controller/Kconfig:129) was selected (set =y), but BT_LL_SOFTDEVICE (defined at /home/ruge/ncs/nrf/subsys/bluetooth/controller/Kconfig:11) ended up as the choice selection. ``` This should be easier to understand than: ``` ...(hci_core.c.obj):(.data.bt_dev+0x16c): undefined reference to `__device_dts_ord_132' ``` After this commit we should consider getting rid of link layer selection from Kconfig completely as the link layer is in practice selected through device tree. Unit tests have been updated to satisfy the dts dependency. Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
63 lines
1.9 KiB
Plaintext
63 lines
1.9 KiB
Plaintext
# Bluetooth Controller configuration options for ISO-AL Unit Tests
|
|
|
|
# Copyright (c) 2022 Oticon A/S
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
config BT_CTLR_CONN_ISO
|
|
bool "LE Connected Isochronous Streams (for unit tests)"
|
|
|
|
config BT_CTLR_CONN_ISO_GROUPS
|
|
int "LE Connected Isochronous Groups (for unit tests)"
|
|
depends on BT_CTLR_CONN_ISO
|
|
range 1 240
|
|
default 1
|
|
|
|
parent-module = BT
|
|
module = BT_CTLR_ISOAL
|
|
module-str = "Bluetooth Controller ISO-AL"
|
|
source "subsys/logging/Kconfig.template.log_config_inherit"
|
|
|
|
config BT_CTLR_ISOAL_LOG_DBG_VERBOSE
|
|
bool "ISO-AL verbose debug logging"
|
|
depends on BT_CTLR_ISOAL_LOG_LEVEL = 4
|
|
default n
|
|
help
|
|
Use this option to enable ISO-AL verbose debug logging.
|
|
|
|
config BT_CTLR_ISOAL_SINKS
|
|
int "Number of Isochronous Adaptation Layer sinks (for unit tests)"
|
|
|
|
config BT_CTLR_ISOAL_SOURCES
|
|
int "Number of Isochronous Adaptation Layer sinks (for unit tests)"
|
|
|
|
config BT_CTLR_ISO_RX_SDU_BUFFERS
|
|
int "Number of SDU fragments that the ISO-AL can buffer"
|
|
depends on BT_CTLR_ISO_RX_BUFFER_SDUS
|
|
default 0
|
|
range 0 64
|
|
help
|
|
Set the number of Isochronous Rx SDU fragments to be buffered in the
|
|
ISO-AL per channel. Buffering is required to compute the size of the
|
|
received SDU across all the fragments before each is released. The
|
|
number of buffers and maximum SDU fragment size will limit the maximum
|
|
size of an SDU that can be accurately declared in the HCI ISO Data
|
|
header.
|
|
|
|
config BT_CTLR_ISO_TX_SEG_PLAYLOAD_MIN
|
|
int "Minimum number of playload data bytes in a new segment"
|
|
depends on BT_CTLR_ADV_ISO || BT_CTLR_CONN_ISO
|
|
default 1
|
|
range 1 64
|
|
help
|
|
Minimum number of payload bytes that would make inserting a new
|
|
segment into a PDU worthwhile.
|
|
|
|
config BT_CTLR_ISOAL_SN_STRICT
|
|
bool "Enforce Strict Tx ISO Data Sequence Number use"
|
|
depends on BT_CTLR_ADV_ISO || BT_CTLR_CONN_ISO
|
|
default y
|
|
|
|
source "tests/bluetooth/controller/common/Kconfig"
|
|
|
|
source "Kconfig.zephyr"
|