From a59062f719b58f06a1aa5b5ea8bbb3a9c0a0a5c7 Mon Sep 17 00:00:00 2001 From: Dong Heng Date: Fri, 20 Nov 2020 16:20:56 +0800 Subject: [PATCH] xtensa/esp32: Optimize IRAM usage based on esp-idf Decrease about 87KB IRAM space cost from Wi-Fi related libs. --- boards/xtensa/esp32/esp32-core/scripts/esp32_flash.ld | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/boards/xtensa/esp32/esp32-core/scripts/esp32_flash.ld b/boards/xtensa/esp32/esp32-core/scripts/esp32_flash.ld index 65c1421f05..2909e8f07b 100644 --- a/boards/xtensa/esp32/esp32-core/scripts/esp32_flash.ld +++ b/boards/xtensa/esp32/esp32-core/scripts/esp32_flash.ld @@ -54,13 +54,10 @@ SECTIONS _iram_text_start = ABSOLUTE(.); *(.iram1 .iram1.*) - *libphy.a:(.literal .text .literal.* .text.*) *librtc.a:(.literal .text .literal.* .text.*) - *libpp.a:(.literal .text .literal.* .text.*) - *libhal.a:(.literal .text .literal.* .text.*) *libarch.a:esp32_spiflash.*(.literal .text .literal.* .text.*) *(.wifirxiram .wifirxiram.*) - *(.wifirxiram .wifi0iram.*) + *(.wifi0iram .wifi0iram.*) _iram_text_end = ABSOLUTE(.); /* Module text area starts at the end of iram0_0_seg */ @@ -116,6 +113,7 @@ SECTIONS KEEP (*(.gnu.linkonce.s2.*)) KEEP (*(.jcr)) *(.dram1 .dram1.*) + *libphy.a:(.rodata .rodata.*) *libarch.a:esp32_spiflash.*(.rodata .rodata.*) . = ALIGN(4); _edata = ABSOLUTE(.);