Today the espressif32 platform was upgraded from v0.12.0 to v1.0.0.
I have a code that compiled with 0.12.0 to 1,060,542 bytes firmware.elf
After ugrade to v1.0.0 the same code compiles a 1,390,381 bytes firmware.elf - which is too large to fit in the 1,25MB of an ESP32.
This nearly 40% growth of the binary. Too much to crunch this under 1,25MB by refactoring the code.
We introduced new Memory Usage tool in PlatformIO Core 3.6. You should see new detailed information at the end of a build process. What do you see now?
As workaround i increased app memory by changing partition table from default to no_ota, using the new board partition table feature in platformio.ini. And i set corresponding maximum upload size entry in platformio.ini (can this go automatically?)
But this, of course, does not solve the root cause, that exactly the same code now eats 30% more flash memory as before. This is around +300KB. That’s too large to ignore it in embedded projects world.
With actual PlatformIO version 3.6.0a1 i see this at the end of build process:
Retrieving maximum program size .pioenvs\ttgov21\firmware.elf
Checking size .pioenvs\ttgov21\firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA: [== ] 23.9% (used 70488 bytes from 294912 bytes)
PROGRAM: [====== ] 64.3% (used 1349194 bytes from 2097152 bytes)
So, 1349194 bytes is to large for 1,25MB flash in default partition table.
With Espressif 0.12.0 the same code builds a binary which is at around 1,0MB.