fix(ble): Add link requires esp_phy for ble.

This commit is contained in:
Geng Yuchao
2025-03-14 16:40:49 +08:00
committed by Zhou Xiao
parent 9ac3dcf07d
commit 32e72c42e8

View File

@@ -745,16 +745,20 @@ if(CONFIG_BT_ENABLED)
endif()
elseif(CONFIG_IDF_TARGET_ESP32H2 AND CONFIG_BT_CONTROLLER_ENABLED)
if(CONFIG_IDF_TARGET_ESP32H2_BETA_VERSION_1)
add_prebuilt_library(nimblelib "controller/lib_esp32h2/esp32h2-bt-lib/beta1/libble_app.a")
add_prebuilt_library(nimblelib "controller/lib_esp32h2/esp32h2-bt-lib/beta1/libble_app.a"
REQUIRES esp_phy)
elseif(CONFIG_IDF_TARGET_ESP32H2_BETA_VERSION_2)
add_prebuilt_library(nimblelib "controller/lib_esp32h2/esp32h2-bt-lib/beta2/libble_app.a")
add_prebuilt_library(nimblelib "controller/lib_esp32h2/esp32h2-bt-lib/beta2/libble_app.a"
REQUIRES esp_phy)
endif()
target_link_libraries(${COMPONENT_LIB} PRIVATE nimblelib)
elseif(CONFIG_IDF_TARGET_ESP32C2 AND CONFIG_BT_CONTROLLER_ENABLED)
if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY)
add_prebuilt_library(nimblelib "controller/lib_esp32c2/esp32c2-bt-lib/libble_app_flash.a")
add_prebuilt_library(nimblelib "controller/lib_esp32c2/esp32c2-bt-lib/libble_app_flash.a"
REQUIRES esp_phy)
else()
add_prebuilt_library(nimblelib "controller/lib_esp32c2/esp32c2-bt-lib/libble_app.a")
add_prebuilt_library(nimblelib "controller/lib_esp32c2/esp32c2-bt-lib/libble_app.a"
REQUIRES esp_phy)
endif()
target_link_libraries(${COMPONENT_LIB} PRIVATE nimblelib)
endif()