No max-build for ESP82xx?
Moderators: grovkillen, Stuntteam, TD-er
-
- New user
- Posts: 8
- Joined: 11 Jan 2025, 18:56
No max-build for ESP82xx?
The title pretty much sums it up, I'm curious why there's no max-build for the ESP82xx, is there a reason for that?
Re: No max-build for ESP82xx?
ESP8266 has a very odd limit in that the sketch cannot exceed (1M - 4k).
So no matter how much flash storage you add, you cannot have a sketch larger than this limit.
So no matter how much flash storage you add, you cannot have a sketch larger than this limit.
Re: No max-build for ESP82xx?
Max code size for ESP8266 is 1MB, but has to fit in the first MB of flash, and needs some administration space, so total is just below 1 MB (~1019 kB). See these docs
Compiling all ESPEasy code for ESP8266 would result in a sketch of over 2MB, so there's no way that will ever fit.
For ESP32 the max sketch (code) size is not exactly specified, but for the 16MB MAX builds we chose 4MB, so we can have 2 APP partitions to alternate between, and still have nearly 8MB of file storage. The 8MB MAX builds have ca. 3.3MB sketch size, so there is still room for a 1MB file system, and the required partition space and boot partition.
In the future we want to go to a small bootloader partition that only knows how to do OTA, and an App partition of around 3MB sketch size, so we can fit a single MAX build on all 4MB Flash ESP32s, with the current 316kB file system. That's to be implemented though.
Compiling all ESPEasy code for ESP8266 would result in a sketch of over 2MB, so there's no way that will ever fit.
For ESP32 the max sketch (code) size is not exactly specified, but for the 16MB MAX builds we chose 4MB, so we can have 2 APP partitions to alternate between, and still have nearly 8MB of file storage. The 8MB MAX builds have ca. 3.3MB sketch size, so there is still room for a 1MB file system, and the required partition space and boot partition.
In the future we want to go to a small bootloader partition that only knows how to do OTA, and an App partition of around 3MB sketch size, so we can fit a single MAX build on all 4MB Flash ESP32s, with the current 316kB file system. That's to be implemented though.
/Ton (PayPal.me)
-
- New user
- Posts: 8
- Joined: 11 Jan 2025, 18:56
Re: No max-build for ESP82xx?
Hmm, didn't knew about that limit. Isn't there any way to get rid of that limit or is it hardcoded or something?
Re: No max-build for ESP82xx?
It is a really hard limit of the CPU architecture of the ESP8266.
In theory we could move flash strings to an area beyond the sketch and maybe things like fonts.
But this does cause quite a lot of other issues, like you need to implement a lot of work-arounds to make sure OTA will not overwrite those areas.
Also it will not be enough to make it all fit anyway and Espressif has declared the ESP8266 obsolete years ago.
So for ESPEasy we have decided not to include new features in official ESP8266 builds (like 'normal', 'collection-X' etc.)
Of course you can still use those new features and/or plugins on ESP8266 as long as they can still work on that platform, but only in 'custom' builds.
For example SSL will not be added to ESP8266 builds as it simply will take too much memory and does add significantly to the build size.
In theory we could move flash strings to an area beyond the sketch and maybe things like fonts.
But this does cause quite a lot of other issues, like you need to implement a lot of work-arounds to make sure OTA will not overwrite those areas.
Also it will not be enough to make it all fit anyway and Espressif has declared the ESP8266 obsolete years ago.
So for ESPEasy we have decided not to include new features in official ESP8266 builds (like 'normal', 'collection-X' etc.)
Of course you can still use those new features and/or plugins on ESP8266 as long as they can still work on that platform, but only in 'custom' builds.
For example SSL will not be added to ESP8266 builds as it simply will take too much memory and does add significantly to the build size.
-
- New user
- Posts: 8
- Joined: 11 Jan 2025, 18:56
Re: No max-build for ESP82xx?
Hmm, makes sense, thanks for the explanation 

Who is online
Users browsing this forum: No registered users and 4 guests