ncs 2.8.0 fails to build zephyr's bluetooth ISO_CENTRAL and ISO_PERIPHERAL samples on 52840DK

HW: 52840DK PCA10056 3.0.1 2023.16

NCS SDK: v2.8.0

I want to test Zephyr's BLE controller instead of the default SoftDevice controller, and the `prj.conf` of ISO_CENTRAL sample is configured as follows:

CONFIG_BT=y
CONFIG_LOG=y
CONFIG_BT_ISO_CENTRAL=y
CONFIG_BT_LL_SW_SPLIT=y

During the build there is an error `undefined reference to `__device_dts_ord_134`. Check the `build/iso_central/zephyr/include/generated/zephyr/devicetree_generated.h` file the ORD 134 corresponds to `/soc/radio@40001000/bt_hci_sdc`, which is SoftDevice controller. The SoftDevice controller should be disable when `CONFIG_BT_LL_SW_SPLIT=y` is set. Please help me clarify the underlying cause and resolve the issue.

Following is the build log

[231/236] Linking C executable zephyr/zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map /home/os-chiyuehlin/VSCodeProjects/iso_central/build/iso_central/zephyr/zephyr_pre0.map
: && ccache /home/os-chiyuehlin/ncs/toolchains/b81a7cd864/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -Os -DNDEBUG -gdwarf-4 zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr/zephyr_pre0.elf  zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj  -fuse-ld=bfd  -T  zephyr/linker_zephyr_pre0.cmd  -Wl,-Map=/home/os-chiyuehlin/VSCodeProjects/iso_central/build/iso_central/zephyr/zephyr_pre0.map  -Wl,--whole-archive  app/libapp.a  zephyr/libzephyr.a  zephyr/arch/common/libarch__common.a  zephyr/arch/arch/arm/core/libarch__arm__core.a  zephyr/arch/arch/arm/core/cortex_m/libarch__arm__core__cortex_m.a  zephyr/arch/arch/arm/core/mpu/libarch__arm__core__mpu.a  zephyr/lib/libc/picolibc/liblib__libc__picolibc.a  zephyr/lib/libc/common/liblib__libc__common.a  zephyr/lib/net_buf/liblib__net_buf.a  zephyr/soc/soc/nrf52840/libsoc__nordic.a  zephyr/subsys/random/libsubsys__random.a  zephyr/subsys/bluetooth/common/libsubsys__bluetooth__common.a  zephyr/subsys/bluetooth/host/libsubsys__bluetooth__host.a  zephyr/subsys/bluetooth/controller/libsubsys__bluetooth__controller.a  zephyr/subsys/bluetooth/controller/ll_sw/nordic/libsubsys__bluetooth__controller__ll_sw__nordic.a  zephyr/drivers/clock_control/libdrivers__clock_control.a  zephyr/drivers/console/libdrivers__console.a  zephyr/drivers/entropy/libdrivers__entropy.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/pinctrl/libdrivers__pinctrl.a  zephyr/drivers/serial/libdrivers__serial.a  zephyr/drivers/timer/libdrivers__timer.a  modules/nrf/drivers/hw_cc3xx/lib..__nrf__drivers__hw_cc3xx.a  modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a  modules/segger/libmodules__segger.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  -L"/home/os-chiyuehlin/ncs/toolchains/b81a7cd864/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/thumb/v7e-m/nofp"  -L/home/os-chiyuehlin/VSCodeProjects/iso_central/build/iso_central/zephyr  -lgcc  zephyr/arch/common/libisr_tables.a  -mcpu=cortex-m4  -mthumb  -mabi=aapcs  -mfp16-format=ieee  -mtp=soft  -Wl,--gc-sections  -Wl,--build-id=none  -Wl,--sort-common=descending  -Wl,--sort-section=alignment  -Wl,-u,_OffsetAbsSyms  -Wl,-u,_ConfigAbsSyms  -nostdlib  -static  -Wl,-X  -Wl,-N  -Wl,--orphan-handling=warn  -Wl,-no-pie  -DPICOLIBC_LONG_LONG_PRINTF_SCANF  /home/os-chiyuehlin/ncs/v2.8.0/nrfxlib/crypto/nrf_cc310_platform/lib/cortex-m4/soft-float/no-interrupts/libnrf_cc310_platform_0.9.19.a  --specs=picolibc.specs  -lc  -lgcc && cd /home/os-chiyuehlin/VSCodeProjects/iso_central/build/iso_central/zephyr && /home/os-chiyuehlin/ncs/toolchains/b81a7cd864/usr/local/bin/cmake -E true
/home/os-chiyuehlin/ncs/toolchains/b81a7cd864/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/subsys/bluetooth/host/libsubsys__bluetooth__host.a(hci_core.c.obj):(.data.bt_dev+0x184): undefined reference to `__device_dts_ord_134'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
FAILED: _sysbuild/sysbuild/images/iso_central-prefix/src/iso_central-stamp/iso_central-build /home/os-chiyuehlin/VSCodeProjects/iso_central/build/_sysbuild/sysbuild/images/iso_central-prefix/src/iso_central-stamp/iso_central-build
cd /home/os-chiyuehlin/VSCodeProjects/iso_central/build/iso_central && /home/os-chiyuehlin/ncs/toolchains/b81a7cd864/usr/local/bin/cmake --build .
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /home/os-chiyuehlin/ncs/toolchains/b81a7cd864/usr/local/bin/cmake --build /home/os-chiyuehlin/VSCodeProjects/iso_central/build

Parents
  • Ok, after discussing with our developers, it seems like it is not a bug. From 2.8.0 you need to  build using the snippet "bt-ll-sw-split" in order to build with the Zephyr Bluetooth LE Controller. In some samples, such as the ISO_central sample, you also need to add the .conf file: overlay-bt_ll_sw_split.conf (if they are present). 

    How you include these are dependent on how you are setting up your build configuration. If you are using the VS Code plugin, there are drop down menus when creating your build configuration. In that case, you should select the "Extra Kconfig fragments", and select the overlay-bt_ll_sw_split.conf. Similarly, under "Snippets", click "add snippet", and select the bt-ll-sw-split. In both cases, remember to click "ok", for it to actually be included.

    If you are using command line directly to build, you can add these arguments:

    -DSNIPPET="bt-ll-sw-split" -DEXTRA_CONF_FILE=overlay-bt_ll_sw_split.conf

    Best regards,

    Edvin

Reply
  • Ok, after discussing with our developers, it seems like it is not a bug. From 2.8.0 you need to  build using the snippet "bt-ll-sw-split" in order to build with the Zephyr Bluetooth LE Controller. In some samples, such as the ISO_central sample, you also need to add the .conf file: overlay-bt_ll_sw_split.conf (if they are present). 

    How you include these are dependent on how you are setting up your build configuration. If you are using the VS Code plugin, there are drop down menus when creating your build configuration. In that case, you should select the "Extra Kconfig fragments", and select the overlay-bt_ll_sw_split.conf. Similarly, under "Snippets", click "add snippet", and select the bt-ll-sw-split. In both cases, remember to click "ok", for it to actually be included.

    If you are using command line directly to build, you can add these arguments:

    -DSNIPPET="bt-ll-sw-split" -DEXTRA_CONF_FILE=overlay-bt_ll_sw_split.conf

    Best regards,

    Edvin

Children
No Data
Related