Compilation error when enabling the bluetooth (CONFIG_BT=y)

Hello,

I use NCS 2.8.0 and toolchain 2.8.0 for my build. Also, the boad is a custom board with NRF52840.

My zephyr application is structured as show in this link : https://github.com/nrfconnect/ncs-example-application 

My problem is that the program cannot be built when CONFIG_BT=y.

The following errors occur at the end of the compilation :

 [220/225] Linking C executable zephyr\zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map ....

............

./../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr/subsys/bluetooth/host/libsubsys__bluetooth__host.a(
hci_core.c.obj):(.data.bt_dev+0x16c): undefined reference to `__device_dts_ord_98'

collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Thank you for your help.

Best regards,

Parents
  • Hi,

    ./../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr/subsys/bluetooth/host/libsubsys__bluetooth__host.a(
    hci_core.c.obj):(.data.bt_dev+0x16c): undefined reference to `__device_dts_ord_98'

    This error might be devicetree problem for which there are some troubleshooting options.

    Best regards,
    Dejan

  • Hi Dejan,

    Thanks for your response. 

    Indeed, after verification in devicetree_generated.h, this DTS node ID concerns the bt_hci_sdc module that is used when the bluetooth is activated.
    So, I don't know why this error occured knowing that the build is complete for other code sample with BLE. 

    I have the following configurations if it helps : 

    CONFIG_GPIO=y
    CONFIG_PM_DEVICE=y
    CONFIG_REQUIRES_FULL_LIBC=y
    CONFIG_REQUIRES_FLOAT_PRINTF=y

    CONFIG_CMSIS_DSP=y
    CONFIG_CMSIS_DSP_FILTERING=y

    CONFIG_MAIN_STACK_SIZE=8192

    CONFIG_FLASH=y
    CONFIG_MPU_ALLOW_FLASH_WRITE=y
    CONFIG_FCB=y
    CONFIG_FLASH_MAP=y
    CONFIG_SETTINGS=y
    CONFIG_SETTINGS_FCB=y

    CONFIG_EVENTS=y
    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_BAS=y
    CONFIG_BT_SMP=y
    CONFIG_BT_DEVICE_NAME="My Device"
    Best regards,

Reply
  • Hi Dejan,

    Thanks for your response. 

    Indeed, after verification in devicetree_generated.h, this DTS node ID concerns the bt_hci_sdc module that is used when the bluetooth is activated.
    So, I don't know why this error occured knowing that the build is complete for other code sample with BLE. 

    I have the following configurations if it helps : 

    CONFIG_GPIO=y
    CONFIG_PM_DEVICE=y
    CONFIG_REQUIRES_FULL_LIBC=y
    CONFIG_REQUIRES_FLOAT_PRINTF=y

    CONFIG_CMSIS_DSP=y
    CONFIG_CMSIS_DSP_FILTERING=y

    CONFIG_MAIN_STACK_SIZE=8192

    CONFIG_FLASH=y
    CONFIG_MPU_ALLOW_FLASH_WRITE=y
    CONFIG_FCB=y
    CONFIG_FLASH_MAP=y
    CONFIG_SETTINGS=y
    CONFIG_SETTINGS_FCB=y

    CONFIG_EVENTS=y
    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_BAS=y
    CONFIG_BT_SMP=y
    CONFIG_BT_DEVICE_NAME="My Device"
    Best regards,

Children
Related