Skip to content

Commit

Permalink
drivers: bt: esp32: add CONFIG_BUILD_ONLY_NO_BLOBS to allow CI tests
Browse files Browse the repository at this point in the history
Adds an option to enable CI tests without binary blobs.

Signed-off-by: Sylvio Alves <[email protected]>
  • Loading branch information
sylvioalves committed Dec 19, 2024
1 parent 3fa522c commit 93e7ca4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
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_BUILD_ONLY_NO_BLOBS)
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_BUILD_ONLY_NO_BLOBS

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_DA1453X hci_da1453x.c)
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -153,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 || BUILD_ONLY_NO_BLOBS
help
Espressif HCI bluetooth interface

Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ manifest:
groups:
- hal
- name: hal_espressif
revision: 9fbf519573e713bd92bb8222bcfef77e7219584b
revision: e52371024732a47a67fa9c889fbccd0aa6355f3a
path: modules/hal/espressif
west-commands: west/west-commands.yml
groups:
Expand Down

0 comments on commit 93e7ca4

Please sign in to comment.