-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Size of binary grows by 15-20% with latest version #471
Comments
im going to be looking into this also with v2.1 |
FYI I made a little experiment with my homie-ota project. In https://github.com/luebbe/homie-ota/tree/playground. I changed platformio.ini so that four builds are made in the following order
if you delete .piolibdeps before "pio run", you can see that the ssd1306 and u8g2 lib_deps are downloaded and installed when needed. |
Good question, I have no idea but when I have time I hope to find out my self. Will pass on anything I learn. |
Can confirm, using https://github.com/euphi/Homie_BareMinimum results in a 395K binary, with Homie v2.0.0-beta.3, v2.0.0-beta.2, and Develop This also allows a one time flash of the Sonoff device I'm using at the moment ( Sonoff Touch with ESP8285 ), and then all future OTA updates fail with an error 400 NOT_ENOUGH_SPACE Has Homie gotten fat? :-) ( I don't think so, I think it's likely to be a dependency somewhere ) |
Biggest change to homie that i know was changing the web server to use the async version. Will look into whats causing the bloat. I do know that were still dependant on the core webClient and thats why i requested for a asyncWebClient (me-no-dev/ESPAsyncWebServer#283). The idea being were using as much async stuff as possible and the async version builds on from asyncTCP which is required for mqtt and the asyncWebServer, thus this could reduce firmware size.
|
For a more modular design (--> homie 3.0) it would be nice to be able to remove the Web server completely. I don't need it, because I upload config.json via USB to SPIFFS and the Web server is not used in normal mode. As a first step, it could be removed by using compiler flags. |
Yes homie 3.0 will aim for that |
Homie-BareMinimum: Old (7.12.17) New (17.1.18): LDF old:
|
@euphi which branch/commit for each ?? because homie dev hasn't had major changes in that time frame?? |
Yes, it seems to be caused by dependencies. The difference between 2.0.0-beta3 and develop is quite small. Unfortunately platformio does not show the full version (platformio/platformio-core#1274). |
For me, upgrading Espressif 8266 platform from 1.5.0 to 1.6.0 caused an increase of 11%. |
I agree, with espressif8266@1.5.0, my binary is 8.9% smaller. Is this something https://github.com/platformio/platform-espressif8266 can help with? |
Please see #563 for one first compiler flag to reduce the size by just disabling not used features. |
Hi folks,
maybe not the 100% correct place to ask the question here, but I'm hoping for some tips nevertheless.
The binary size of my https://github.com/luebbe/homie-sonoff/ project grew by 20% (from 366544 bytes to 416192 bytes) by switching to the latest version of homie and updating all the dependencies. This is becoming a bit of a problem on sonoff devices which only have 1 MByte of flash.
I don't really understand what is causing this.
Is it possible that the linker just links everything, even unused code from piolibdeps into the binary?
How can I prevent this from happening?
The text was updated successfully, but these errors were encountered: