diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index d35791cf1ed3c0..e7fd3bbb32cd81 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -462,26 +462,11 @@ 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 $) - -idf_component_get_property(vfs_lib vfs COMPONENT_LIB) -list(APPEND chip_libraries $) - -idf_component_get_property(driver_lib driver COMPONENT_LIB) -list(APPEND chip_libraries $) +set(components_to_link esp_event hal esp_system soc efuse vfs driver esp_coex) +foreach(component ${components_to_link}) + idf_component_get_property(lib_name ${component} COMPONENT_LIB) + list(APPEND chip_libraries $) +endforeach() target_link_libraries(${COMPONENT_LIB} INTERFACE -Wl,--start-group ${chip_libraries} diff --git a/examples/shell/esp32/main/CMakeLists.txt b/examples/shell/esp32/main/CMakeLists.txt index 8fac15167812f5..5a565edb90a6d5 100644 --- a/examples/shell/esp32/main/CMakeLists.txt +++ b/examples/shell/esp32/main/CMakeLists.txt @@ -23,4 +23,4 @@ idf_component_register(SRCS main.cpp "${CHIP_SHELL_DIR}/shell_common/globals.cpp" PRIV_INCLUDE_DIRS "${CHIP_SHELL_DIR}/shell_common/include" - PRIV_REQUIRES chip nvs_flash bt console) + PRIV_REQUIRES chip nvs_flash bt)