esp_app_desc huge flash usage
Posted: Wed May 22, 2024 8:56 pm
Using IDF 5.3.0 (esp32), I'm trying to reduce my binary size and have found that the esp_app_desc object is a huge factor.
It's even worse when targeting C3/C6. Previous builds on IDF 4.4.7 had esp_app_desc weighing in at around 500 bytes. Is this expected, and does anyone know how to get it back to reasonable levels? What on earth is all that .rodata?
Code: Select all
Per-file contributions to ELF file
┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━┳━━━━━━┳━━━━━━━┳━━━━━━┳━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┓
┃ Object File ┃ Total Size ┃ DRAM ┃ .bss ┃ .data ┃ IRAM ┃ .text ┃ .vectors ┃ Flash Code ┃ .fini ┃ .text ┃ Flash Data ┃ .rodata ┃ .appdesc ┃ RTC SLOW ┃ .rtc_slow_reserved ┃
┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━╇━━━━━━╇━━━━━━━╇━━━━━━╇━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━┩
│ esp_app_desc.c.obj │ 101024 │ 17 │ 17 │ 0 │ 0 │ 0 │ 0 │ 446 │ 0 │ 446 │ 100561 │ 100305 │ 256 │ 0 │ 0 │
│ ed25519_ref10.c.obj │ 40890 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 10170 │ 0 │ 10170 │ 30720 │ 30720 │ 0 │ 0 │ 0 │
│ ecp_curves.c.obj │ 35219 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 5679 │ 0 │ 5679 │ 29540 │ 29540 │ 0 │ 0 │ 0 │
│ phy_chip_v7.o │ 21219 │ 2558 │ 533 │ 2025 │ 2190 │ 2190 │ 0 │ 16471 │ 0 │ 16471 │ 0 │ 0 │ 0 │ 0 │ 0 │
│ wl_cnx.o │ 19496 │ 3891 │ 3889 │ 2 │ 277 │ 277 │ 0 │ 13997 │ 0 │ 13997 │ 1331 │ 1331 │ 0 │ 0 │ 0 │
│ x509_crt_bundle.S.ob │ 16826 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 16826 │ 16826 │ 0 │ 0 │ 0 │
│ j │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │