@@ -428,6 +428,8 @@ if(CONFIG_BT_ENABLED)
428428 idf_component_get_property(bt_dir bt COMPONENT_DIR)
429429 list (APPEND chip_libraries $<TARGET_FILE:${bt_lib} >)
430430 list (APPEND chip_libraries "${bt_dir} /controller/lib_${target_name} /${target_name} -bt-lib/libble_app.a" )
431+ elseif (target_name STREQUAL "esp32p4" )
432+ list (APPEND chip_libraries $<TARGET_FILE:${bt_lib} >)
431433 else ()
432434 list (APPEND chip_libraries $<TARGET_FILE:${bt_lib} > -lbtdm_app)
433435 endif ()
@@ -507,10 +509,10 @@ idf_component_get_property(lwip_lib lwip COMPONENT_LIB)
507509list (APPEND chip_libraries $<TARGET_FILE:${lwip_lib} >)
508510
509511
512+ idf_component_get_property(esp_wifi_lib esp_wifi COMPONENT_LIB)
513+ list (APPEND chip_libraries $<TARGET_FILE:${esp_wifi_lib} >)
510514if (CONFIG_ESP32_WIFI_ENABLED)
511- idf_component_get_property(esp_wifi_lib esp_wifi COMPONENT_LIB)
512515 idf_component_get_property(esp_wifi_dir esp_wifi COMPONENT_DIR)
513- list (APPEND chip_libraries $<TARGET_FILE:${esp_wifi_lib} >)
514516 if (CONFIG_IDF_TARGET_ESP32C2)
515517 set (blobs core net80211 pp)
516518 else ()
@@ -536,6 +538,7 @@ list(APPEND chip_libraries $<TARGET_FILE:${esp_netif_lib}>)
536538idf_component_get_property(esp_hw_support_lib esp_hw_support COMPONENT_LIB)
537539list (APPEND chip_libraries $<TARGET_FILE:${esp_hw_support_lib} >)
538540
541+ if (NOT CONFIG_IDF_TARGET_ESP32P4)
539542idf_component_get_property(esp_phy_lib esp_phy COMPONENT_LIB)
540543idf_component_get_property(esp_phy_dir esp_phy COMPONENT_DIR)
541544list (APPEND chip_libraries $<TARGET_FILE:${esp_phy_lib} >)
@@ -550,8 +553,12 @@ endif()
550553foreach (phy_blob ${phy_blobs} )
551554 list (APPEND chip_libraries "${esp_phy_dir} /lib/${target_name} /lib${phy_blob} .a" )
552555endforeach ()
556+ endif ()
553557
554- set (components_to_link esp_event hal esp_system soc efuse vfs driver esp_coex freertos esp_timer)
558+ set (components_to_link esp_event hal esp_system soc efuse vfs driver freertos esp_timer)
559+ if (NOT CONFIG_IDF_TARGET_ESP32P4)
560+ list (APPEND components_to_link esp_coex)
561+ endif ()
555562idf_build_get_property(build_components BUILD_COMPONENTS)
556563foreach (component ${components_to_link} )
557564 # Some of the components are not present in IDF v4.x
0 commit comments