IRAM segment overflows when external PSRAM enabled
Posted: Wed May 13, 2020 3:56 pm
Hi.
I have a ESP32 project based on ESP-IDF branch /release/v4.0, which uses Wifi and BLE (Nimble stack). Until now I built the project with disabled external RAM and idf.py size-components gave the following sizes:
I enabled the external PSRAM and now the linker gives the following error:
How can I get the project built with enabled external RAM?
Regards,
Benno
I have a ESP32 project based on ESP-IDF branch /release/v4.0, which uses Wifi and BLE (Nimble stack). Until now I built the project with disabled external RAM and idf.py size-components gave the following sizes:
Code: Select all
Total sizes:
DRAM .data size: 17816 bytes
DRAM .bss size: 49064 bytes
Used static DRAM: 66880 bytes ( 57700 available, 53.7% used)
Used static IRAM: 122821 bytes ( 8251 available, 93.7% used)
Flash code: 966401 bytes
Flash rodata: 255272 bytes
Total image size:~1362310 bytes (.bin may be padded larger)
Per-archive contributions to ELF file:
Archive File DRAM .data & .bss IRAM Flash code & rodata Total
libcloud.a 1564 12724 0 111723 61595 187606
libnet80211.a 971 9190 11383 96843 23460 141847
liblwip.a 21 4422 0 101501 20434 126378
libbt.a 197 6044 494 76654 13473 96862
libc.a 364 20 0 86472 8430 95286
libmbedcrypto.a 64 85 30 81602 11637 93418
libbtdm_app.a 347 2386 21281 61422 4136 89572
libwpa_supplicant.a 8 800 0 57343 22397 80548
libpp.a 1317 5415 22950 36015 4280 69977
libdriver.a 168 122 3051 37785 12162 53288
libmain.a 123 1939 228 24810 13671 40771
libphy.a 1604 930 6483 30567 0 39584
libmbedtls.a 60 200 0 26447 5206 31913
libfreertos.a 4140 776 15574 0 2114 22604
libesp32.a 2570 133 7592 7052 4252 21599
libnvs_flash.a 0 32 0 15297 3523 18852
libnghttp.a 0 0 0 14246 4002 18248
libsoc.a 184 4 7024 935 4220 12367
libesp_http_client.a 0 0 0 8314 3321 11635
libspi_flash.a 808 294 6488 1747 1522 10859
libcoexist.a 2042 28 3842 4402 325 10639
libconsole.a 4 52 0 8725 1334 10115
libvfs.a 308 48 0 7697 1038 9091
libmbedx509.a 0 0 0 7487 1406 8893
libesp_event.a 0 4 0 4911 3875 8790
libbootloader_support.a 0 4 1020 4473 3050 8547
libesp_common.a 16 2240 1060 1362 3410 8088
libtcpip_adapter.a 4 161 0 5039 1863 7067
libesp_wifi.a 28 42 262 3279 2940 6551
libgcc.a 4 12 193 5383 872 6464
libesp-tls.a 0 4 0 4007 2298 6309
libheap.a 301 8 3396 1439 766 5910
libcmd_nvs.a 16 64 0 3162 2095 5337
libm.a 4 0 0 4969 69 5042
libesp_ringbuf.a 0 0 4318 0 559 4877
libtcp_transport.a 0 0 0 3517 1000 4517
libstdc++.a 8 20 0 2554 1044 3626
libesp_https_ota.a 0 0 0 1732 1370 3102
libapp_update.a 1 20 190 1648 977 2836
libnewlib.a 152 272 820 1342 85 2671
libefuse.a 52 4 0 1323 938 2317
librtc.a 0 4 2243 0 0 2247
libesp_adc_cal.a 0 0 0 999 658 1657
liblog.a 8 268 491 698 96 1561
libpthread.a 16 12 243 783 503 1557
libcore.a 0 29 0 607 228 864
libhal.a 0 0 519 0 32 551
libxtensa.a 0 0 225 0 0 225
libesp_eth.a 4 0 0 0 10 14
libcxx.a 0 0 0 11 0 11
(exe) 0 0 0 0 0 0
libmesh.a 0 0 0 0 0 0
Code: Select all
tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/ld.exe: c0020.elf section `.iram0.text' will not fit in region `iram0_0_seg'
tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/ld.exe: IRAM0 segment data does not fit.
tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/ld.exe: region `iram0_0_seg' overflowed by 19617 bytes
Regards,
Benno