fix: grow app partitions to 1.5MB - C3 image no longer fits stock table - #15
Merged
Conversation
The ESP32-C3 firmware.bin (1,316,912 bytes) exceeded the 1,310,720-byte app0 slot of the stock default.csv partition table. The bootloader rejects an image larger than its partition on every boot and software-resets forever (rst:0x3 loop) - with the error only on UART0, invisible on USB-only C3 boards. PlatformIO's "Flash: 91.8%" check missed it because it sums ELF sections and omits the ~113KB of MMU-alignment padding present in the flashed .bin. This presented as "Improv Wi-Fi crashes the C3": linking improv.handleSerial() added the ~5KB that pushed the image over the line. The Improv code itself was never at fault and stays fully enabled on all boards. - partitions_4MB.csv: 1.5MB app slots (was 1.25MB), littlefs shrunk to 896KB and moved 0x290000 -> 0x310000, applied to all three boards - release.yml: littlefs merge offset updated to match - check_app_size.py: post-build guard failing any build whose actual .bin exceeds the app partition, so this can't silently ship again - release notes flash table now reports real .bin size vs app partition Verified on hardware (Teyleten C3 SuperMini): old table boot-loops, new table boots clean and answers Improv device-info RPC over USB. Note for release notes: devices flashed before this change need one full web-flasher/factory reflash to pick up the new partition table; a C3 app-only OTA onto the old table is rejected (not bricked). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Expands ESP32 app partitions and adds binary-size validation to prevent oversized firmware boot loops.
Changes:
- Adds a shared 4 MB partition layout with 1.5 MB OTA slots.
- Validates actual
firmware.binsize after builds. - Updates factory-image offsets and release flash-usage metadata.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
platformio.ini |
Enables the custom partition table and size guard. |
partitions_4MB.csv |
Defines enlarged app slots and relocated LittleFS. |
build/scripts/check_app_size.py |
Rejects oversized firmware binaries. |
build/scripts/render_release_notes.py |
Documents actual binary-size metadata. |
.github/workflows/release.yml |
Updates usage extraction and LittleFS offset. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ESP32-C3 firmware.bin (1,316,912 bytes) exceeded the 1,310,720-byte app0 slot of the stock default.csv partition table. The bootloader rejects an image larger than its partition on every boot and software-resets forever (rst:0x3 loop) - with the error only on UART0, invisible on USB-only C3 boards. PlatformIO's "Flash: 91.8%" check missed it because it sums ELF sections and omits the ~113KB of MMU-alignment padding present in the flashed .bin.
This presented as "Improv Wi-Fi crashes the C3": linking improv.handleSerial() added the ~5KB that pushed the image over the line. The Improv code itself was never at fault and stays fully enabled on all boards.
Verified on hardware (Teyleten C3 SuperMini): old table boot-loops, new table boots clean and answers Improv device-info RPC over USB.
Note for release notes: devices flashed before this change need one full web-flasher/factory reflash to pick up the new partition table; a C3 app-only OTA onto the old table is rejected (not bricked).