-->
Page 1 of 2

ESP32 1.8.5 code takes up much more space vs 1.8.2

PostPosted: Mon Jul 30, 2018 5:44 pm
by picstart
1.8.2 Sketch uses 463345 bytes (44%) of program storage space. Maximum is 1044464 bytes.
1.8.5 Sketch uses 728654 bytes (55%) of program storage space. Maximum is 1310720 bytes.

Now the code utilizes OTA and appears to work for uploading via OTA but 1.8.5 is more bloated and I'm concerned even though it appears to work like a broken clock it could just work twice per day.

Are others seeing this increase in code space with newer IDE versions?
Maybe it is expressif SDK components that are bloating 1.8.5.

Re: ESP32 1.8.5 code takes up much more space vs 1.8.2

PostPosted: Tue Jul 31, 2018 4:55 am
by btidey
Were you comparing between base Arduino versions or the espressif ESP32 arduino support versions? It should be the latter that is largely controlling the overall sketch size.

It might also be worth asking on the espressif esp32 support forum https://www.esp32.com/ as there have been several threads discussing sketch sizes.

Re: ESP32 1.8.5 code takes up much more space vs 1.8.2

PostPosted: Tue Jul 31, 2018 6:52 am
by picstart
Same esp32 dev board same code as far as the arduino c code. Early on 1.8.2 had the esp32 core added manually whereas the 1.8.5 had the boards and the support code for ESP32 added via the preferences url method. I think things should get leaner ( more compact w.r.t. code size) with newer versions. Most I suspect only use a small subset of all the commercial and contributed libraries and a small number of board types.
There are efficient ways to add boards and add libraries but no similar way to delete them. It suggests a bias toward bloat and a reluctance from commercial coders to see code get deleted. Then however there is the next increase in hardware memory to be quickly followed by additional code bloat.
On a Microchip PIC there was a small boot loader taking up a small amount of the code space allowing for uploads of over 90% of the code space. With Arduino OTA the old code just sits there taking up 50% of the space yet the OTA handle that hooks the new upload and is embedded in the active code takes little code space and never changes yet it holds hostage all the code. If it were separate code and got air time via yield() it would be permanently available to hook the next upload and allow all the current code space to be overridden upon an upload.
Anyway looks like I'll have to keep 1.8.2 for OTA.

Re: ESP32 1.8.5 code takes up much more space vs 1.8.2

PostPosted: Tue Jul 31, 2018 8:44 am
by rudy
I think things should get leaner ( more compact w.r.t. code size) with newer versions.


I would think the opposite. I would expect code size to increase with newer versions because more than the simplest conditions are handled. More cases that have come up with more people using the code.

As far as the increased code size between those versions, what have you seen with the ESP8266 code? Since this is a ESP8266 forum.