@@ -435,6 +435,8 @@ if(CONFIG_BT_ENABLED)
435435 idf_component_get_property(bt_dir bt COMPONENT_DIR)
436436 list (APPEND chip_libraries $<TARGET_FILE:${bt_lib} >)
437437 list (APPEND chip_libraries "${bt_dir} /controller/lib_${target_name} /${target_name} -bt-lib/libble_app.a" )
438+ elseif (target_name STREQUAL "esp32p4" )
439+ list (APPEND chip_libraries $<TARGET_FILE:${bt_lib} >)
438440 else ()
439441 list (APPEND chip_libraries $<TARGET_FILE:${bt_lib} > -lbtdm_app)
440442 endif ()
@@ -513,11 +515,12 @@ endif()
513515idf_component_get_property(lwip_lib lwip COMPONENT_LIB)
514516list (APPEND chip_libraries $<TARGET_FILE:${lwip_lib} >)
515517
516-
517- if (CONFIG_ESP32_WIFI_ENABLED)
518+ if (CONFIG_ESP32_WIFI_ENABLED OR CONFIG_IDF_TARGET_ESP32P4)
518519 idf_component_get_property(esp_wifi_lib esp_wifi COMPONENT_LIB)
519- idf_component_get_property(esp_wifi_dir esp_wifi COMPONENT_DIR)
520520 list (APPEND chip_libraries $<TARGET_FILE:${esp_wifi_lib} >)
521+ endif ()
522+ if (CONFIG_ESP32_WIFI_ENABLED)
523+ idf_component_get_property(esp_wifi_dir esp_wifi COMPONENT_DIR)
521524 if (CONFIG_IDF_TARGET_ESP32C2)
522525 set (blobs core net80211 pp)
523526 else ()
@@ -543,6 +546,7 @@ list(APPEND chip_libraries $<TARGET_FILE:${esp_netif_lib}>)
543546idf_component_get_property(esp_hw_support_lib esp_hw_support COMPONENT_LIB)
544547list (APPEND chip_libraries $<TARGET_FILE:${esp_hw_support_lib} >)
545548
549+ if (NOT CONFIG_IDF_TARGET_ESP32P4)
546550idf_component_get_property(esp_phy_lib esp_phy COMPONENT_LIB)
547551idf_component_get_property(esp_phy_dir esp_phy COMPONENT_DIR)
548552list (APPEND chip_libraries $<TARGET_FILE:${esp_phy_lib} >)
@@ -557,8 +561,12 @@ endif()
557561foreach (phy_blob ${phy_blobs} )
558562 list (APPEND chip_libraries "${esp_phy_dir} /lib/${target_name} /lib${phy_blob} .a" )
559563endforeach ()
564+ endif ()
560565
561- set (components_to_link esp_event hal esp_system soc efuse vfs driver esp_coex freertos esp_timer)
566+ set (components_to_link esp_event hal esp_system soc efuse vfs driver freertos esp_timer)
567+ if (NOT CONFIG_IDF_TARGET_ESP32P4)
568+ list (APPEND components_to_link esp_coex)
569+ endif ()
562570idf_build_get_property(build_components BUILD_COMPONENTS)
563571foreach (component ${components_to_link} )
564572 # Some of the components are not present in IDF v4.x
0 commit comments