8MB partition: 2.3MB program, 3.4MB LittleFS (for discussion)#5466
8MB partition: 2.3MB program, 3.4MB LittleFS (for discussion)#5466softhack007 wants to merge 2 commits intomainfrom
Conversation
* increase program partition by 132 KB * add zigbee compatible 8MB partitions file
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (2)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
It seems that the espressif Zigbee stack has "Estimated flash increase: ~300–500 KB of additional program code." |
extra 400KB margin for ZigBee stack (flash program: 2555904 bytes)
|
@coderabbitai please check if the modified zigbee partions file is still correct and aligned with espressif specs. Short answer is sufficient. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 440
🧠 Learnings used |
|
So would we set the app size to be the same for both the regular 8 and the ZigBee variant, but the littlefs smaller on the ZigBee to allow for the ZigBee partitions? End users might be less likely to be swapping back and forth, but as Devs it with would be nice to be able to OTA between a regular and a ZigBee C6 build |
|
In general I would be careful in changing partitions for default ESP32 builds as it is a "breaking change" to existing setups in the sense that a build will not fail if it grows too large but it is unusable for OTA to any existing setup. Should that point of "need those extra 200k bytes" arrive, we need to provide a way to change partition tables OTA for existing setups. Changing the default now is asking for trouble down the line IMHO. |
Actually the zigbee partitions are small, around 20KB. We could even add that to the "standard" partitioning. The main driver is program size +350KB for zigbee support. A bit of comparing / tinkering with the zigbee PR:
Edit: for development, we could even go for the "big enough for MATTER" solution => ~2MB Filesystem, 3MB program |
I agree that breaking existing setups is bad. Currently there are only very few esp32 installs with 8MB, more for esp32-S3 as this MCU was always 8MB flash except for the cheap "s3 tiny/zero" boards. Looking at WLED history, we already "broke" program size limits at least two times
From these experiences - every late increase was a big cry-out for users - I would say its better to break stuff early, and start BIGGER on 8MB. OTA updates for old installs will continue to work, until we actually hit the limit of previous partioning (inevitable). If we have a bigger 8MB default with 16.0, it means that more first-install users will be "prepared for the future" when program size grows. |
|
What do you think about this:
--> 8MB default = 2.3 MB program, 3.4 MB files - with coredump Is 3.4 MB for media files still OK? or too tight already? Edit: I guess that "2.3 MB program" will also have enough space for adding HTTPS or bluetooth (maybe not enough when combining them with zigbee, though). |
Actually the esp32-c5 "full debug" build is the best reason for increasing the 8MB program partition now (before massive rollout) - it barely fits into the current partitions' layout.
comparison:
V4
esp32-S3 8MB "opi" PSRAM (tasmota framework)
Flash: [====== ] 58.4% (used 1224085 bytes from 2097152 bytes)with 4MB LittleFSFlash: [===== ] 54.9% (used 1224085 bytes from 2228224 bytes)with 3.75MB LittleFSV5
esp32-C5 8M "qspi" PSRAM (pioarduino framework)
Flash: [========= ] 85.4% (used 1790459 bytes from 2097152 bytes)Flash: [======== ] 80.4% (used 1790459 bytes from 2228224 bytes)C5 full debug build (build_type = debug, -fno-lto, -D WLED_DEBUG -D CORE_DEBUG_LEVEL=5)
Flash: [========= ] 91.6% (used 2040809 bytes from 2228224 bytes)C5 build with -O2 (optimize for speed), no debug
Flash: [========= ] 87.4% (used 1946845 bytes from 2228224 bytes)question
This is mainly a discussion input for finding a good balance between LittleFS and program size on 8MB boards.
The partition boundaries can be changed in 64KB steps. We need two OTA partitions, that's why each program increase counts 2x against LittleFS.
What do you think - Should we increase the 8MB program partition even more? Or better to stay with the previous 2MB/4MB layout, risking that some
V5debug builds will not fit onto an 8MB board in the future?