From 15a901fb5e55f0c2a8fc9de9a69b45104e3dae3c Mon Sep 17 00:00:00 2001 From: zhiweijian Date: Mon, 24 Mar 2025 20:33:08 +0800 Subject: [PATCH] fix(bt/controller): Fixed controller flash only bug if hci-uart is enabled --- components/bt/controller/esp32c3/Kconfig.in | 2 +- components/esp_rom/CMakeLists.txt | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/components/bt/controller/esp32c3/Kconfig.in b/components/bt/controller/esp32c3/Kconfig.in index 2bea3782d9..53f8cf8253 100644 --- a/components/bt/controller/esp32c3/Kconfig.in +++ b/components/bt/controller/esp32c3/Kconfig.in @@ -548,7 +548,7 @@ config BT_CTRL_BLE_SCAN default y config BT_CTRL_BLE_SECURITY_ENABLE - depends on BT_CTRL_RUN_IN_FLASH_ONLY && BT_CONTROLLER_ONLY + depends on BT_CTRL_RUN_IN_FLASH_ONLY bool "Enable BLE security feature" default y diff --git a/components/esp_rom/CMakeLists.txt b/components/esp_rom/CMakeLists.txt index 3a09baf959..b17a8c6f0d 100644 --- a/components/esp_rom/CMakeLists.txt +++ b/components/esp_rom/CMakeLists.txt @@ -189,17 +189,19 @@ else() # Regular app build endif() elseif(target STREQUAL "esp32c3") - if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY) + if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY AND NOT CONFIG_BT_CTRL_HCI_MODE_UART_H4) if(NOT CONFIG_BT_CTRL_BLE_MASTER) rom_linker_script("ble_master") endif() - if(NOT CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT AND NOT CONFIG_BT_BLE_50_FEATURES_SUPPORTED) - rom_linker_script("ble_50") + if(NOT CONFIG_BT_CONTROLLER_ONLY) + if(NOT CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT AND NOT CONFIG_BT_BLE_50_FEATURES_SUPPORTED) + rom_linker_script("ble_50") + endif() endif() if(CONFIG_BT_BLE_CCA_MODE_NONE) rom_linker_script("ble_cca") endif() - if(NOT CONFIG_BT_NIMBLE_SECURITY_ENABLE AND NOT CONFIG_BT_BLE_SMP_ENABLE) + if(NOT CONFIG_BT_CTRL_BLE_SECURITY_ENABLE) rom_linker_script("ble_smp") endif() if(NOT CONFIG_BT_CTRL_DTM_ENABLE) @@ -227,17 +229,19 @@ else() # Regular app build endif() endif() elseif(target STREQUAL "esp32s3") - if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY) + if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY AND NOT CONFIG_BT_CTRL_HCI_MODE_UART_H4) if(NOT CONFIG_BT_CTRL_BLE_MASTER) rom_linker_script("ble_master") endif() - if(NOT CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT AND NOT CONFIG_BT_BLE_50_FEATURES_SUPPORTED) - rom_linker_script("ble_50") + if(NOT CONFIG_BT_CONTROLLER_ONLY) + if(NOT CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT AND NOT CONFIG_BT_BLE_50_FEATURES_SUPPORTED) + rom_linker_script("ble_50") + endif() endif() if(CONFIG_BT_BLE_CCA_MODE_NONE) rom_linker_script("ble_cca") endif() - if(NOT CONFIG_BT_NIMBLE_SECURITY_ENABLE AND NOT CONFIG_BT_BLE_SMP_ENABLE) + if(NOT CONFIG_BT_CTRL_BLE_SECURITY_ENABLE) rom_linker_script("ble_smp") endif() if(NOT CONFIG_BT_CTRL_DTM_ENABLE)