esp32s2: add config option to place RTC data in fast RAM

This commit is contained in:
Mahavir Jain 2020-04-19 11:49:44 +05:30 committed by bot
parent 1aac284dda
commit 18c1838587
5 changed files with 12 additions and 5 deletions

View file

@ -498,6 +498,13 @@ menu "ESP32S2-specific"
If enabled, this disables the linking of binary libraries in the application build. Note If enabled, this disables the linking of binary libraries in the application build. Note
that after enabling this Wi-Fi/Bluetooth will not work. that after enabling this Wi-Fi/Bluetooth will not work.
config ESP32S2_RTCDATA_IN_FAST_MEM
bool "Place RTC_DATA_ATTR and RTC_RODATA_ATTR variables into RTC fast memory segment"
default n
help
This option allows to place .rtc_data and .rtc_rodata sections into
RTC fast memory segment to free the slow memory region for ULP programs.
config ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP config ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP
bool "Enable RTC fast memory for dynamic allocations" bool "Enable RTC fast memory for dynamic allocations"
depends on !ESP32S2_MEMPROT_FEATURE depends on !ESP32S2_MEMPROT_FEATURE

View file

@ -96,7 +96,7 @@ _data_seg_org = ORIGIN(rtc_data_seg);
When the option is not defined then use slow memory segment When the option is not defined then use slow memory segment
else the data will be placed in fast memory segment else the data will be placed in fast memory segment
TODO: check whether the rtc_data_location is correct for esp32s2 - IDF-761 */ TODO: check whether the rtc_data_location is correct for esp32s2 - IDF-761 */
#ifndef CONFIG_ESP32_RTCDATA_IN_FAST_MEM #ifndef CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM
REGION_ALIAS("rtc_data_location", rtc_slow_seg ); REGION_ALIAS("rtc_data_location", rtc_slow_seg );
#else #else
REGION_ALIAS("rtc_data_location", rtc_data_seg ); REGION_ALIAS("rtc_data_location", rtc_data_seg );

View file

@ -46,7 +46,7 @@ SECTIONS
named rtc_wake_stub*.c and the data marked with named rtc_wake_stub*.c and the data marked with
RTC_DATA_ATTR, RTC_RODATA_ATTR attributes. RTC_DATA_ATTR, RTC_RODATA_ATTR attributes.
The memory location of the data is dependent on The memory location of the data is dependent on
CONFIG_ESP32_RTCDATA_IN_FAST_MEM option. CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM option.
*/ */
.rtc.data : .rtc.data :
{ {
@ -75,7 +75,7 @@ SECTIONS
User data marked with RTC_NOINIT_ATTR will be placed User data marked with RTC_NOINIT_ATTR will be placed
into this section. See the file "esp_attr.h" for more information. into this section. See the file "esp_attr.h" for more information.
The memory location of the data is dependent on The memory location of the data is dependent on
CONFIG_ESP32_RTCDATA_IN_FAST_MEM option. CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM option.
*/ */
.rtc_noinit (NOLOAD): .rtc_noinit (NOLOAD):
{ {

View file

@ -3,4 +3,4 @@ CONFIG_IDF_TARGET="esp32s2"
TEST_EXCLUDE_COMPONENTS=libsodium bt app_update freertos esp32s2 esp_timer driver heap pthread soc spi_flash vfs TEST_EXCLUDE_COMPONENTS=libsodium bt app_update freertos esp32s2 esp_timer driver heap pthread soc spi_flash vfs
CONFIG_MEMMAP_SMP=n CONFIG_MEMMAP_SMP=n
CONFIG_FREERTOS_UNICORE=y CONFIG_FREERTOS_UNICORE=y
CONFIG_ESP32_RTCDATA_IN_FAST_MEM=y CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM=y

View file

@ -3,4 +3,4 @@ CONFIG_IDF_TARGET="esp32s2"
TEST_COMPONENTS=freertos esp32s2 esp_timer driver heap pthread soc spi_flash vfs test_utils TEST_COMPONENTS=freertos esp32s2 esp_timer driver heap pthread soc spi_flash vfs test_utils
CONFIG_MEMMAP_SMP=n CONFIG_MEMMAP_SMP=n
CONFIG_FREERTOS_UNICORE=y CONFIG_FREERTOS_UNICORE=y
CONFIG_ESP32_RTCDATA_IN_FAST_MEM=y CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM=y