Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure when attempting to use external Bluetooth module with nRF53 #87024

Open
skordal opened this issue Mar 13, 2025 · 1 comment
Open
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx

Comments

@skordal
Copy link

skordal commented Mar 13, 2025

Describe the bug
I am attempting to use an nRF53 as host for an external IW612-based Bluetooth module. However, I am getting a build failure due to multiple definitions of bt_hci_transport_setup().

This is caused by Zephyr always including drivers/bluetooth/hci/nrf53_support.c in the build for nRF53, while also including drivers/bluetooth/hci/hci_nxp_setup.c due to my build settings (see below). Both drivers implement bt_hci_transport_setup(). The nRF53 support file is always included when CONFIG_SOC_NRF5340_CPUAPP is defined, which makes it impossible to disable through project configuration. Although you would usually want to use the nRF53 Bluetooth support, it would be nice to have the option of disabling this driver and use an external module instead.

Looking at drivers/bluetooth/hci/CMakeLists.txt, this is the only HCI driver which is not controlled by its own Kconfig setting. A possible solution could be to add a CONFIG_BT_NRF53 Kconfig option to control whether to include this driver in the build.

To Reproduce

  • Build for the nrf5340dk/nrf5340/cpuapp platform
  • Add CONFIG_BT_H4_NXP_CTLR=y to prj.conf
  • Add the external HCI controller to the device tree, using something like:
/ {
    chosen {
        zephyr,bt-hci = &bt_hci_uart;
    };
};

&uart1 {
    status = "okay";

    bt_hci_uart: bt_hci_uart {
        compatible = "zephyr,bt-hci-uart";
        status = "okay";

        bt_module: bt_module {
            compatible = "nxp,bt-hci-uart";
            status = "okay";

            hw-flow-control;
            hci-operation-speed = <1000000>;

            sdio-reset-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
            w-disable-gpios  = <&gpio1 7 GPIO_ACTIVE_HIGH>;

            fw-download-primary-speed = <115200>;
            fw-download-secondary-speed = <1000000>;
        };
    };
};

Expected behavior
Only one HCI driver should be included in the build.

Impact
It is currently not possible to use an nRF53 as host for an external Bluetooth controller over HCI.

@skordal skordal added the bug The issue is a bug, or the PR is fixing a bug label Mar 13, 2025
Copy link

Hi @skordal! We appreciate you submitting your first issue for our open-source project. 🌟

Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx
Projects
Status: To triage
Development

No branches or pull requests

4 participants