mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 03:34:32 +02:00
Merge branch 'feature/lightsleep_related_iram_opt' into 'master'
components/pm: Add sleep related code iram opt chioce See merge request espressif/esp-idf!11290
This commit is contained in:
@@ -2,3 +2,9 @@
|
||||
archive: libesp_common.a
|
||||
entries:
|
||||
esp_err (noflash)
|
||||
if PM_RTOS_IDLE_OPT = y:
|
||||
freertos_hooks:esp_vApplicationIdleHook (noflash)
|
||||
task_wdt:idle_hook_cb (noflash)
|
||||
task_wdt:esp_task_wdt_reset (noflash)
|
||||
task_wdt:find_task_in_twdt_list (noflash)
|
||||
task_wdt:reset_hw_timer (noflash)
|
||||
|
@@ -11,3 +11,5 @@ entries:
|
||||
rtc_sleep (noflash_text)
|
||||
rtc_time (noflash_text)
|
||||
rtc_wdt (noflash_text)
|
||||
if PM_SLP_IRAM_OPT = y:
|
||||
rtc_init:rtc_vddsdio_get_config (noflash)
|
||||
|
@@ -1,2 +1,3 @@
|
||||
idf_component_register(SRCS "pm_locks.c" "pm_trace.c" "pm_impl.c"
|
||||
INCLUDE_DIRS include)
|
||||
INCLUDE_DIRS include
|
||||
LDFRAGMENTS linker.lf)
|
||||
|
@@ -59,5 +59,23 @@ menu "Power Management"
|
||||
of power management implementation, and should be kept disabled in
|
||||
applications.
|
||||
|
||||
config PM_SLP_IRAM_OPT
|
||||
bool "Put lightsleep related codes in internal RAM"
|
||||
depends on FREERTOS_USE_TICKLESS_IDLE
|
||||
default n
|
||||
help
|
||||
If enabled, about 1.8KB of lightsleep related codes would be in IRAM and chip would sleep
|
||||
longer for 760us at most each time.
|
||||
This feature is intended to be used when a lower power management mode is needed
|
||||
regardless of the internal memory.
|
||||
|
||||
config PM_RTOS_IDLE_OPT
|
||||
bool "Put RTOS IDLE related codes in internal RAM"
|
||||
depends on FREERTOS_USE_TICKLESS_IDLE
|
||||
default n
|
||||
help
|
||||
If enabled, about 260B of RTOS_IDLE related codes would be in IRAM and chip would sleep
|
||||
longer for 40us at most each time.
|
||||
This feature is intended to be used when a lower power management mode is needed
|
||||
regardless of the internal memory.
|
||||
endmenu # "Power Management"
|
||||
|
@@ -1,2 +1,3 @@
|
||||
COMPONENT_SRCDIRS := .
|
||||
COMPONENT_ADD_INCLUDEDIRS := include
|
||||
COMPONENT_ADD_LDFRAGMENTS += linker.lf
|
||||
|
6
components/esp_pm/linker.lf
Normal file
6
components/esp_pm/linker.lf
Normal file
@@ -0,0 +1,6 @@
|
||||
[mapping:esp_pm]
|
||||
archive: libesp_pm.a
|
||||
entries:
|
||||
if PM_RTOS_IDLE_OPT = y:
|
||||
pm_impl:esp_pm_impl_idle_hook (noflash)
|
||||
pm_impl:esp_pm_impl_waiti (noflash)
|
@@ -23,6 +23,12 @@ entries:
|
||||
usb_console:esp_usb_console_cdc_acm_cb (noflash)
|
||||
usb_console:esp_usb_console_dfu_detach_cb (noflash)
|
||||
usb_console:esp_usb_console_before_restart (noflash)
|
||||
if PM_SLP_IRAM_OPT = y:
|
||||
sleep_modes:esp_light_sleep_start (noflash)
|
||||
sleep_modes:esp_sleep_enable_timer_wakeup (noflash)
|
||||
sleep_modes:timer_wakeup_prepare (noflash)
|
||||
sleep_modes:get_power_down_flags (noflash)
|
||||
|
||||
|
||||
[mapping:vfs_cdcacm]
|
||||
archive: libvfs.a
|
||||
|
@@ -15,4 +15,5 @@ idf_component_register(SRCS "${srcs}"
|
||||
INCLUDE_DIRS include
|
||||
PRIV_INCLUDE_DIRS private_include
|
||||
REQUIRES esp_common
|
||||
PRIV_REQUIRES soc driver "${target}")
|
||||
PRIV_REQUIRES soc driver "${target}"
|
||||
LDFRAGMENTS linker.lf)
|
||||
|
@@ -20,3 +20,5 @@ ifdef CONFIG_IDF_TARGET_ESP32
|
||||
else
|
||||
$(error esp_timer is only supported by the Make build system for esp32 chip. For other chips, use the Cmake build system)
|
||||
endif
|
||||
|
||||
COMPONENT_ADD_LDFRAGMENTS += linker.lf
|
||||
|
10
components/esp_timer/linker.lf
Normal file
10
components/esp_timer/linker.lf
Normal file
@@ -0,0 +1,10 @@
|
||||
[mapping:esp_timer]
|
||||
archive: libesp_timer.a
|
||||
entries:
|
||||
if PM_SLP_IRAM_OPT = y:
|
||||
esp_timer_impl_lac:esp_timer_impl_lock (noflash)
|
||||
esp_timer_impl_lac:esp_timer_impl_unlock (noflash)
|
||||
esp_timer_impl_lac:esp_timer_impl_advance (noflash)
|
||||
esp_timer_impl_systimer:esp_timer_impl_lock (noflash)
|
||||
esp_timer_impl_systimer:esp_timer_impl_unlock (noflash)
|
||||
esp_timer_impl_systimer:esp_timer_impl_advance (noflash)
|
@@ -3,3 +3,10 @@ archive: libnewlib.a
|
||||
entries:
|
||||
heap (noflash)
|
||||
abort (noflash)
|
||||
if PM_SLP_IRAM_OPT = y:
|
||||
esp_time_impl:esp_time_impl_set_boot_time (noflash)
|
||||
esp_time_impl:esp_time_impl_get_boot_time (noflash)
|
||||
esp_time_impl:esp_clk_slowclk_cal_get (noflash)
|
||||
esp_time_impl:esp_rtc_get_time_us (noflash)
|
||||
esp_time_impl:esp_clk_slowclk_cal_set (noflash)
|
||||
esp_time_impl:esp_set_time_from_rtc (noflash)
|
||||
|
Reference in New Issue
Block a user