Skip to content

Commit 2bfc445

Browse files
sylvioalvescarlescufi
authored andcommitted
linker: esp32: fix IRAM length for mcuboot
When MCUBoot is enabled, IRAM region needs to be set to a smaller value to avoid overlapping. This shall be re-worked when MCUboot build for ESP32 is performed in Zephyr environment. Signed-off-by: Sylvio Alves <[email protected]>
1 parent 831ecd4 commit 2bfc445

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

soc/xtensa/esp32/linker.ld

+3-5
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@
3939
#define IROM_SEG_ORG 0x400D0020
4040
#define IROM_SEG_LEN 0x330000-0x20
4141
#define IROM_SEG_ALIGN 0x4
42+
#define IRAM_SEG_LEN 0x20000
4243
#else
4344
#define IROM_SEG_ORG 0x400D0000
4445
#define IROM_SEG_LEN 0x330000
4546
#define IROM_SEG_ALIGN 0x10000
47+
#define IRAM_SEG_LEN 0x13000
4648
#endif
4749

4850
MEMORY
@@ -54,7 +56,7 @@ MEMORY
5456
#ifdef CONFIG_ESP32_NETWORK_CORE
5557
iram0_0_seg(RX): org = 0x40080000, len = 0x08000
5658
#else
57-
iram0_0_seg(RX): org = 0x40080000, len = 0x20000
59+
iram0_0_seg(RX): org = 0x40080000, len = IRAM_SEG_LEN
5860
#endif
5961

6062
irom0_0_seg(RX): org = IROM_SEG_ORG, len = IROM_SEG_LEN
@@ -343,10 +345,6 @@ SECTIONS
343345
*(.iram0.literal .iram.literal .iram.text.literal .iram0.text .iram.text)
344346
*libesp32.a:panic.*(.literal .text .literal.* .text.*)
345347
*librtc.a:(.literal .text .literal.* .text.*)
346-
*libsubsys__net__l2__ethernet.a:(.literal .text .literal.* .text.*)
347-
*libsubsys__net__lib__config.a:(.literal .text .literal.* .text.*)
348-
*libsubsys__net__ip.a:(.literal .text .literal.* .text.*)
349-
*libsubsys__net.a:(.literal .text .literal.* .text.*)
350348
*libarch__xtensa__core.a:(.literal .text .literal.* .text.*)
351349
*libkernel.a:(.literal .text .literal.* .text.*)
352350
*libsoc.a:rtc_*.*(.literal .text .literal.* .text.*)

0 commit comments

Comments
 (0)