From 73e8afc5b9fa90f9dc63d0d056abbb3fadd6a420 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Tue, 26 Sep 2017 17:08:49 +0800 Subject: [PATCH] soc: place constant data from rtc_clk.c into DRAM In release mode, switches in rtc_clk_bbpll_set would be converted to jump tables. These tables would be placed into .rodata, which caused rtc_clk_cpu_freq_set to be unusable while cache is disabled. This manifested itself in crashes when exiting from light sleep: https://esp32.com/posting.php?mode=reply&f=13&t=3089#pr14590 --- components/esp32/ld/esp32.common.ld | 1 + 1 file changed, 1 insertion(+) diff --git a/components/esp32/ld/esp32.common.ld b/components/esp32/ld/esp32.common.ld index 5b5be9a67..32fc089d3 100644 --- a/components/esp32/ld/esp32.common.ld +++ b/components/esp32/ld/esp32.common.ld @@ -117,6 +117,7 @@ SECTIONS *(.dram1 .dram1.*) *libesp32.a:panic.o(.rodata .rodata.*) *libphy.a:(.rodata .rodata.*) + *libsoc.a:rtc_clk.o(.rodata .rodata.*) *libapp_trace.a:(.rodata .rodata.*) *libgcov.a:(.rodata .rodata.*) *libheap.a:multi_heap.o(.rodata .rodata.*)