Repository navigation
fix(memory): shrink AVR show bookkeeping and ratchet size budgets - #4752
Merged
Merged
Conversation
9 tasks done
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (9)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
23 tasks done
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.
Summary
Refs #4743 and #4737. Narrow
CFastLED::showcontroller bookkeeping tofl::u8only whensizeof(int) == 2andMAX_CLED_CONTROLLERS <= 255. Larger configured capacities and 32-bit targets retainint. All three controller passes, callbacks, driver choices, correction/dithering, white-channel modes and power limiting remain intact. No public API or ABI changes.Local measurements
All values below are fbuild board flash / physical RAM bytes. One existing checkout, sequential builds, no worktrees, fbuild 2.5.37. ATtiny85 uses GCC 7.3.0-atmel3.6.1-arduino7, ATTinyCore 1.5.2, 8 MHz, normal -Os/LTO. Base master is d9cc468; 3.10.3 is 20667c3.
ATtiny85
CFastLED::showshrinks 582 -> 570 B, accounting for all 12 B. Pre-Uno master 28a41d6 measures 2640 / 163; #4751 already landed the two-byte selector RAM saving. This PR preserves it and beats the parent's original 2638-byte flash reference by 10 B. The two-byte difference between that frozen reference and the freshly reproduced starting flash is recorded, not attributed to this change.Remaining ATtiny85 gap versus 3.10.3: -710 B flash / +30 B physical RAM. RAM ledger: controller +10, unique vtables +12, FastLED object +2, configurable wait-spin budget +4, timer counter +4, old correction accumulator -1 and old dither phase -1. Vtable aliases share addresses; attributed RAM is 189 B while physical RAM is 161 B (historical 153 vs 131). No fields or virtual features were removed to erase the gap.
Shared published builds remain exact: STM32 26324 / 3472, C3 403182 / 68524, C6 360434 / 18612; existing budgets pass. An initial byte-index experiment on all targets regressed STM32 by 12 B and was discarded. The final 16-bit-int restriction restores the prior 32-bit results.
Regression gates and behavior evidence
bash compile <board> --examples <example>thenbash bloat <board> --budget <scoped JSON>; generated-TU static assertions plus the existing fbuild clean wrapper were used for concrete stale-output risks. Toolchain/dependency caches retained. Historical source uses the compatibility::delay(0)stub; current uses normalfl::delay(0). Controlled RGB sketches are measured separately; default published sketches restored afterward.bash test --cpp: final 319 native units pass. The earlier full gate also passed 95 host examples; the final unit gate reused their cache.bash test fastled_core --debugpasses sanitizers.FL_REQUIRE_TINY_ELF=1 PYTEST_ADDOPTS='-k tiny_links_no_float --junitxml=.build/memory-4737/attiny85/tiny-links.junit.xml' bash test --py: 3 passed, 0 skipped; actual FastLED present, no soft-float helpers, no pipeline solver.NO_CORRECTION=0,NO_DITHERING=0), RGBW/RGBWW switching,show,showColorand power-limiter workload links and fits: 7054 / 177. Validation only; excluded from default savings. No hardware waveform execution claimed. The final default build is restored and passes its budget.fl::printfremains in the measured AVR path. Preserve explicitly enabled feature behavior; no UART peripheral was fabricated for ATtiny85.bash lintpasses. Manual/code-review: all nine changed files reviewed, bounded counter cannot wrap at the terminating 255 limit, larger limits retain prior type; no findings. Production path is every AVR sketch callingFastLED.show(); flash saving is confirmed in actual linked examples.All platform validation is local. CI Full was not invoked. Parent #4737 must remain open; child completion follows landed verification and a cumulative parent performance comment. Artifacts retained in
.build/memory-4737/attiny85/.