From 60a99bbb5a9ad9325a51ff1ea90e941a9c10c25b Mon Sep 17 00:00:00 2001 From: yinqingzhao Date: Mon, 25 May 2026 11:55:54 +0800 Subject: [PATCH] fix(phy): fix still put multiple phy init date bin into flash when CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN_EMBED is enabled --- components/esp_phy/CMakeLists.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/components/esp_phy/CMakeLists.txt b/components/esp_phy/CMakeLists.txt index ecf365a9861..d5ee7d40882 100644 --- a/components/esp_phy/CMakeLists.txt +++ b/components/esp_phy/CMakeLists.txt @@ -200,9 +200,17 @@ if(CONFIG_ESP_PHY_ENABLED) set(phy_name "phy") - esptool_py_flash_target(${phy_name}-flash "${main_args}" "${sub_args}") - esptool_py_flash_target_image(${phy_name}-flash ${phy_name} "${phy_partition_offset}" "${phy_init_data_bin}") - esptool_py_flash_target_image(flash ${phy_name} "${phy_partition_offset}" "${phy_init_data_bin}") + # When the multiple PHY init data bin is embedded into the application image + # (CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN_EMBED=y), the data is already part of + # app.bin and there is no need to flash it again to the `phy` data partition. + # Skip registering it as a flashable image in that case. + if(NOT CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN_EMBED) + esptool_py_flash_target(${phy_name}-flash "${main_args}" "${sub_args}") + esptool_py_flash_target_image(${phy_name}-flash ${phy_name} + "${phy_partition_offset}" "${phy_init_data_bin}") + esptool_py_flash_target_image(flash ${phy_name} + "${phy_partition_offset}" "${phy_init_data_bin}") + endif() endif() endif()