I updated ESPHOME to 2022.12 and wanted to upgrade my devices. However one of them can’t compile and generates the error:
Error: The program size (1874625 bytes) is greater than maximum allowed (1835008 bytes)
On ESPHome version 2022.10.2 the YAML compiled just fine.
I wonder whether the issue is due to the changes in the flash partition table in version 2022.12? I understand those are for the bluetooth proxy and I am using that.
Is there a way I could solve this issue?
Here’s the logs:
Linking /data/kamerlo/.pioenvs/kamerlo/firmware.elf
Error: The program size (1874625 bytes) is greater than maximum allowed (1835008 bytes)
RAM: [== ] 18.6% (used 61000 bytes from 327680 bytes)
Flash: [==========] 102.2% (used 1874625 bytes from 1835008 bytes)
*** [checkprogsize] Explicit exit, status 1
========================= [FAILED] Took 399.23 seconds
Interesting suggestion! Unfortunately my device does not have more than 4MB flash.
I did find this post suggesting that I might be able to remove the eeprom and spiffs partitions but that would still not be enough for me.
What I did manager to do is to comment out less important sections of my code and now I get to 1792485 bytes which just fits onto the flash.
It’s a shame that I had to cut out functionalities like the logger, now I can no longer see the logs to figure out what’s going on, it’s a black box.
So if anybody has suggestions on what I could do to make the below YAML code take up less flash space so I can get the logger back that would be great.
Rather annoying that the new ESPHome version increases the overall flash size, but I guess it was necessary.
@nickrout the issue happens in all cases, whether I download it for installing using the flash tool or whether I do it OTA.