From 1f80a9bb0f3adcc932b9843ae97ded1faade74a4 Mon Sep 17 00:00:00 2001 From: Frantisek Hrbata Date: Mon, 2 Oct 2023 08:37:57 +0200 Subject: [PATCH] fix(lf): fix orphaned .phyiram sections There are orphaned .phyiram sections from components/esp_phy/lib/esp32/libphy.a when ESP_WIFI_SLP_IRAM_OPT is not set on esp32. It can be seen in the wifi_station example examples/wifi/getting_started/station with the default configuration. Even though they seem to be correctly placed in flash(linker got it right), I believe this should be fixed. At least for the esp-idf-size, because these doesn't seem to be accounted. Signed-off-by: Frantisek Hrbata --- components/esp_phy/linker.lf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/esp_phy/linker.lf b/components/esp_phy/linker.lf index a5a355da2e..40d3b99c9d 100644 --- a/components/esp_phy/linker.lf +++ b/components/esp_phy/linker.lf @@ -1,7 +1,10 @@ if IDF_TARGET_ESP32 = y: [scheme:phy_iram] entries: + if ESP_WIFI_SLP_IRAM_OPT = y: phy_iram -> iram0_text + else: + phy_iram -> flash_text [sections:phy_iram] entries: @@ -11,7 +14,7 @@ if IDF_TARGET_ESP32 = y: archive: libphy.a entries: * (noflash_data) - if ESP_WIFI_SLP_IRAM_OPT = y && IDF_TARGET_ESP32 = y: + if IDF_TARGET_ESP32 = y: * (phy_iram) [mapping:rtc]