From 2efc896aec79661bd5419fa9967d5cd5ad8dac1d Mon Sep 17 00:00:00 2001 From: Li Shuai Date: Thu, 20 Nov 2025 10:51:34 +0800 Subject: [PATCH] change(esp_hw_support): add kconfig option to put rtc time module into iram --- components/esp_hw_support/Kconfig | 6 ++++++ components/esp_hw_support/linker.lf | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/components/esp_hw_support/Kconfig b/components/esp_hw_support/Kconfig index 241415ecc0..a2d5fcc245 100644 --- a/components/esp_hw_support/Kconfig +++ b/components/esp_hw_support/Kconfig @@ -225,6 +225,12 @@ menu "Hardware Settings" default y help Place RTC clock module (all rtc clock functions and const data) into IRAM. + + config RTC_TIME_FUNC_IN_IRAM + bool "Place RTC time module functions into IRAM" + default y + help + Place RTC time module (all rtc clock functions) into IRAM. endmenu menu "Peripheral Control" diff --git a/components/esp_hw_support/linker.lf b/components/esp_hw_support/linker.lf index f19df19e5d..676f475450 100644 --- a/components/esp_hw_support/linker.lf +++ b/components/esp_hw_support/linker.lf @@ -14,13 +14,14 @@ entries: esp_memory_utils (noflash) clk_utils (noflash) if PM_SLP_IRAM_OPT = y: - rtc_time (noflash_text) esp_clk_tree: esp_clk_tree_enable_src (noflash) if RTC_CLK_FUNC_IN_IRAM = y: rtc_clk (noflash) if IDF_TARGET_ESP32 = y: rtc_clk:rtc_clk_cpu_freq_to_pll_mhz (noflash) rtc_clk:rtc_clk_cpu_freq_to_xtal (noflash) + if RTC_TIME_FUNC_IN_IRAM = y: + rtc_time (noflash_text) if SOC_CONFIGURABLE_VDDSDIO_SUPPORTED = y: rtc_init:rtc_vddsdio_get_config (noflash) rtc_init:rtc_vddsdio_set_config (noflash)