fix(ble): Check if there are illegal library files in controller lib path

(cherry picked from commit 40706bf28f)

Co-authored-by: ShenWeilong <shenweilong@espressif.com>
This commit is contained in:
Shen Wei Long
2026-09-08 20:10:21 +08:00
committed by BOT
parent d27411ddb9
commit 5aa32e7e9f
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -41,6 +41,13 @@ function(register_bt_ctrl_libs)
add_prebuilt_library(libble_app "${lib_path}/libble_app.a" REQUIRES esp_phy bt)
endif()
else()
file(GLOB ILLEGAL_LIB_FILES "${lib_path}/*.a")
if(ILLEGAL_LIB_FILES)
message(FATAL_ERROR
"${lib_path} should not contain the library files!"
)
endif()
if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY AND EXISTS "${lib_path}/${idf_target}/libble_app_flash.a")
add_prebuilt_library(libble_app "${lib_path}/${idf_target}/libble_app_flash.a" REQUIRES esp_phy bt)
else()