Page 1 of 1

Memory Useage Summary?

Posted: Tue Feb 18, 2025 11:14 pm
by klaatu2
ESP32-S3, with 16MB or Flash, and 8MB of PSRAM.

When ESP-IDF v5.4 compiles it produces the summary below:

How does this summary showing 42MB of Total available Flash make sense?
No mention of PSRAM.
No mention of internal ROM

ESP32 Memory summary.png
ESP32 Memory summary.png (18.92 KiB) Viewed 1669 times

Re: Memory Useage Summary?

Posted: Tue Feb 18, 2025 11:28 pm
by chegewara
Hi
- 4 474 552 - is not 42MB
- you have setup 32MB in sdkconfig, i think, because its what the total bytes show

Re: Memory Useage Summary?

Posted: Wed Feb 19, 2025 3:23 am
by klaatu2
I'm not talking about the resulting code size, but rather the total bytes available as shown in the right most column

Re: Memory Useage Summary?

Posted: Wed Feb 19, 2025 3:55 am
by chegewara
Ok, thats fine. But its still 32MB, thats why i said this
- you have setup 32MB in sdkconfig, i think, because its what the total bytes show
Just check with idf.py menuconfig

Re: Memory Useage Summary?

Posted: Sat Feb 22, 2025 1:22 am
by klaatu2
In Menuconfig, its set to 16MB.

Re: Memory Useage Summary?

Posted: Sat Feb 22, 2025 4:02 am
by chegewara
You are correct, idf.py size seems to be broken.
I thought it may be only on P4, but on S3 it shows very odd values too (maybe other models too)

Code: Select all

                            Memory Type Usage Summary                             
┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Memory Type/Section ┃ Used [bytes] ┃ Used [%] ┃ Remain [bytes] ┃ Total [bytes] ┃
┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ Flash Code          │      1312083 │    15.64 │        7076493 │       8388576 │
│    .text            │      1312083 │    15.64 │                │               │
│ Flash Data          │       376608 │     1.12 │       33177792 │      33554400 │
│    .rodata          │       340736 │     1.02 │                │               │
│    .bss             │        35616 │     0.11 │                │               │
│    .appdesc         │          256 │      0.0 │                │               │
│ DIRAM               │       262932 │    76.93 │          78828 │        341760 │
│    .text            │       171807 │    50.27 │                │               │
│    .bss             │        70936 │    20.76 │                │               │
│    .data            │        19964 │     5.84 │                │               │
│ IRAM                │        16384 │    100.0 │              0 │         16384 │
│    .text            │        15356 │    93.73 │                │               │
│    .vectors         │         1028 │     6.27 │                │               │
│ RTC FAST            │           52 │     0.63 │           8140 │          8192 │
│    .force_fast      │           28 │     0.34 │                │               │
│    .rtc_reserved    │           24 │     0.29 │                │               │
└─────────────────────┴──────────────┴──────────┴────────────────┴───────────────┘
Total image size: 1861258 bytes (.bin may be padded larger)
with values

Code: Select all

CONFIG_IDF_TARGET="esp32s3"
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
- flash size 4MB
- size shows flash code total bytes 8MB
- flash data total bytes 32MB