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

[Enhancement] Shrink WiFi application size by compressing BLOB #909

Open
earlephilhower opened this issue Jul 8, 2022 · 0 comments
Open

Comments

@earlephilhower
Copy link
Contributor

The binary WiFi blobs are 200-400KB in size, but are only used to upload to the Cyw43 WiFi chip. This makes applications grow massively (before taking in to account any add'l LWIP code).

One way to help minimize this bloat would be to compress the BLOBs and decompress them on-the-fly as they are uploaded to the Cyw43 chip.

UZLib is a simple decompressor for gzip blobs and only added ~4K of code to the ESP8266 Arduino code when it was added (it is used there to support compressed OTA).

https://github.com/pfalcon/uzlib/tree/master

A quick test shows that:

  • 220K firmware blob compressed to 138K (~40% savings)
  • 417K firmware blob compressed to 280K (~30% savings)
@kilograham kilograham added this to the 1.5.0 milestone Jul 11, 2022
peterharperuk added a commit to peterharperuk/pico-sdk that referenced this issue Oct 17, 2022
peterharperuk added a commit to peterharperuk/pico-sdk that referenced this issue Nov 22, 2022
Add build changes needed for firmware compression. Enhance
cyw43_write_bytes to allow us to use a src pointer part way through
spid_buf which is used as a temorary buffer for firmware decompression

Depends on georgerobotics/cyw43-driver#44
Fixes raspberrypi#909
peterharperuk added a commit to peterharperuk/pico-sdk that referenced this issue Feb 16, 2023
Add build changes needed for firmware compression. Enhance
cyw43_write_bytes to allow us to use a src pointer part way through
spid_buf which is used as a temorary buffer for firmware decompression

Depends on georgerobotics/cyw43-driver#44
Fixes raspberrypi#909
peterharperuk added a commit to peterharperuk/pico-sdk that referenced this issue Feb 22, 2023
Add build changes needed for firmware compression. Enhance
cyw43_write_bytes to allow us to use a src pointer part way through
spid_buf which is used as a temorary buffer for firmware decompression

Depends on georgerobotics/cyw43-driver#44
Fixes raspberrypi#909
peterharperuk added a commit to peterharperuk/pico-sdk that referenced this issue Feb 27, 2023
Add build changes needed for firmware compression. Enhance
cyw43_write_bytes to allow us to use a src pointer part way through
spid_buf which is used as a temorary buffer for firmware decompression

Depends on georgerobotics/cyw43-driver#44
Fixes raspberrypi#909
peterharperuk added a commit to peterharperuk/pico-sdk that referenced this issue Mar 14, 2023
Add build changes needed for firmware compression. Enhance
cyw43_write_bytes to allow us to use a src pointer part way through
spid_buf which is used as a temorary buffer for firmware decompression

Depends on georgerobotics/cyw43-driver#44
Fixes raspberrypi#909
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants