From 03b0540bc6420d6c15f364850b199552be109753 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Thu, 4 Mar 2021 09:50:56 +1100 Subject: [PATCH] esp32s3: Reserve RTC memory in bootloader in the app linker script --- components/esp32s3/ld/esp32s3.ld | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/components/esp32s3/ld/esp32s3.ld b/components/esp32s3/ld/esp32s3.ld index 821bf5f43a..1b7c3d1bb9 100644 --- a/components/esp32s3/ld/esp32s3.ld +++ b/components/esp32s3/ld/esp32s3.ld @@ -8,6 +8,14 @@ #include "sdkconfig.h" +#ifdef CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC +#define ESP_BOOTLOADER_RESERVE_RTC (CONFIG_BOOTLOADER_RESERVE_RTC_SIZE + CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE) +#elif defined(CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP) +#define ESP_BOOTLOADER_RESERVE_RTC (CONFIG_BOOTLOADER_RESERVE_RTC_SIZE) +#else +#define ESP_BOOTLOADER_RESERVE_RTC 0 +#endif + #define SRAM_IRAM_START 0x40370000 #define SRAM_DRAM_START 0x3FC80000 #define I_D_SRAM_OFFSET (SRAM_IRAM_START - SRAM_DRAM_START) @@ -65,7 +73,7 @@ MEMORY /** * RTC fast memory (executable). Persists over deep sleep. */ - rtc_iram_seg(RWX) : org = 0x600fe000, len = 0x2000 + rtc_iram_seg(RWX) : org = 0x600fe000, len = 0x2000 - ESP_BOOTLOADER_RESERVE_RTC /** * RTC fast memory (same block as above), viewed from data bus