Memory Useage Summary?

User avatar
klaatu2
Posts: 36
Joined: Wed Feb 08, 2023 11:32 pm
Location: TEXAS

Memory Useage Summary?

Postby klaatu2 » Tue Feb 18, 2025 11:14 pm

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 1665 times
Last edited by klaatu2 on Wed Feb 19, 2025 5:26 am, edited 2 times in total.

chegewara
Posts: 2505
Joined: Wed Jun 14, 2017 9:00 pm

Re: Memory Useage Summary?

Postby chegewara » Tue Feb 18, 2025 11:28 pm

Hi
- 4 474 552 - is not 42MB
- you have setup 32MB in sdkconfig, i think, because its what the total bytes show

User avatar
klaatu2
Posts: 36
Joined: Wed Feb 08, 2023 11:32 pm
Location: TEXAS

Re: Memory Useage Summary?

Postby klaatu2 » Wed Feb 19, 2025 3:23 am

I'm not talking about the resulting code size, but rather the total bytes available as shown in the right most column

chegewara
Posts: 2505
Joined: Wed Jun 14, 2017 9:00 pm

Re: Memory Useage Summary?

Postby chegewara » Wed Feb 19, 2025 3:55 am

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

User avatar
klaatu2
Posts: 36
Joined: Wed Feb 08, 2023 11:32 pm
Location: TEXAS

Re: Memory Useage Summary?

Postby klaatu2 » Sat Feb 22, 2025 1:22 am

In Menuconfig, its set to 16MB.

chegewara
Posts: 2505
Joined: Wed Jun 14, 2017 9:00 pm

Re: Memory Useage Summary?

Postby chegewara » Sat Feb 22, 2025 4:02 am

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

Who is online

Users browsing this forum: ChatGPT-User, Qwantbot and 4 guests