Skip to content
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

Reduce size of binary to extent possible #27

Open
dkerr64 opened this issue Dec 29, 2024 · 1 comment
Open

Reduce size of binary to extent possible #27

dkerr64 opened this issue Dec 29, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@dkerr64
Copy link
Collaborator

dkerr64 commented Dec 29, 2024

Opening this to track and discuss how to reduce the size of the firmware binary. We have maximum available space of (2MB - 64KB) and at times have used over 90% of this... leaving little margin.

The version in PR #26 currently builds at 84.1% but more savings are likely possible. This page documents a number of ESP-IDF config settings that could optimize our build size. We would need to build our own ESP framework as suggested in Issue #13.

Some ideas...

  • Remove IPv6 support, we don't use it (at least not for now)
  • Reduce TLS cyphers to only those needed for HomeKit
  • Remove the virtual filesystem component
  • Remove some of the debug/error handling as suggested in above link.

Note: When changing sdkconfig.defaults it is necessary to manually delete the sdkconfig.ratgdo_esp32dev file or the new settings are not picked up.

@dkerr64 dkerr64 added the enhancement New feature or request label Dec 29, 2024
@dkerr64
Copy link
Collaborator Author

dkerr64 commented Dec 29, 2024

Building with the version of sdkconfig.defaults that is in current repo reduces binary size to 78.1%... and that is without seeking out specific optimizations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant