Page 1 of 1

Program memory size

Posted: Sat Dec 31, 2022 8:07 pm
by bdrmachine
After numerous google searches I still find the instruction memory of the esp32 confusing. I need a esp32 module (preferably with a U.FL connector) that has more than 4Meg of flash to store code. If a board is listed as "16MB of Embedded SPI flash storage" is all of this available for program storage? Any good suggestions on board suppliers with larger memory offerings that have U.FL connect with all the basic support components like USB to serial programming and 5v to 3.3v regulation?

Re: Program memory size

Posted: Sun Jan 01, 2023 1:25 am
by ESP_Sprite
bdrmachine wrote:
Sat Dec 31, 2022 8:07 pm
If a board is listed as "16MB of Embedded SPI flash storage" is all of this available for program storage?
Kind-of. With flash sizes like this, you'd be limited by the memory mapping address limitations, which means the ESP in practice can only map up to 4MiB of data and 4MiB of code from flash into its address range. If you have multiple applications in flash (e.g. using OTA), you can fill the entire flash with program storage, though. Note that in general, this 4MiB+4MiB rarely is a limitation; unless you know you need to store loads of data in e.g. an embedded filesystem, 16MiB usually is enough.