From b238bc691d553df2078d5d658e3b7979e874a82e Mon Sep 17 00:00:00 2001 From: XiaXiaotian Date: Wed, 12 Apr 2017 17:42:45 +0800 Subject: [PATCH 1/2] Do not put the whole object files into IRAM. Add attributes to the functions called in ISR instead. --- components/esp32/ld/esp32.common.ld | 6 ------ components/esp32/lib | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/components/esp32/ld/esp32.common.ld b/components/esp32/ld/esp32.common.ld index 67beb35a96..ff451132bb 100644 --- a/components/esp32/ld/esp32.common.ld +++ b/components/esp32/ld/esp32.common.ld @@ -90,13 +90,7 @@ SECTIONS *libphy.a:(.literal .text .literal.* .text.*) *librtc.a:(.literal .text .literal.* .text.*) *libsoc.a:(.literal .text .literal.* .text.*) - *libpp.a:pp.o(.literal .text .literal.* .text.*) - *libpp.a:lmac.o(.literal .text .literal.* .text.*) - *libpp.a:wdev.o(.literal .text .literal.* .text.*) - *libcore.a:ets_timer.o(.literal .text .literal.* .text.*) - *libnet80211.a:ieee80211_misc.o(.literal .text .literal.* .text.*) *libhal.a:(.literal .text .literal.* .text.*) - *libcoexist.a:(.literal .text .literal.* .text.*) *libspi_flash.a:spi_flash_rom_patch.o(.literal .text .literal.* .text.*) _iram_text_end = ABSOLUTE(.); } > iram0_0_seg diff --git a/components/esp32/lib b/components/esp32/lib index 7558b83e90..53aac75afe 160000 --- a/components/esp32/lib +++ b/components/esp32/lib @@ -1 +1 @@ -Subproject commit 7558b83e906589cb8491a894fd8e6f8c1f6554b6 +Subproject commit 53aac75afe219af9feca42aca7f1126d394844c9 From 9d8425bd72aa2fd530370ad77998ac29a865de83 Mon Sep 17 00:00:00 2001 From: XiaXiaotian Date: Mon, 24 Apr 2017 11:22:49 +0800 Subject: [PATCH 2/2] put RODATA of libphy.a into DRAM There are some RODATAs of libphy.a that are called in ISR. So need to put them into DRAM to avoid access them when R/W SPI flash. Due to the RODATAs which are called in ISR haven't been picked out to put into DRAM, put all of the RODATA of libphy.a into DRAM. This will be optimized in the future. --- 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 ff451132bb..48e31d1ea0 100644 --- a/components/esp32/ld/esp32.common.ld +++ b/components/esp32/ld/esp32.common.ld @@ -112,6 +112,7 @@ SECTIONS *(.dram1 .dram1.*) *libesp32.a:panic.o(.rodata .rodata.*) *libesp32.a:app_trace.o(.rodata .rodata.*) + *libphy.a:(.rodata .rodata.*) _data_end = ABSOLUTE(.); . = ALIGN(4); } >dram0_0_seg