diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index ae7e2818adedcb..c153d355d00307 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -334,20 +334,15 @@ target_include_directories(${COMPONENT_LIB} INTERFACE idf_component_get_property(mbedtls_lib mbedtls COMPONENT_LIB) +idf_build_get_property(idf_target IDF_TARGET) +set(target_name "${idf_target}") + if(CONFIG_BT_ENABLED) idf_component_get_property(bt_lib bt COMPONENT_LIB) - if("${CONFIG_IDF_TARGET}" STREQUAL "esp32h2") - idf_component_get_property(bt_dir bt COMPONENT_DIR) - list(APPEND chip_libraries $) - list(APPEND chip_libraries ${bt_dir}/controller/lib_esp32h2/esp32h2-bt-lib/libble_app.a) - elseif("${CONFIG_IDF_TARGET}" STREQUAL "esp32c2") + if((target_name STREQUAL "esp32h2") OR (target_name STREQUAL "esp32c2") OR (target_name STREQUAL "esp32c6")) idf_component_get_property(bt_dir bt COMPONENT_DIR) list(APPEND chip_libraries $) - list(APPEND chip_libraries ${bt_dir}/controller/lib_esp32c2/esp32c2-bt-lib/libble_app.a) - elseif("${CONFIG_IDF_TARGET}" STREQUAL "esp32c6") - idf_component_get_property(bt_dir bt COMPONENT_DIR) - list(APPEND chip_libraries $) - list(APPEND chip_libraries ${bt_dir}/controller/lib_esp32c6/esp32c6-bt-lib/libble_app.a) + list(APPEND chip_libraries "${bt_dir}/controller/lib_${target_name}/${target_name}-bt-lib/libble_app.a") else() list(APPEND chip_libraries $ -lbtdm_app) endif() @@ -383,6 +378,61 @@ if (CONFIG_SEC_CERT_DAC_PROVIDER) list(APPEND chip_libraries $) endif() +idf_component_get_property(lwip_lib lwip COMPONENT_LIB) +list(APPEND chip_libraries $) + + +if (CONFIG_ESP_WIFI_ENABLED) + idf_component_get_property(esp_wifi_lib esp_wifi COMPONENT_LIB) + idf_component_get_property(esp_wifi_dir esp_wifi COMPONENT_DIR) + list(APPEND chip_libraries $) + if (CONFIG_IDF_TARGET_ESP32C2) + set(blobs core net80211 pp) + else() + set(blobs core mesh net80211 pp) + endif() + + foreach(blob ${blobs}) + list(APPEND chip_libraries "${esp_wifi_dir}/lib/${target_name}/lib${blob}.a") + endforeach() +endif() + +idf_component_get_property(esp_netif_lib esp_netif COMPONENT_LIB) +list(APPEND chip_libraries $) + +idf_component_get_property(esp_hw_support_lib esp_hw_support COMPONENT_LIB) +list(APPEND chip_libraries $) + +idf_component_get_property(esp_phy_lib esp_phy COMPONENT_LIB) +idf_component_get_property(esp_phy_dir esp_phy COMPONENT_DIR) +list(APPEND chip_libraries $) + +if (CONFIG_IDF_TARGET_ESP32) + set(phy_blobs phy rtc) +elseif (CONFIG_IDF_TARGET_ESP32S2) + set(phy_blobs phy) +else() + set(phy_blobs phy btbb) +endif() +foreach(phy_blob ${phy_blobs}) + list(APPEND chip_libraries "${esp_phy_dir}/lib/${target_name}/lib${phy_blob}.a") +endforeach() + +idf_component_get_property(esp_event_lib esp_event COMPONENT_LIB) +list(APPEND chip_libraries $) + +idf_component_get_property(hal_lib hal COMPONENT_LIB) +list(APPEND chip_libraries $) + +idf_component_get_property(esp_system_lib esp_system COMPONENT_LIB) +list(APPEND chip_libraries $) + +idf_component_get_property(soc_lib soc COMPONENT_LIB) +list(APPEND chip_libraries $) + +idf_component_get_property(efuse_lib efuse COMPONENT_LIB) +list(APPEND chip_libraries $) + target_link_libraries(${COMPONENT_LIB} INTERFACE -Wl,--start-group ${chip_libraries} $ $ diff --git a/config/esp32/components/esp32_mbedtls/CMakeLists.txt b/config/esp32/components/esp32_mbedtls/CMakeLists.txt deleted file mode 100644 index 03c0d2bd207398..00000000000000 --- a/config/esp32/components/esp32_mbedtls/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -idf_component_register(SRCS empty_file.c - INCLUDE_DIRS . - PRIV_REQUIRES mbedtls) diff --git a/config/esp32/components/esp32_mbedtls/empty_file.c b/config/esp32/components/esp32_mbedtls/empty_file.c deleted file mode 100644 index 33e1402e03e6ca..00000000000000 --- a/config/esp32/components/esp32_mbedtls/empty_file.c +++ /dev/null @@ -1,3 +0,0 @@ -// Empty file -// Add this component to avoid CI failures on shell example building and QEMU -// TODO: remove the esp32_mbedtls component diff --git a/src/test_driver/esp32/main/CMakeLists.txt b/src/test_driver/esp32/main/CMakeLists.txt index 29752922847125..91686b72f71b69 100644 --- a/src/test_driver/esp32/main/CMakeLists.txt +++ b/src/test_driver/esp32/main/CMakeLists.txt @@ -30,6 +30,8 @@ set(EXTRA_COMPONENT_DIRS "${IDF_PATH}/examples/common_components" ) +set(PRIV_REQUIRES_LIST mbedtls) + if (CONFIG_OPENTHREAD_ENABLED) list(APPEND PRIV_REQUIRES_LIST openthread) endif()