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

driver: bt: add BT_BUILD_ONLY_MODE to allow CI tests #80786

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion boards/01space/esp32c3_042_oled/esp32c3_042_oled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: 01space
1 change: 0 additions & 1 deletion boards/dptechnics/walter/walter_esp32s3_procpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: dptechnics
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: espressif
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: espressif
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: espressif
1 change: 0 additions & 1 deletion boards/espressif/esp32c3_devkitc/esp32c3_devkitc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: espressif
1 change: 0 additions & 1 deletion boards/espressif/esp32c3_devkitm/esp32c3_devkitm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: espressif
1 change: 0 additions & 1 deletion boards/espressif/esp32c3_rust/esp32c3_rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: espressif
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: espressif
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: espressif
1 change: 0 additions & 1 deletion boards/espressif/esp32s3_eye/esp32s3_eye_procpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: espressif
1 change: 0 additions & 1 deletion boards/espressif/esp_wrover_kit/esp_wrover_kit_procpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: espressif
1 change: 0 additions & 1 deletion boards/hardkernel/odroid_go/odroid_go_procpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: hardkernel
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: espressif
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: heltec
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: kincony
1 change: 0 additions & 1 deletion boards/lilygo/ttgo_lora32/ttgo_lora32_esp32_procpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: lilygo
1 change: 0 additions & 1 deletion boards/lilygo/ttgo_t8c3/ttgo_t8c3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: lilygo
1 change: 0 additions & 1 deletion boards/lilygo/ttgo_t8s3/ttgo_t8s3_procpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: lilygo
1 change: 0 additions & 1 deletion boards/luatos/esp32c3_luatos_core/esp32c3_luatos_core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: luatos
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: luatos
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: luatos
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: luatos
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: m5stack
1 change: 0 additions & 1 deletion boards/m5stack/m5stack_atoms3/m5stack_atoms3_procpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: m5stack
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: m5stack
1 change: 0 additions & 1 deletion boards/m5stack/m5stack_core2/m5stack_core2_procpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: m5stack
1 change: 0 additions & 1 deletion boards/m5stack/m5stack_cores3/m5stack_cores3_procpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ supported:
- watchdog
testing:
ignore_tags:
- bluetooth
- gpio
- net
- pinmux
Expand Down
1 change: 0 additions & 1 deletion boards/m5stack/m5stack_stamps3/m5stack_stamps3_procpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: m5stack
1 change: 0 additions & 1 deletion boards/m5stack/m5stickc_plus/m5stickc_plus_procpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: m5stack
1 change: 0 additions & 1 deletion boards/m5stack/stamp_c3/stamp_c3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: m5stack
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: olimex
1 change: 0 additions & 1 deletion boards/others/icev_wireless/icev_wireless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ toolchain:
testing:
ignore_tags:
- net
- bluetooth
vendor: espressif
1 change: 0 additions & 1 deletion boards/seeed/xiao_esp32c3/xiao_esp32c3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: seeed
1 change: 0 additions & 1 deletion boards/seeed/xiao_esp32s3/xiao_esp32s3_procpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: seeed
1 change: 0 additions & 1 deletion boards/seeed/xiao_esp32s3/xiao_esp32s3_procpu_sense.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: seeed
1 change: 0 additions & 1 deletion boards/vcc-gnd/yd_esp32/yd_esp32_procpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: vcc-gnd
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: waveshare
1 change: 0 additions & 1 deletion boards/we/orthosie1ev/we_orthosie1ev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ supported:
testing:
ignore_tags:
- net
- bluetooth
vendor: we
36 changes: 25 additions & 11 deletions drivers/bluetooth/hci/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,32 +1,46 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_library_sources_ifdef(CONFIG_BT_ESP32 hci_esp32.c)
if (CONFIG_BT_BUILD_ONLY_MODE)
message(WARNING "
---------------------------------------------------------------------------
Building only the Bluetooth driver without binary blobs and patches.
This is only for building (CI) purposes and will not work on a real device.
---------------------------------------------------------------------------
")
else()

if(CONFIG_DT_HAS_ESPRESSIF_ESP32_BT_HCI_ENABLED)
zephyr_blobs_verify(MODULE hal_espressif REQUIRED)
endif()

if((CONFIG_DT_HAS_ST_HCI_STM32WBA_ENABLED) OR (CONFIG_DT_HAS_ST_HCI_STM32WB0_ENABLED))
zephyr_blobs_verify(MODULE hal_stm32 REQUIRED)
endif()

if(CONFIG_DT_HAS_SILABS_BT_HCI_EFR32_ENABLED)
zephyr_blobs_verify(MODULE hal_silabs REQUIRED)
endif()

if(CONFIG_DT_HAS_INFINEON_CAT1_BLESS_HCI_ENABLED)
zephyr_blobs_verify(MODULE hal_infineon REQUIRED)
endif()

endif() # CONFIG_BT_BUILD_ONLY_MODE

zephyr_library_sources_ifdef(CONFIG_BT_ESP32 hci_esp32.c)
zephyr_library_sources_ifdef(CONFIG_BT_H4 h4.c)
zephyr_library_sources_ifdef(CONFIG_BT_H5 h5.c)
zephyr_library_sources_ifdef(CONFIG_BT_HCI_IPC ipc.c)
zephyr_library_sources_ifdef(CONFIG_BT_SPI_ZEPHYR spi.c)
zephyr_library_sources_ifdef(CONFIG_BT_SPI_BLUENRG hci_spi_st.c)
zephyr_library_sources_ifdef(CONFIG_BT_CYW43XX h4_ifx_cyw43xxx.c)
zephyr_library_sources_ifdef(CONFIG_BT_CYW208XX hci_ifx_cyw208xx.c)

zephyr_library_sources_ifdef(CONFIG_BT_STM32_IPM ipm_stm32wb.c)
zephyr_library_sources_ifdef(CONFIG_BT_STM32WBA hci_stm32wba.c)
zephyr_library_sources_ifdef(CONFIG_BT_STM32WB0 hci_stm32wb0.c)
if((CONFIG_DT_HAS_ST_HCI_STM32WBA_ENABLED) OR (CONFIG_DT_HAS_ST_HCI_STM32WB0_ENABLED))
zephyr_blobs_verify(MODULE hal_stm32 REQUIRED)
endif()
zephyr_library_sources_ifdef(CONFIG_BT_USERCHAN userchan.c)
zephyr_library_sources_ifdef(CONFIG_BT_SILABS_EFR32 hci_silabs_efr32.c)
if(CONFIG_DT_HAS_SILABS_BT_HCI_EFR32_ENABLED)
zephyr_blobs_verify(MODULE hal_silabs REQUIRED)
endif()
zephyr_library_sources_ifdef(CONFIG_BT_PSOC6_BLESS hci_ifx_psoc6_bless.c)
if(CONFIG_DT_HAS_INFINEON_CAT1_BLESS_HCI_ENABLED)
zephyr_blobs_verify(MODULE hal_infineon REQUIRED)
endif()
zephyr_library_sources_ifdef(CONFIG_SOC_NRF5340_CPUAPP nrf53_support.c)
zephyr_library_sources_ifdef(CONFIG_BT_AMBIQ_HCI hci_ambiq.c apollox_blue.c)
zephyr_library_sources_ifdef(CONFIG_BT_DA1469X hci_da1469x.c)
Expand Down
9 changes: 8 additions & 1 deletion drivers/bluetooth/hci/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ config BT_SPI_ZEPHYR
Bluetooth HCI over SPI driver for communication with Bluetooth
controllers running Zephyr.

config BT_BUILD_ONLY_MODE
bool "Build only mode (do not link bluetooth firmware blob)"
help
Skip linking the firmware blob into the Bluetooth build. This will
not result in a functional application, but allows the Bluetooth
driver to be built without binary blobs.

config BT_SPI_BLUENRG
bool
default y
Expand Down Expand Up @@ -146,7 +153,7 @@ config BT_ESP32
bool
default y
depends on DT_HAS_ESPRESSIF_ESP32_BT_HCI_ENABLED
depends on ZEPHYR_HAL_ESPRESSIF_MODULE_BLOBS
depends on ZEPHYR_HAL_ESPRESSIF_MODULE_BLOBS || BT_BUILD_ONLY_MODE
help
Espressif HCI bluetooth interface

Expand Down
7 changes: 7 additions & 0 deletions samples/bluetooth/central/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ tests:
tags: bluetooth
integration_platforms:
- qemu_cortex_m3
sample.bluetooth.central.esp32:
extra_args:
- CONFIG_BT_BUILD_ONLY_MODE=y
platform_allow:
- esp32_devkitc_wroom/esp32/procpu
- esp32s3_devkitm/esp32s3/procpu
- esp32c3_devkitm
7 changes: 7 additions & 0 deletions samples/bluetooth/peripheral/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,10 @@ tests:
extra_args: SHIELD=x_nucleo_idb05a1
integration_platforms:
- nucleo_l4r5zi
sample.bluetooth.periodic_adv.esp32:
extra_args:
- CONFIG_BT_BUILD_ONLY_MODE=y
platform_allow:
- esp32_devkitc_wroom/esp32/procpu
- esp32s3_devkitm/esp32s3/procpu
- esp32c3_devkitm
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ manifest:
groups:
- hal
- name: hal_espressif
revision: 980d61c1d3d3e801ed7c5ccb57ec84c5dd9e9360
revision: pull/359/head
path: modules/hal/espressif
west-commands: west/west-commands.yml
groups:
Expand Down
Loading