drivers: bt: esp32: add CONFIG_BUILD_ONLY_NO_BLOBS to allow CI tests

Adds an option to enable CI tests without binary blobs.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This commit is contained in:
Sylvio Alves 2024-11-02 23:11:22 -03:00 committed by Johan Hedberg
commit 3d06716a7b
3 changed files with 27 additions and 13 deletions

View file

@ -1,9 +1,33 @@
# 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)
@ -11,22 +35,12 @@ 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)

View file

@ -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

View file

@ -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: