Skip to content

meta(memory): reduce default flash/RAM usage across all measured platforms #4737

Closed as not planned
10 of 10 issues completed
Closed as not planned

Description

@zackees

Superseded by #4760 at the maintainer’s request. The published Blink comparisons below mixed Serial-enabled and no-Serial sketches. Treat them as historical measurements, not the corrected library baseline. New measurements and unchecked platform checklists belong to #4760. Prior landed optimizations and original child relationships remain intact.

Context

This is the meta issue for ten platform sub-issues. The children own platform implementation and validation; this parent owns shared evidence, sequencing, the complete scorecard and final acceptance.

We must reduce the remaining default flash and RAM usage. The initial dead-weight fixes improved master, but closing #4728's sweep does not resolve the substantial remaining growth versus 3.10.3. Feature and architecture costs still need optimization; classifying growth as expected is not a memory reduction.

Source: fresh three-version measurements.

All cells are flash / RAM in bytes, measured with bash compile, fbuild 2.5.37, the same current tooling and per-board configuration, and each revision's own source and examples. Master is pinned to 0c2e9f7300; release commits are 20667c3a64 (3.10.3) and ebf8c2823c (3.10.6). Blink is used unless noted.

board / example 3.10.3 3.10.6 master
esp32dev 271250 / 23370 311160 / 26532 310964 / 26084
esp32s3 371515 / 75863 436540 / 80008 407732 / 78216
esp32c3 342600 / 63512 433834 / 70332 403408 / 68572
esp32c6 285400 / 14924 379686 / 20316 360704 / 18724
teensy40 61440 / 32928 79872 / 69792 49152 / 28320
teensy41 62464 / 32992 80896 / 69792 50176 / 28384
rp2040 build failed 357808 / 60272 350128 / 59996
uno Blink 3784 / 131 5166 / 633 5158 / 629
uno Apa102 3178 / 187 4510 / 505 3682 / 326
attiny85 3338 / 131 3132 / 237 2638 / 163
stm32f103c8 16092 / 3248 26600 / 3672 26368 / 3488

Remaining master growth versus 3.10.3:

board / example flash delta RAM delta
esp32dev +39714 B (+14.6%) +2714 B (+11.6%)
esp32s3 +36217 B (+9.7%) +2353 B (+3.1%)
esp32c3 +60808 B (+17.7%) +5060 B (+8.0%)
esp32c6 +75304 B (+26.4%) +3800 B (+25.5%)
uno Blink +1374 B (+36.3%) +498 B (+380.2%)
uno Apa102 +504 B (+15.9%) +139 B (+74.3%)
attiny85 -700 B (-21.0%) +32 B (+24.4%)
stm32f103c8 +10276 B (+63.9%) +240 B (+7.4%)

Measurement notes:

Proposal

  1. Establish a byte-level ledger for the remaining flash and RAM growth with bash bloat <board> and matched symbol/link-map diffs. Prioritize C3/C6 RAM, STM32 flash, and the scarce RAM on AVR. Attribute controller storage, vtables, global state, driver registration, encoders, and optional subsystems to actual linked users.
  2. Measure both the published examples and a controlled equivalent RGB workload across versions. Blink's newer Serial banner is part of its reported delta; use the controlled workload to identify library overhead independently. Keep the published-example scorecard visible throughout.
  3. Reduce the default footprint: eliminate unused feature linkage and state, shrink controller/settings and vtable costs where possible, and make driver binding/encoder selection retain only the functionality actually used. Reuse the focused investigations below.
  4. Review the cost of the C6 default PARLIO path and RMT/channel infrastructure as optimization targets. Preserve timing, supported drivers, network coexistence, and RGB/RGBW/RGBWW correctness while reducing their cost.
  5. Ratchet existing size budgets downward after measured savings and cover the remaining RAM regressions through existing test/CI entrypoints. Do not raise ceilings to accommodate these regressions.

Verified investigation entry points: src/fl/channels/cled_controller.h (ChannelOptions mSettings and virtual methods), src/fl/channels/manager.cpp.hpp, src/fl/channels/pipeline_binding.cpp.hpp, src/fl/channels/can_match.cpp.hpp, src/FastLED.cpp.hpp, src/platforms/esp/32/drivers/channel_manager_esp32.cpp.hpp, the RMT5/PARLIO drivers, and examples/Blink/Blink.ino.

Execution workflow: one item at a time, in the repository

We will work through the checklist below one item at a time in the existing repository checkout, without git worktrees, so the same build directories, toolchains, dependency caches and incremental compilation state can be reused.

  • Use a feature branch in the same checkout for code changes. Keep the existing .build/fbuild/<board> directories and test caches in place.
  • Implement and verify one item in one active platform sub-issue before starting the next. Run that item's builds sequentially; do not run concurrent implementations in separate checkouts or worktrees.
  • For each item, record the starting SHA, affected symbols, before/after flash and RAM, relevant checks, and commit/PR. Post a cumulative performance-diff comment on this parent whenever a platform sub-issue closes. Keep the cumulative scorecard updated.
  • Run platform builds and tests locally. Never invoke CI Full. For each child, collect fbuild bloat reports for 3.10.3 and master; audit FL_WARN category logging, fl::printf logging, and RMT/PARLIO overhead without dropping features.
  • Reuse caches, but verify that the ELF reflects the changed source and flags. If concrete evidence shows stale output, use the appropriate wrapper's --clean option for the affected build and verify again. Do not routinely wipe caches or disable fingerprint caching.
  • Check an item off only after its investigation or change has the evidence specified below. The acceptance criteria still govern final closure.

Platform sub-issues

The issues below are attached as native GitHub sub-issues. Each owns its platform's detailed implementation/validation checklist, measurements and budgets. Work through them one at a time, in the existing repository checkout without git worktrees, reusing build caches. Shared fixes belong in the active child and must be measured on affected siblings; record those results before checking off the relevant sibling criteria.

Suggested platform order prioritizes C3/C6 RAM, STM32 flash and AVR RAM, then the other ESP32 targets and validation of platforms with existing gains.

Parent coordination checklist

  • Freeze the implementation starting SHA, tool/framework versions and flags; reproduce the current scorecard and verify cache validity.
  • Maintain a shared byte-level symbol/link-map ledger and controlled RGB-workload measurements alongside the published examples.
  • Complete the seven platform reduction sub-issues with measured default savings, focused RED-to-GREEN budget evidence and landed changes; resolve every proposed exception explicitly.
  • Complete the three platform validation sub-issues, preserving Teensy 4.0/4.1 and RP2040 improvements after shared changes.
  • Run the full eleven-row board/example matrix sequentially, update flash/RAM budgets through existing checks, and verify relevant behavior/tests without relaxed ceilings.
  • Publish the final three-version scorecard, cumulative savings, remaining gaps and commit/PR links; leave this parent open, including after all platform sub-issues are completed.

Acceptance criteria

  • Before implementation, reproduce the regression with a focused failing size budget or measurement check (RED). Each fix turns that check green, with matched before/after flash and RAM evidence.
  • Publish the symbol/link-map ledger and updated three-version scorecard with source SHAs, frameworks, flags and measurement commands. Verify that each analyzed ELF came from its claimed source revision; reject stale incremental artifacts.
  • Land measured default-build RAM reductions for each of the eight regressed rows above, and flash reductions for the seven rows with positive flash deltas. Quantify progress toward the 3.10.3 baseline and every remaining gap. Any row that cannot meet this requirement needs an explicit maintainer-approved exception and a measured budget before closure.
  • Show reductions on the controlled RGB workload as well as the published examples, so example edits alone cannot conceal library overhead. No caller opt-in is required for the claimed default savings.
  • Preserve supported LED output, timing, network coexistence, power-limiter correctness, and explicitly used serial/network/white-channel features. Validate affected production paths and relevant tests/board builds.
  • Preserve the existing Teensy and RP2040 improvements. Lower applicable existing flash budgets and establish enforceable RAM budgets through existing checks; do not relax thresholds.
  • Close platform sub-issues only after their reductions and regression checks land; keep this parent open. An audit, report, or explanation of expected feature cost alone does not satisfy this issue.

Decisions

  • Priority: high. These are default costs, including large proportional RAM increases on 512 B/2 KB AVR targets and significant ESP32-C3/C6 RAM growth.
  • Use 3.10.3 as the optimization reference for comparable workloads, and the measured master column as the concrete starting point. Recovery toward the older baseline is the goal; exact parity must account for example changes and required correctness behavior.
  • Keep default-build savings central. Optional slim configurations can supplement the work, but cannot satisfy the default footprint criteria.
  • Coordinate overlapping driver-binding and AVR work through Eliminate memory usage from dynamic driver binding. #4733 and AVR: remaining Nano sketch growth vs 3.10.3 (+1.5 KB flash, +137 B RAM) and the RGBW power-estimate opt-in #4735. The platform sub-issues own implementation; this parent owns the complete cross-board measurement and reduction criteria.
  • Execute sequentially in the existing repository checkout without git worktrees, preserving build caches between checklist items and invalidating only builds proven stale.

Open questions

  • Which remaining bytes are avoidable overhead, and which are the smallest behavior-preserving implementation of required functionality? The matched symbol ledger must answer this before selecting fixes.

Related issues

Final evidence

All ten platform children are complete. The final eleven-row sequential local matrix passed at 41a6c284fc. Final scorecard and requirement-by-requirement audit record matched savings, remaining gaps, source/metric corrections and behavioral limits. Documentation reconciliation PR #4758 is merged at 79c6cdf9a977e2065986a4800e7253683c1501fd; only the task tracker differs from the validated implementation tree. This parent remains OPEN.

Sub-issues

Sub-issues

10 of 10 Issues completed
Loading 10 sub-issues

Activity

  1. changed the title [-]fix(memory): reduce remaining default flash/RAM growth vs 3.10.3 across AVR, ESP32 and STM32[/-] [+]meta(memory): reduce default flash/RAM usage across all measured platforms[/+] on Oct 7, 2026
  2. zackees commented on Oct 7, 2026

    @zackees
    MemberAuthor

    Performance diff 1: ESP32-C3 (#4739)

    PR #4748 lands the first platform reduction. The meta issue stays open. Work continues one platform at a time in the main repository checkout, without git worktrees or CI Full; platform builds are local.

    fbuild board totals (flash / RAM bytes)

    Workload 3.10.3 Starting master 0c2e9f7300 After #4748 Saving vs starting master Remaining above 3.10.3
    C3 published Blink 342592 / 63512 403384 / 68572 403232 / 68540 152 / 32 +60640 / +5028
    C3 controlled one-LED RGB blink, GPIO 3, no Serial banner 342592 / 63512 384512 / 65500 384364 / 65468 148 / 32 +41772 / +1956

    These are freshly rebuilt local comparisons. The older reference table in the issue body stays visible; small path/tooling variation in its flash values is not counted as a saving. No optional slim profile is used.

    Separate bloat metrics

    Published Blink's image_flash: 385822 → 385622 B (-200 B). Attributed RAM: 25653 → 25621 B (-32 B). These metrics are not the fbuild board totals above. Both the old release and starting master were analyzed using bash bloat esp32c3; candidate reports and equivalent-workload reports were analyzed too.

    The private RMT allocation record shrank from 12 to 8 bytes without changing ledger capacity or dynamic spill. Singleton RAM fell from 176 to 144 B. Building the allocation-failure message directly in FL_ERROR avoids duplicate formatting: emitter 596 → 526 B, and a 48 B string-append helper disappears. Recovery progress is behind FL_LOG_RMT; final errors and all driver/encoder features remain supported. No fl::printf is added.

    Evidence and budgets

    Source references: 3.10.3 20667c3a6413ed46a828f78ec95fb57e58d753f8, starting master 0c2e9f730007e52758d4abc2b9ba356fb581d923; landed revision e60f4fcf7f. fbuild 2.5.37, Arduino-ESP32 3.1.0, IDF 5.3.2, GCC 13.2, unchanged normal C3 board configuration. Historical source/examples were staged from git archive into the same .build/fbuild/esp32c3 project with a compatible ::delay(0) stub; source SHA is recorded separately from bloat's tooling-checkout SHA.

    • RED → GREEN: the two-machine-word allocation-record assertion failed (12 <= 8) before reordering, then passed. The old bloat report exceeds the committed ceilings by 200 B image flash and 32 B attributed RAM; the candidate passes both.
    • bash compile esp32c3 --examples Blink; bash bloat esp32c3 --budget tests/data/esp32c3_bloat_budget.json --no-summary: pass. RMT-log-enabled local compile also passes, and the default build/budget was restored and rechecked.
    • Local C++: 319 unit tests / 95 examples pass. Focused ledger/channel tests pass. Bloat Python checks: 49 pass. Lint and code review pass. Review findings were fixed and validated.
    • Concrete stale incremental output was rejected; project-clean rebuilds verified the final sizes while preserving reusable framework/toolchain caches.
    • No physical-device run is claimed. Remaining footprint is quantified rather than described as solved.

    Cumulative measured savings so far: C3 152 B flash / 32 B RAM on the published example. Other platforms are pending and their shared savings are not assumed. Next: ESP32-C6 #4740, including the default PARLIO path.

    Landed master was rebuilt/analyzed with bash bloat esp32c3 --build --budget tests/data/esp32c3_bloat_budget.json --no-summary and passed the same ceilings. All normal PR checks passed and CodeRabbit approved the final revision.

  3. zackees commented on Oct 7, 2026

    @zackees
    MemberAuthor

    Cumulative memory performance diff — C6 completed

    ESP32-C6 #4740: landed via PR #4749 (8d6ed12). Default PARLIO uses shared storage for its mutually exclusive encoding tables; the 64-byte nibble lookup is temporary during Wave8 initialization. No driver or LED format removed; ISR/transpose algorithms retained.

    All values below are fbuild board flash / RAM bytes. Each row uses its own measured starting master, with the same framework/flags for historical, starting and final source. Work remains sequential in this checkout, without worktrees or CI Full.

    Platform / workload 3.10.3 starting master landed master saved flash / RAM remaining gap to 3.10.3
    C3 / published Blink 342592 / 63512 403384 / 68572 403232 / 68540 152 / 32 +60640 / +5028
    C3 / controlled RGB 342592 / 63512 384512 / 65500 384364 / 65468 148 / 32 +41772 / +1956
    C6 / published Blink 285392 / 14924 360688 / 18724 360494 / 18628 194 / 96 +75102 / +3704
    C6 / controlled RGB 285392 / 14924 360422 / 18708 360228 / 18612 194 / 96 +74836 / +3688

    Published-example savings across the two completed platform rows total 346 B flash / 128 B RAM. These are per-platform sums, not memory savings on one device. Historical parity has not been achieved; gaps remain explicit.

    C6 evidence

    • Sources: 3.10.3 20667c3a6413ed46a828f78ec95fb57e58d753f8; starting master e60f4fcf7feff2cd7e2959eca445e8746b9fd9f3; landed 8d6ed12ccbac48ccc9b3708b2d537ee3a2a6c921. C3 landed via fix(esp32c3): compact RMT allocation records and logging #4748 at e60f4fcf7f.
    • fbuild 2.5.37; C6 Arduino-ESP32 3.3.5 / IDF 5.5.1 / GCC 14.2.0; C3 Arduino-ESP32 3.1.0 / IDF 5.3.2. Normal board flags, no slim opt-in.
    • Published examples use their corresponding source revision. Controlled RGB uses GPIO3, one NEOPIXEL LED, red/black show and 1000-ms delay, no Serial. Historical generated stub uses ::delay(0) for compatibility.
    • Commands: bash compile esp32c6 --examples Blink, bash bloat esp32c6 --no-summary; historical/controlled source staged into the same cached .build/fbuild/esp32c6 project and compiled through the fbuild runner wrapper. Reports for both 3.10.3 and master retained locally in .build/memory-4737/esp32c6/.
    • Image-flash metric 403928 → 403818 (-110 B); attributed flash 346716 → 346518 (-198 B). These differ from board flash. Attributed RAM stays 29888 because the sized-symbol report omits singleton storage; the actual board RAM falls 96 B. Encoding-storage ceiling shrinks from combined 2144 B to 2048 B, compile-time enforced.
    • RED/GREEN: old storage fails the 2048-byte assertion; changed storage passes. Starting master fails the 403818-byte image-flash ceiling; candidate and landed build pass bash bloat esp32c6 --budget tests/data/esp32c6_bloat_budget.json. Attributed-RAM ceiling retained, no threshold raised.
    • Local PARLIO sanitizer tests pass, including byte-for-byte captured DMA waveform over Wave3/Wave8/Wave3/Wave8. Existing tests cover SPI/clockless transitions and supported widths. Full bash test --cpp: 319/319 unit targets; examples cached and validated by wrapper. Lint and repository code review pass.
    • Operational logging already uses FL_LOG_PARLIO; remaining FL_WARN calls report invalid parameters, SDK/allocation errors. No fl::printf logging remains in PARLIO implementation.

    Next platform: STM32F103C8 #4744. This meta issue stays open.

  4. 2 remaining items

  5. zackees commented on Oct 7, 2026

    @zackees
    MemberAuthor

    Cumulative memory performance diff — ATtiny85 completed

    ATtiny85 #4743 landed via PR #4752 at 8d8207f3919e596b7ab9c41cd6560d61692ef9ed. Bounded controller bookkeeping uses a byte only on 16-bit-int targets with a configured maximum <=255. Larger limits and 32-bit targets retain their original type. All three show passes and supported features remain intact.

    All table values are fbuild board flash / physical RAM bytes. Starting master is each platform's recorded implementation baseline; ATtiny85 uses the freshly matched pre-Uno master baseline so the previously landed shared selector saving is visible. The original three-version scorecard remains in the parent body.

    platform / workload 3.10.3 starting master current landed master cumulative saved flash / RAM remaining gap to 3.10.3
    C3 / published Blink 342592 / 63512 403384 / 68572 403182 / 68524 202 / 48 +60590 / +5012
    C3 / controlled RGB 342592 / 63512 384512 / 65500 384314 / 65452 198 / 48 +41722 / +1940
    C6 / published Blink 285392 / 14924 360688 / 18724 360434 / 18612 254 / 112 +75042 / +3688
    C6 / controlled RGB 285392 / 14924 360422 / 18708 360168 / 18596 254 / 112 +74776 / +3672
    STM32 / published Blink 16092 / 3248 26368 / 3488 26324 / 3472 44 / 16 +10232 / +224
    STM32 / controlled RGB 16092 / 3248 25536 / 3488 25496 / 3472 40 / 16 +9404 / +224
    Uno / published Blink 3784 / 131 5158 / 629 5130 / 443 28 / 186 +1346 / +312
    Uno / published Apa102 3178 / 187 3682 / 326 3642 / 324 40 / 2 +464 / +137
    Uno / controlled RGB 3784 / 131 3942 / 268 3914 / 266 28 / 2 +130 / +135
    ATtiny85 / published Blink 3338 / 131 2640 / 163 2628 / 161 12 / 2 -710 / +30
    ATtiny85 / controlled RGB 3338 / 131 2640 / 163 2628 / 161 12 / 2 -710 / +30

    Published-example savings across six completed board/example rows total 580 B flash / 366 B RAM. This sums separate targets, not savings on one device. The added 28 B flash comprises 12 B on ATtiny85 and 8 B each on the two Uno rows. The added 2 B RAM was already landed in #4751 and is first included here for ATtiny85; this index change itself adds no RAM saving. Historical parity has not been achieved.

    ATtiny85 evidence and remaining gap

    • Historical 20667c3a6413ed46a828f78ec95fb57e58d753f8 (3.10.3); matched pre-Uno master 28a41d619f8a51952ef4e9fea127ac8eb10f45f9; child implementation base d9cc468d5cea767ce59ce7d94566f44c2ce045d5; candidate 0da2467cc245145437242d712eb21d91b33cc735; landed 8d8207f3919e596b7ab9c41cd6560d61692ef9ed. Candidate/landed source and budget diff is empty. Landed published Blink is rebuilt and its scoped budget passes.
    • fbuild 2.5.37, AVR GCC 7.3.0-atmel3.6.1-arduino7, ATTinyCore 1.5.2, 8 MHz, default -Os/LTO. Normal default build, no slim opt-in. Tooling report's generic clang++ metadata is not the board compiler; authoritative build_info paths identify AVR GCC. Historical source uses the compatibility ::delay(0) stub; master uses its normal fl::delay(0).
    • Default published and controlled RGB 2640/161 -> 2628/161. CFastLED::show 582 -> 570 B accounts for the 12 B flash saving. An attempted unrestricted byte index increased STM32 flash by 12 B; that experiment was rejected and the final 16-bit-int guard restores prior STM32/C3/C6 published totals. Their controlled measurements are carried forward from the previous landed verification; this PR keeps int unchanged on those architectures.
    • Parent frozen ATtiny85 flash was 2638, while both freshly matched pre-Uno and child-base builds measure 2640. The final 2628 beats both references; 10 B below the frozen table, 12 B below matched starts. The two-byte reference difference is recorded, not attributed to this optimization.
    • Remaining physical RAM ledger versus 3.10.3: controller +10, unique vtables +12, FastLED object +2, configurable wait-spin budget +4, timer binding/counter +4, old correction accumulator -1, old dither phase -1 = +30 B. Aliased NEOPIXEL/Clockless vtables share addresses and are counted once in physical RAM. Attributed RAM is 189 B versus actual board RAM 161 B; historical attribution 153 versus physical 131. No state, virtual features or timing controls were removed.
    • Scoped RED before implementation: base flash2640 exceeds original2638, pre-Uno attributed RAM191 exceeds189. Final scoped GREEN image_flash2628 / attributed RAM189. Legacy ATtiny85 existing Blink ceiling9500 ->2628; Uno5138 ->5130 and3650 ->3642, with matching frozen registry/docs/budgets. No new workflow or raised ceiling. Other ATtiny85 workflow configurations remain unmeasured/unchanged.
    • Final 319 native units pass; earlier full gate passed95 host examples, reused by the final unit gate. Core sanitizer test passes. Actual default ATtiny85 ELF checks: three tests passed, zero skips (FastLED exists, no soft float, no pipeline solver). Lint and manual repository code review pass.
    • Separate enabled correction/dithering/RGBW/RGBWW/power build fits at7054/177, with calls to show/showColor and both white modes. Build evidence only; no physical waveform execution claimed. Its opt-in figures are excluded from default savings. No phantom UART was added; normal explicit-feature APIs remain intact.
    • AVR logging audit finds no logging fl::printf in the measured path. Existing warnings identify invalid/unsupported operations and are already absent on the default tiny tier; diagnostics remain available. Prior RMT/PARLIO reductions remain covered by their completed children.
    • Builds and tests run locally, sequentially in this checkout without worktrees or CI Full. Toolchain/dependency/test caches retained; generated-TU compile-time fingerprints and clean wrapper rebuilds address proven stale-output risk. The matched control sketch is GPIO3, one NEOPIXEL, red/black show and1000-ms delay without Serial. Restored published sketches are checked separately before accepting their reports.

    Commands: bash compile <board> --examples <example>; bash bloat <board> --no-summary; bash bloat attiny85 --budget tests/data/attiny85_bloat_budget.json; Uno scoped budgets; bash test fastled_core --debug; bash test --cpp; FL_REQUIRE_TINY_ELF=1 PYTEST_ADDOPTS='-k tiny_links_no_float --junitxml=...' bash test --py; bash lint. Reports, logs, source fingerprints, ledgers and RED/GREEN evidence are retained under .build/memory-4737/attiny85/ and previous platform directories.

    Next: ESP32 #4738, then ESP32-S3 #4741, Teensy40 #4745, Teensy41 #4746 and RP2040 #4747. Five platform children completed; five remain. Parent #4737 stays open.

  6. reopened this on Oct 7, 2026
  7. zackees commented on Oct 7, 2026

    @zackees
    MemberAuthor

    Cumulative memory performance diff — ESP32

    ESP32 #4738: PR #4753. Landed SHA: 003083fa285de400e5fc1f52a547df338f066716. Candidate/landed diff is empty; fresh landed ESP32 compile and scoped bloat budget pass. All ordinary PR checks pass; CodeRabbit APPROVED without findings.

    All values are fbuild board flash / physical RAM bytes. Matched implementation starting master is used, preserving the previous scorecard anchors. Original three-version measurements remain in the parent body.

    platform / workload 3.10.3 starting master current landed cumulative saved flash / RAM remaining gap
    C3 / published Blink 342592 / 63512 403384 / 68572 402670 / 68388 714 / 184 +60078 / +4876
    C3 / controlled RGB 342592 / 63512 384512 / 65500 383802 / 65316 710 / 184 +41210 / +1804
    C6 / published Blink 285392 / 14924 360688 / 18724 359834 / 18460 854 / 264 +74442 / +3536
    C6 / controlled RGB 285392 / 14924 360422 / 18708 359584 / 18460 838 / 248 +74192 / +3536
    STM32 / published Blink 16092 / 3248 26368 / 3488 26324 / 3472 44 / 16 +10232 / +224
    STM32 / controlled RGB 16092 / 3248 25536 / 3488 25496 / 3472 40 / 16 +9404 / +224
    Uno / published Blink 3784 / 131 5158 / 629 5130 / 443 28 / 186 +1346 / +312
    Uno / published Apa102 3178 / 187 3682 / 326 3642 / 324 40 / 2 +464 / +137
    Uno / controlled RGB 3784 / 131 3942 / 268 3914 / 266 28 / 2 +130 / +135
    Tiny / published Blink 3338 / 131 2640 / 163 2628 / 161 12 / 2 -710 / +30
    Tiny / controlled RGB 3338 / 131 2640 / 163 2628 / 161 12 / 2 -710 / +30
    ESP32 / published Blink 271250 / 23370 310880 / 26036 310428 / 25892 452 / 144 +39178 / +2522
    ESP32 / controlled RGB 271250 / 23370 296584 / 26028 296140 / 25884 444 / 144 +24890 / +2514

    Seven published board/example rows total2144 B flash /798 B RAM saved versus matched starts (separate targets, not one device). This adds1564/432 to the previous580/366: C3 shared512/136, C6 shared600/152, ESP32452/144. ESP32 had inherited84/48 before this child versus the original frozen310964/26084; those inherited savings are excluded from the matched-start sum. Including that explicitly stated bridge yields2228/846.

    C6 control fresh starting HEAD8d8207f391 exactly reproduces360168/18596 and keyed symbol sizes; current359584/18460 saves584/136. Do not substitute published600/152. C3 control saves512/136 versus previous landed. ESP32 control saves444/144.

    ESP32 default image313683→313231 and attributedRAM34637→34489 (distinct from physical boardRAM). RMT state packing52/16, HTTP unused initialization304/56, SPI storage96/72 account for published452/144. Exact controlled image299363→298919. Remaining gaps to3.10.3 are quantified above; parity has not been achieved.

    Local evidence: matched 3.10.3/master fbuild bloat, focused RED→GREEN budgets, real SDK RMT accounting and HTTP loopback lifecycle, original/candidate SPI ownership accounting. Public SPI bus initialization times out inside SDK on both versions; no physical timing or hardware-recovery claim. All supported feature paths remain. Strict native315 fresh units plus4 previously strict-passed targets and95 examples PASS; full Python CI inventory and lint PASS. Four pre-existing arithmetic UB failures fixed with focused strict RED/GREEN and signed-wave/large-damping regressions. Shared S3/STM/Uno Blink/Apa102/Tiny local rebuilds preserve earlier sizes.

    Existing flash ceiling ratcheted340000→313231; ESP32 attributedRAM34489 enforced by new scoped budget. Existing C3/C6 budgets lowered; no new workflow/relaxed ceiling. No logging fl::printf in audited ESP platform. Routine RMT caps use FL_LOG_RMT; genuine failures retain diagnostics.

    Tools: fbuild2.5.37, dev/S3 Arduino3.3.11/IDF5.5.5/GCC14.2, C3Arduino3.1.0/IDF5.3.2/GCC13.2, C6Arduino3.3.5/IDF5.5.1/GCC14.2. Normal defaults/no slim opt-in. Commands bash compile, bash bloat (including scoped budgets), bash test --cpp --debug with UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1, bash lint. Artifacts .build/memory-4737/esp32dev/.

    Sequential local builds in existing checkout; caches retained, no worktrees or CI Full. Next ESP32-S3 #4741, then Teensy40 #4745, Teensy41 #4746, RP2040 #4747. Parent #4737 stays OPEN.

  8. zackees commented on Oct 7, 2026

    @zackees
    MemberAuthor

    Cumulative memory performance diff — ESP32-S3

    S3 #4741: PR #4754, landed SHA 0c2e7841e2d56735b475ab25571a8d15fe79dda4. Candidate/landed tree diff is empty; fresh landed local compile and image/RAM gate pass. All ordinary PR checks pass; CodeRabbit approved without findings. Shared source reductions already landed in earlier children; this PR verifies matched S3 evidence and enforces image/attributed-RAM budgets through the existing gate.

    All values below are fbuild board flash / physical RAM bytes. Original three-version measurements remain in the parent body. Previous matched starts are preserved; S3 adds a freshly reproduced original meta master0c2e9f7300.

    platform / workload 3.10.3 starting master current landed cumulative saved flash / RAM remaining gap
    C3 / published Blink 342592 / 63512 403384 / 68572 402670 / 68388 714 / 184 +60078 / +4876
    C3 / controlled RGB 342592 / 63512 384512 / 65500 383802 / 65316 710 / 184 +41210 / +1804
    C6 / published Blink 285392 / 14924 360688 / 18724 359834 / 18460 854 / 264 +74442 / +3536
    C6 / controlled RGB 285392 / 14924 360422 / 18708 359584 / 18460 838 / 248 +74192 / +3536
    STM32 / published Blink 16092 / 3248 26368 / 3488 26324 / 3472 44 / 16 +10232 / +224
    STM32 / controlled RGB 16092 / 3248 25536 / 3488 25496 / 3472 40 / 16 +9404 / +224
    Uno / published Blink 3784 / 131 5158 / 629 5130 / 443 28 / 186 +1346 / +312
    Uno / published Apa102 3178 / 187 3682 / 326 3642 / 324 40 / 2 +464 / +137
    Uno / controlled RGB 3784 / 131 3942 / 268 3914 / 266 28 / 2 +130 / +135
    Tiny / published Blink 3338 / 131 2640 / 163 2628 / 161 12 / 2 -710 / +30
    Tiny / controlled RGB 3338 / 131 2640 / 163 2628 / 161 12 / 2 -710 / +30
    ESP32 / published Blink 271250 / 23370 310880 / 26036 310428 / 25892 452 / 144 +39178 / +2522
    ESP32 / controlled RGB 271250 / 23370 296584 / 26028 296140 / 25884 444 / 144 +24890 / +2514
    S3 / published Blink 371515 / 75863 407716 / 78216 407068 / 78008 648 / 208 +35553 / +2145
    S3 / controlled RGB 371515 / 75863 407488 / 78216 406840 / 78008 648 / 208 +35325 / +2145

    Eight published board/example rows total2792 B flash /1006 B physical RAM saved versus matched starts: previous2144/798 plus S3648/208. These are separate devices, not one device’s savings. Original frozen S3 published407732/78216 differs from the fresh same-revision build407716/78216 by16flash; do not attribute that bridge to optimization. Candidate lies664/208 below frozenS3 but648/208 below matchedS3. ESP32’s earlier inherited84/48 bridge remains excluded from the matched-start total. Historical parity remains incomplete; every remaining gap is shown.

    S3 matched old/new image367279→366603 (676saved), attributedRAM38503→38323 (180saved), distinct from physical boardRAM208saved. Existing flash baseline367407→366603 has zero unclaimedheadroom; new scoped RAM budget38323 is enforced by the existing workflow/test entrypoint, with no new workflow or raised ceiling.

    Exact saved GPIO3 oneNEOPIXEL red/black1000ms control, noSerial. Published workload retains its normalbanner/pin. 3.10.3 both371515/75863, originalmastercontrol407488/78216, currentcontrol406840/78008. fbuild2.5.37, Arduino-ESP32 3.3.11 / IDF5.5.5 / Xtensa GCC14.2.0, normaldefaults/no slim opt-in. Same source archives and cached stagedproject, forced generatedTU fingerprints; finallyrestored currentpublished validated separately.

    Focused retrospective originalmaster budgetRED676image/180attributedRAM; currentGREEN. ExistinggateRED804unclaimedimageheadroom before baselineupdate, GREENzeroheadroom after. Sharedfixes retain preimplementationRED/GREEN in siblingissues; this budget-only PR does not claimnewsourceimplementation. SelectedPythonbudget/gate tests, full lint, manualthreefile review PASS. Prior strictnative/actualSDK RMT/HTTP/SPI ownership evidence remains in PR4753, freshS3SDK sourcecompile PASS. No physical waveform or hardware-recovery claim.

    Audit: no loggingfl::printf in measured ESPplatformpath; genuine warningdiagnostics preserved, routineRMT capabilitylogs alreadyFL_LOG_RMT. Driverchoice/whiteformats/networkcoexistence remain. TimingfallbacksEmpty is .flash.rodata despite nm’s lowercase d classification; no fictitious physicalRAM saving. Unsafe narrowing of configurablecounts and changing allocator singletonthread/lifetimecontracts rejected. PhysicalFastLEDsectionledger and per-version bloat retained under .build/memory-4737/esp32s3/.

    Commands bash compile esp32s3 --examples Blink; bash bloat esp32s3 --no-summary/--budget; documentedexistingS3 regression script --no-build; PYTEST_ADDOPTS selectedinventory with bash test --py; bash lint. Builds/tests local, sequential in existingcheckout, caches retained; no worktrees or CI Full.

    Seven platform children complete after S3 closes; next Teensy40 #4745, Teensy41 #4746, RP2040 #4747. Parent #4737 stays OPEN.

  9. zackees commented on Oct 7, 2026

    @zackees
    MemberAuthor

    Cumulative memory performance diff — Teensy 4.0 validation

    Teensy 4.0 #4745: PR #4755, landed SHA 8647a12f10825567c068223d20f2abbbdb68ffab. Candidate and landed trees match; fresh landed local rebuild and scoped budget pass. All ordinary checks and follow-up review are green. No native source change: the validation preserves the existing gains and adds a scoped image/RAM budget.

    Board flash / physical RAM bytes. Matched implementation anchors are preserved from the preceding scorecard; original three-version numbers remain in the parent body.

    platform / workload 3.10.3 starting master current landed cumulative saved flash / RAM remaining gap
    C3 / published Blink 342592 / 63512 403384 / 68572 402670 / 68388 714 / 184 +60078 / +4876
    C3 / controlled RGB 342592 / 63512 384512 / 65500 383802 / 65316 710 / 184 +41210 / +1804
    C6 / published Blink 285392 / 14924 360688 / 18724 359834 / 18460 854 / 264 +74442 / +3536
    C6 / controlled RGB 285392 / 14924 360422 / 18708 359584 / 18460 838 / 248 +74192 / +3536
    STM32 / published Blink 16092 / 3248 26368 / 3488 26324 / 3472 44 / 16 +10232 / +224
    STM32 / controlled RGB 16092 / 3248 25536 / 3488 25496 / 3472 40 / 16 +9404 / +224
    Uno / published Blink 3784 / 131 5158 / 629 5130 / 443 28 / 186 +1346 / +312
    Uno / published Apa102 3178 / 187 3682 / 326 3642 / 324 40 / 2 +464 / +137
    Uno / controlled RGB 3784 / 131 3942 / 268 3914 / 266 28 / 2 +130 / +135
    Tiny / published Blink 3338 / 131 2640 / 163 2628 / 161 12 / 2 -710 / +30
    Tiny / controlled RGB 3338 / 131 2640 / 163 2628 / 161 12 / 2 -710 / +30
    ESP32 / published Blink 271250 / 23370 310880 / 26036 310428 / 25892 452 / 144 +39178 / +2522
    ESP32 / controlled RGB 271250 / 23370 296584 / 26028 296140 / 25884 444 / 144 +24890 / +2514
    S3 / published Blink 371515 / 75863 407716 / 78216 407068 / 78008 648 / 208 +35553 / +2145
    S3 / controlled RGB 371515 / 75863 407488 / 78216 406840 / 78008 648 / 208 +35325 / +2145
    Teensy 4.0 / published Blink 61440 / 32928 49152 / 28320 49152 / 28320 0 / 0 -12288 / -4608
    Teensy 4.0 / controlled RGB 61440 / 32928 49152 / 28320 49152 / 28320 0 / 0 -12288 / -4608

    Nine published rows retain cumulative savings of 2792 B flash /1006 B physical RAM versus their matched implementation starts. Teensy 4.0 adds zero new savings; its pre-existing 12288/4608 improvement versus3.10.3 is preserved and is excluded from the optimization sum. Historical gains must not be counted as new changes. Prior S3 16-byte frozen-to-matched bridge and ESP32 inherited84/48 bridge remain separate from the sum.

    Matched 3.10.3 published/control61440/32928; current published/control49152/28320. Current published image49152/attributedRAM22990; controlled attribution22806 despite equal rounded board totals. Historicalimage61440/attribution27709. Scoped JSON49152/22990 GREEN; retrospective historical RED12288image/4719attributedRAM. There is no Teensy40 size workflow to ratchet. Existing reusable build workflow now accepts an optional bloat_budget input; the Teensy40 caller supplies the JSON. It rebuilds Blink after the example sweep and enforces scoped ceilings without adding a workflow.

    Source old20667c3a64/current0c2e7841e2. fbuild2.5.37, Teensy framework1.160.0, ARM GCC11.3.1 package1.110301.0, CortexM7 600MHz, -Os/LTO/hardfloat/C++17, normal defaults. TEENSYDUINO metadata159 retained. Same cached stagedproject; archived historicalsource, generated-TU fingerprints, exact GPIO3 red/black1000ms control, finallyrestore published checked separately.

    Default ELF includes SlimBridgeController→ChannelManager→ChannelEngineObjectFLED→ObjectFLEDPeripheralReal. Actual SDK compile/link validates initialization/show integration; strict SlimBridge and ObjectFLED targets pass with halt-on-error UBSan. ObjectFLED host tests use production driver logic with mocked peripheral: no physical waveform claim. No native source edits, no feature removed. No fl::printf matches in Teensy platform. Invalid pins/bus/driver-disable/timeouts retain genuine warnings; optional FlexIO RX diagnostic dumps are outside default output.

    Manual scoped-budget review and actual bloat gate pass; no mirrored constant test, relaxed ceiling or new workflow. Local sequential builds/tests, no worktrees or CI Full; cache retained. Artifacts .build/memory-4737/teensy40/.

    After Teensy40 closes, eight platform children complete; next Teensy41 #4746, then RP2040 #4747. Parent #4737 stays OPEN.

  10. zackees commented on Oct 7, 2026

    @zackees
    MemberAuthor

    Cumulative memory performance diff — Teensy 4.1 validation

    Teensy 4.1 #4746: PR #4756, landed SHA 893216fb2ce2cb7d370a401069319636da0b92ac. Candidate and landed trees match. Fresh landed local Blink rebuild and scoped budget PASS; independently measured text+data is 50176 B. No hosted checks/reviews were present; local five-file review, lint and focused Python tests passed.

    Board flash / physical RAM bytes:

    platform / workload 3.10.3 starting master current landed cumulative saved flash / RAM remaining gap
    C3 / published Blink 342592 / 63512 403384 / 68572 402670 / 68388 714 / 184 +60078 / +4876
    C3 / controlled RGB 342592 / 63512 384512 / 65500 383802 / 65316 710 / 184 +41210 / +1804
    C6 / published Blink 285392 / 14924 360688 / 18724 359834 / 18460 854 / 264 +74442 / +3536
    C6 / controlled RGB 285392 / 14924 360422 / 18708 359584 / 18460 838 / 248 +74192 / +3536
    STM32 / published Blink 16092 / 3248 26368 / 3488 26324 / 3472 44 / 16 +10232 / +224
    STM32 / controlled RGB 16092 / 3248 25536 / 3488 25496 / 3472 40 / 16 +9404 / +224
    Uno / published Blink 3784 / 131 5158 / 629 5130 / 443 28 / 186 +1346 / +312
    Uno / published Apa102 3178 / 187 3682 / 326 3642 / 324 40 / 2 +464 / +137
    Uno / controlled RGB 3784 / 131 3942 / 268 3914 / 266 28 / 2 +130 / +135
    Tiny / published Blink 3338 / 131 2640 / 163 2628 / 161 12 / 2 -710 / +30
    Tiny / controlled RGB 3338 / 131 2640 / 163 2628 / 161 12 / 2 -710 / +30
    ESP32 / published Blink 271250 / 23370 310880 / 26036 310428 / 25892 452 / 144 +39178 / +2522
    ESP32 / controlled RGB 271250 / 23370 296584 / 26028 296140 / 25884 444 / 144 +24890 / +2514
    S3 / published Blink 371515 / 75863 407716 / 78216 407068 / 78008 648 / 208 +35553 / +2145
    S3 / controlled RGB 371515 / 75863 407488 / 78216 406840 / 78008 648 / 208 +35325 / +2145
    Teensy 4.0 / published Blink 61440 / 32928 49152 / 28320 49152 / 28320 0 / 0 -12288 / -4608
    Teensy 4.0 / controlled RGB 61440 / 32928 49152 / 28320 49152 / 28320 0 / 0 -12288 / -4608
    Teensy 4.1 / published Blink 62464 / 32992 50176 / 28384 50176 / 28384 0 / 0 -12288 / -4608
    Teensy 4.1 / controlled RGB 62464 / 32992 50176 / 28384 50176 / 28384 0 / 0 -12288 / -4608

    Ten published rows retain cumulative savings of 2792 B flash / 1006 B physical RAM versus matched implementation starts. Teensy 4.1 adds zero new savings; its historical 12288/4608 improvement versus 3.10.3 is preserved and excluded from this sum. Previous S3 frozen-to-matched 16-byte and ESP32 inherited 84/48 bridges remain separate. Original three-version matrix remains in the parent body.

    Matched measurements

    workload 3.10.3 current master preserved gain
    published Blink 62464 / 32992 50176 / 28384 12288 / 4608
    controlled RGB 62464 / 32992 50176 / 28384 12288 / 4608

    Board flash / physical RAM bytes. Current matches the original meta master reference 50176/28384; new savings since that reference are zero. No historical gain is counted as a new source optimization.

    3.10.3 20667c3a6413ed46a828f78ec95fb57e58d753f8, current master 8647a12f10825567c068223d20f2abbbdb68ffab. fbuild 2.5.37, Teensy framework 1.160.0, ARM GCC 11.3.1 package 1.110301.0, Cortex-M7 600MHz, normal -Os/LTO/hard-float/C++17 flags. Historical source compatibility stub ::delay(0), current normal stub. No slim opt-in.

    Current published image 50176/attributedRAM 23279; control attribution 23095 despite identical rounded board totals. Historical image 62464/attributedRAM 28028. Retrospective historical budget RED 12288 image/4749 attributedRAM; current restored published budget GREEN. This protects preserved gains; no new native implementation or pre-code RED claim.

    Apa102 local SDK build succeeds: board 49152/28448, image 49152/attributedRAM 23176. Existing workflow metric independently reports Blink text+data 50176 and Apa102 49152, so both lowered ceilings use their actual metric. Blink is restored before its final budget check.

    Validation

    • Local sequential source builds and fbuild bloat for every version/workload; same cached project, generated-TU fingerprints, archived historical source and finally restoration. Exact GPIO 3 one-NEOPIXEL red/black 1000ms controlled sketch without Serial; normal published Blink measured separately after restoration.
    • Exact reusable-workflow gate bash bloat teensy41 --example Blink --build --budget tests/data/teensy41_bloat_budget.json passes locally. Existing workflow rebuilds Blink after its example sweep, so the budget cannot silently analyze another sketch's ELF.
    • Full lint, selected Python bloat-budget/size-threshold tests, ci-labels check, five-file manual review and git diff --check pass. No native source/test differences since previous Teensy strict SlimBridge/ObjectFLED target passes, whose shared production logic evidence is reused. Fresh Teensy 4.1 SDK builds cover actual board initialization/show integration; physical waveforms were not measured.
    • Shared Teensy platform audit: no fl::printf matches; genuine invalid-pin/bus/disabled-driver/timeout warnings retained. RMT/PARLIO are not this board's default backend. No speculative source edit is required when preservation budgets pass.
    • No feature removed, ceiling raised, worktree or CI Full. Toolchain/dependency/test caches retained. Artifacts .build/memory-4737/teensy41/.

    Nine platform children complete after this closure. RP2040 #4747 is next. Parent #4737 remains OPEN.

  11. zackees commented on Oct 7, 2026

    @zackees
    MemberAuthor

    Cumulative memory performance diff — RP2040

    PR4757 is merged. Candidate and landed trees match; fresh landed local build and scoped budget PASS. Current-head ordinary checks passed and CodeRabbit approved after its single documentation finding was fixed.

    PR #4757, landed 41a6c284fcbbc8c6cb0a379bd994b98d017f78d1. Default RP2040 saves 76 B allocated image flash /38416 B physical RAM in both published Blink and controlled RGB, without dropping RX or SPI routing features.

    Previous ten-row board flash/physical RAM scorecard remains below; RP2040 uses allocated image flash because its raw GNU size counter includes reserved heap/stack.

    platform / workload 3.10.3 starting master current landed cumulative saved flash / RAM remaining gap
    C3 / published Blink 342592 / 63512 403384 / 68572 402670 / 68388 714 / 184 +60078 / +4876
    C3 / controlled RGB 342592 / 63512 384512 / 65500 383802 / 65316 710 / 184 +41210 / +1804
    C6 / published Blink 285392 / 14924 360688 / 18724 359834 / 18460 854 / 264 +74442 / +3536
    C6 / controlled RGB 285392 / 14924 360422 / 18708 359584 / 18460 838 / 248 +74192 / +3536
    STM32 / published Blink 16092 / 3248 26368 / 3488 26324 / 3472 44 / 16 +10232 / +224
    STM32 / controlled RGB 16092 / 3248 25536 / 3488 25496 / 3472 40 / 16 +9404 / +224
    Uno / published Blink 3784 / 131 5158 / 629 5130 / 443 28 / 186 +1346 / +312
    Uno / published Apa102 3178 / 187 3682 / 326 3642 / 324 40 / 2 +464 / +137
    Uno / controlled RGB 3784 / 131 3942 / 268 3914 / 266 28 / 2 +130 / +135
    Tiny / published Blink 3338 / 131 2640 / 163 2628 / 161 12 / 2 -710 / +30
    Tiny / controlled RGB 3338 / 131 2640 / 163 2628 / 161 12 / 2 -710 / +30
    ESP32 / published Blink 271250 / 23370 310880 / 26036 310428 / 25892 452 / 144 +39178 / +2522
    ESP32 / controlled RGB 271250 / 23370 296584 / 26028 296140 / 25884 444 / 144 +24890 / +2514
    S3 / published Blink 371515 / 75863 407716 / 78216 407068 / 78008 648 / 208 +35553 / +2145
    S3 / controlled RGB 371515 / 75863 407488 / 78216 406840 / 78008 648 / 208 +35325 / +2145
    Teensy 4.0 / published Blink 61440 / 32928 49152 / 28320 49152 / 28320 0 / 0 -12288 / -4608
    Teensy 4.0 / controlled RGB 61440 / 32928 49152 / 28320 49152 / 28320 0 / 0 -12288 / -4608
    Teensy 4.1 / published Blink 62464 / 32992 50176 / 28384 50176 / 28384 0 / 0 -12288 / -4608
    Teensy 4.1 / controlled RGB 62464 / 32992 50176 / 28384 50176 / 28384 0 / 0 -12288 / -4608

    RP2040 corrected image / physical RAM

    workload recovered3.10.3 starting master893216fb2c landed saved remaining gap
    published Blink 123012 /19656 135820 /59980 135744 /21564 76 /38416 +12732 /+1908
    controlled RGB 123012 /19656 135572 /59980 135496 /21564 76 /38416 +12484 /+1908

    Eleven published rows save 2868 B flash /39422 B physical RAM versus matched implementation anchors. RP2040 contributes actual allocated image savings; other rows retain their board flash metric. This is a sum across separate targets, not one device. Preserved Teensy historical gains remain excluded; RP2040 inherited56image/16RAM versus fresh original-meta image135876/RAM59996 is likewise excluded.

    Recovered three-version RP2040 record

    revision/workload allocated image physical RAM raw GNU/fbuild flash counter
    3.10.3 published/control 123012 19656 376548
    3.10.6 published 143784 60272 357808
    original meta published 135876 59996 350176
    landed published 135744 21564 388476

    The original frozen matrix remains historical raw-tool evidence. Original meta raw350176 differs48 from frozen350128; keep this frozen-to-matched difference separate from savings. 3.10.3 requires the SDK’s three SdFat defines identically applied to both revisions; current results are unchanged by them. Released source was not patched.

    RP2040 flash counter correction

    Current allocated-image bytes135744 + .heap SHT_NOBITS250684 + .stack_dummy SHT_NOBITS2048 = GNU text+data388476. The read-only .heap reservation grows by38416 when BSS is removed; it is not programmed flash. Previous routing-image135788 plus heap212268 plusstack2048 = reported350104. Source optimization saves44programmedbytes and38416physicalRAM; it does not add38372programmedbytes. Original currentmaster reported350136/59980,image135820; full candidate reported388476/21564,image135744; total actualsavings76image/38416physicalRAM. ExplicitSDKRX report proves Singletonstaticstorage38416 plus4pointer and RpPioRxDevice::begin888; noheapallocation orcapacityreduction.

    .boot2: type=SHT_PROGBITS size=256 address=0x10000000 flags=0x6
    .ota: type=SHT_PROGBITS size=10228 address=0x10000100 flags=0x3
    .partition: type=SHT_PROGBITS size=1804 address=0x100028f4 flags=0x3
    .text: type=SHT_PROGBITS size=110132 address=0x10003000 flags=0x6
    .rodata: type=SHT_PROGBITS size=9352 address=0x1001de38 flags=0x2
    .ram_vector_table: type=SHT_NOBITS size=192 address=0x20000000 flags=0x3
    .data: type=SHT_PROGBITS size=3972 address=0x200000c0 flags=0x6
    .bss: type=SHT_NOBITS size=7292 address=0x20001048 flags=0x3
    .heap: type=SHT_NOBITS size=250684 address=0x20002cc4 flags=0x2
    .stack1_dummy: type=SHT_NOBITS size=2048 address=0x20040000 flags=0x3
    .stack_dummy: type=SHT_NOBITS size=2048 address=0x20041000 flags=0x2

    Native SPI canHandle shrinks164→148bytes and two7-byte tables disappear; RX global pool38416 and40-byte constructor plus4-byte init entry disappear from TX-only default. Explicit SDK RX retains full38416-byte aligned static storage and4-byte singleton pointer; same resource claim/capacity/DMA lifecycle, noheap. Local affectedRP2350 SDK build+bloat passes. Strict native417/417unit/examplejobs, lint, Pythonbudgetchecks, six-file review and scoped local gate pass. Physical hardware waveforms were not measured.

    Source pins old20667c3a64/3106ebf8c2823/originalmeta0c2e9f7300; fbuild2.5.37, Arduino-Pico5.7.0, ARM GCC14.2.0, Cortex-M0+133MHz, normal-Os/C++17. Samecache stagedarchives, generated-TU fingerprints andfinallyrestore verify ELFs. Nofl::printf inRPplatform; genuinefailurewarningsremain; RMT/PARLIO notRPbackend. Nofeaturesremoved/worktrees/CI Full/newworkflow/raisedceilings. Existing build_rp2040 caller now enforces JSON135744image/8697attribRAM after rebuildingBlink.

    All ten children complete after closure; final eleven-row matrix/acceptance audit still follows. Parent stays OPEN.

  12. zackees commented on Oct 7, 2026

    @zackees
    MemberAuthor

    Final sequential local matrix

    Implementation SHA: 41a6c284fcbbc8c6cb0a379bd994b98d017f78d1. All eleven local build/bloat budget checks passed. Every row verifies all 2,394 tracked staged source files and the actual staged sketch against this commit. Same source digest across all rows. No worktrees or CI Full; build and SDK caches retained.

    Three-version published-example scorecard

    Bytes are board flash / physical RAM, except RP2040 uses allocated image / physical RAM. Release columns below preserve the original frozen three-version measurements; they are not relabeled as fresh matched optimization anchors. Those anchors and controlled-workload differences are in the cumulative diff below.

    board / example frozen 3.10.3 frozen 3.10.6 final master image flash / attributed RAM budget
    esp32c3 / Blink 342600 / 63512 433834 / 70332 402670 / 68388 384692 / 25473
    esp32c6 / Blink 285400 / 14924 379686 / 20316 359834 / 18460 402674 / 29752
    stm32f103c8 / Blink 16092 / 3248 26600 / 3672 26324 / 3472 26324 / 1924
    uno / Blink 3784 / 131 5166 / 633 5130 / 443 5130 / 438
    uno / Apa102 3178 / 187 4510 / 505 3642 / 324 3642 / 290
    attiny85 / Blink 3338 / 131 3132 / 237 2628 / 161 2628 / 189
    esp32dev / Blink 271250 / 23370 311160 / 26532 310428 / 25892 313231 / 34489
    esp32s3 / Blink 371515 / 75863 436540 / 80008 407068 / 78008 366603 / 38323
    teensy40 / Blink 61440 / 32928 79872 / 69792 49152 / 28320 49152 / 22990
    teensy41 / Blink 62464 / 32992 80896 / 69792 50176 / 28384 50176 / 23279
    rp2040 / Blink 123012 / 19656 (recovered image) 143784 / 60272 (image) 135744 / 21564 135744 / 8697

    RP2040 raw final GNU/fbuild flash is 388476, including read-only NOBITS heap/stack reservations; it is not programmed flash. Recovered 3.10.3 uses framework-required SdFat flags identically checked on master, without modifying released library source. The original frozen failure/raw table remains historical evidence.

    Release source pins: 3.10.3 20667c3a6413ed46a828f78ec95fb57e58d753f8; 3.10.6 ebf8c2823c486158a046d8e1e682d3143580ae4e; original meta master 0c2e9f730007e52758d4abc2b9ba356fb581d923.

    Commands: bash bloat <board> --example <example> --build --budget tests/data/<fixture>_bloat_budget.json --no-summary. Normal default board flags, no caller size opt-in. Each saved row contains its report, build log, and per-example fbuild metadata with SDK/compiler aliases and flags. Physical RAM and attributed RAM are separate metrics.

    Matched cumulative savings and remaining gaps

    Cumulative memory performance diff — RP2040

    PR4757 is merged. Candidate and landed trees match; fresh landed local build and scoped budget PASS. Current-head ordinary checks passed and CodeRabbit approved after its single documentation finding was fixed.

    PR #4757, landed 41a6c284fcbbc8c6cb0a379bd994b98d017f78d1. Default RP2040 saves 76 B allocated image flash /38416 B physical RAM in both published Blink and controlled RGB, without dropping RX or SPI routing features.

    Previous ten-row board flash/physical RAM scorecard remains below; RP2040 uses allocated image flash because its raw GNU size counter includes reserved heap/stack.

    platform / workload 3.10.3 starting master current landed cumulative saved flash / RAM remaining gap
    C3 / published Blink 342592 / 63512 403384 / 68572 402670 / 68388 714 / 184 +60078 / +4876
    C3 / controlled RGB 342592 / 63512 384512 / 65500 383802 / 65316 710 / 184 +41210 / +1804
    C6 / published Blink 285392 / 14924 360688 / 18724 359834 / 18460 854 / 264 +74442 / +3536
    C6 / controlled RGB 285392 / 14924 360422 / 18708 359584 / 18460 838 / 248 +74192 / +3536
    STM32 / published Blink 16092 / 3248 26368 / 3488 26324 / 3472 44 / 16 +10232 / +224
    STM32 / controlled RGB 16092 / 3248 25536 / 3488 25496 / 3472 40 / 16 +9404 / +224
    Uno / published Blink 3784 / 131 5158 / 629 5130 / 443 28 / 186 +1346 / +312
    Uno / published Apa102 3178 / 187 3682 / 326 3642 / 324 40 / 2 +464 / +137
    Uno / controlled RGB 3784 / 131 3942 / 268 3914 / 266 28 / 2 +130 / +135
    Tiny / published Blink 3338 / 131 2640 / 163 2628 / 161 12 / 2 -710 / +30
    Tiny / controlled RGB 3338 / 131 2640 / 163 2628 / 161 12 / 2 -710 / +30
    ESP32 / published Blink 271250 / 23370 310880 / 26036 310428 / 25892 452 / 144 +39178 / +2522
    ESP32 / controlled RGB 271250 / 23370 296584 / 26028 296140 / 25884 444 / 144 +24890 / +2514
    S3 / published Blink 371515 / 75863 407716 / 78216 407068 / 78008 648 / 208 +35553 / +2145
    S3 / controlled RGB 371515 / 75863 407488 / 78216 406840 / 78008 648 / 208 +35325 / +2145
    Teensy 4.0 / published Blink 61440 / 32928 49152 / 28320 49152 / 28320 0 / 0 -12288 / -4608
    Teensy 4.0 / controlled RGB 61440 / 32928 49152 / 28320 49152 / 28320 0 / 0 -12288 / -4608
    Teensy 4.1 / published Blink 62464 / 32992 50176 / 28384 50176 / 28384 0 / 0 -12288 / -4608
    Teensy 4.1 / controlled RGB 62464 / 32992 50176 / 28384 50176 / 28384 0 / 0 -12288 / -4608

    RP2040 corrected image / physical RAM

    workload recovered3.10.3 starting master893216fb2c landed saved remaining gap
    published Blink 123012 /19656 135820 /59980 135744 /21564 76 /38416 +12732 /+1908
    controlled RGB 123012 /19656 135572 /59980 135496 /21564 76 /38416 +12484 /+1908

    Eleven published rows save 2868 B flash /39422 B physical RAM versus matched implementation anchors. RP2040 contributes actual allocated image savings; other rows retain their board flash metric. This is a sum across separate targets, not one device. Preserved Teensy historical gains remain excluded; RP2040 inherited56image/16RAM versus fresh original-meta image135876/RAM59996 is likewise excluded.

    Recovered three-version RP2040 record

    revision/workload allocated image physical RAM raw GNU/fbuild flash counter
    3.10.3 published/control 123012 19656 376548
    3.10.6 published 143784 60272 357808
    original meta published 135876 59996 350176
    landed published 135744 21564 388476

    The original frozen matrix remains historical raw-tool evidence. Original meta raw350176 differs48 from frozen350128; keep this frozen-to-matched difference separate from savings. 3.10.3 requires the SDK’s three SdFat defines identically applied to both revisions; current results are unchanged by them. Released source was not patched.

    RP2040 flash counter correction

    Current allocated-image bytes135744 + .heap SHT_NOBITS250684 + .stack_dummy SHT_NOBITS2048 = GNU text+data388476. The read-only .heap reservation grows by38416 when BSS is removed; it is not programmed flash. Previous routing-image135788 plus heap212268 plusstack2048 = reported350104. Source optimization saves44programmedbytes and38416physicalRAM; it does not add38372programmedbytes. Original currentmaster reported350136/59980,image135820; full candidate reported388476/21564,image135744; total actualsavings76image/38416physicalRAM. ExplicitSDKRX report proves Singletonstaticstorage38416 plus4pointer and RpPioRxDevice::begin888; noheapallocation orcapacityreduction.

    .boot2: type=SHT_PROGBITS size=256 address=0x10000000 flags=0x6
    .ota: type=SHT_PROGBITS size=10228 address=0x10000100 flags=0x3
    .partition: type=SHT_PROGBITS size=1804 address=0x100028f4 flags=0x3
    .text: type=SHT_PROGBITS size=110132 address=0x10003000 flags=0x6
    .rodata: type=SHT_PROGBITS size=9352 address=0x1001de38 flags=0x2
    .ram_vector_table: type=SHT_NOBITS size=192 address=0x20000000 flags=0x3
    .data: type=SHT_PROGBITS size=3972 address=0x200000c0 flags=0x6
    .bss: type=SHT_NOBITS size=7292 address=0x20001048 flags=0x3
    .heap: type=SHT_NOBITS size=250684 address=0x20002cc4 flags=0x2
    .stack1_dummy: type=SHT_NOBITS size=2048 address=0x20040000 flags=0x3
    .stack_dummy: type=SHT_NOBITS size=2048 address=0x20041000 flags=0x2

    Native SPI canHandle shrinks164→148bytes and two7-byte tables disappear; RX global pool38416 and40-byte constructor plus4-byte init entry disappear from TX-only default. Explicit SDK RX retains full38416-byte aligned static storage and4-byte singleton pointer; same resource claim/capacity/DMA lifecycle, noheap. Local affectedRP2350 SDK build+bloat passes. Strict native417/417unit/examplejobs, lint, Pythonbudgetchecks, six-file review and scoped local gate pass. Physical hardware waveforms were not measured.

    Source pins old20667c3a64/3106ebf8c2823/originalmeta0c2e9f7300; fbuild2.5.37, Arduino-Pico5.7.0, ARM GCC14.2.0, Cortex-M0+133MHz, normal-Os/C++17. Samecache stagedarchives, generated-TU fingerprints andfinallyrestore verify ELFs. Nofl::printf inRPplatform; genuinefailurewarningsremain; RMT/PARLIO notRPbackend. Nofeaturesremoved/worktrees/CI Full/newworkflow/raisedceilings. Existing build_rp2040 caller now enforces JSON135744image/8697attribRAM after rebuildingBlink.

    All ten children are closed and the final eleven-row matrix has now passed. Parent stays OPEN; final documentation/acceptance reconciliation follows.

    Logging and behavior limits

    No fl::printf calls remain in the ESP32, RP, or Teensy4 platform trees at this SHA. RMT5 diagnostics use FL_LOG_RMT and PARLIO category logging is retained. Failure warnings and some legacy RMT4/Teensy RX diagnostics still use FL_WARN; no claim of repository-wide warning conversion is made. Focused host/SDK/QEMU checks cover changed accounting, ownership, routing, encoding, serial/white-channel/power behavior; they do not prove physical hardware waveforms. SPI SDK initialization timed out on both original and candidate in QEMU; direct ownership accounting passed.

  13. zackees commented on Oct 7, 2026

    @zackees
    MemberAuthor

    Final acceptance audit

    The eleven-row local default build/bloat matrix at 41a6c284fcbbc8c6cb0a379bd994b98d017f78d1 passed. Final three-version scorecard, matched published/control savings and remaining gaps. This parent stays OPEN.

    Requirement Inspected evidence
    Per-platform 3.10.3/master fbuild bloat All eleven archived 3.10.3 report JSONs inspected; corresponding platform ledgers/build provenance in children #4738–#4747. RP2040 SDK flag recovery is separate from its original failed cell. All eleven final master reports inspected.
    Matched source, flags, framework and valid ELF Platform reports pin release/start/candidate/landed SHAs and SDK flags. Final matrix verifies 2,394 staged tracked source files plus staged sketch per row, with identical source digest; per-example build metadata archived. Frozen-to-matched differences remain separate.
    RED to GREEN and enforceable budgets Platform children record failing original budgets and passing candidate/landed checks. Final eleven scoped image/attributed-RAM budgets all pass at their exact ratcheted ceilings. C6 additionally guards encoding storage at compile time. No threshold raised.
    Seven reduction children C3 #4739, C6 #4740, STM #4744, Uno #4742, Tiny #4743, ESP #4738, S3 #4741 all CLOSED, checklists complete, PRs #4748–#4754 MERGED. Each originally regressed published row has measured default RAM reductions; each positive-flash row has flash reductions.
    Three preservation children Teensy40 #4745, Teensy41 #4746, RP2040 #4747 CLOSED, checklists complete, PRs #4755–#4757 MERGED. Teensy original gains preserved; RP2040 additionally saves76 allocated-image bytes and38416 physical-RAM bytes with explicit RX retained.
    Controlled RGB savings Matched controlled results published for all ten platforms, including C6's distinct published/control anchors. No example-only saving or caller size opt-in substitutes for library reductions. Uno Serial banner remains supported.
    Behavior and supported features Changed production storage/accounting/routing reviewed; strict native final417/417 unit/example jobs pass. Focused encoder, RGB/RGBW/RGBWW, adjustment, power, RX/resource, RMT accounting, HTTP lifecycle and SPI ownership tests/SDK probes are recorded in children/PRs. Explicit RP RX SDK probe retains full aligned38416-byte pool; all1024 routing combinations pass. No feature removed. Hardware waveform validation is not claimed; SPI SDK initialization QEMU timeout occurs in both versions, with direct ownership accounting passing.
    Requested logging/driver targets RMT5 record/pool packing and shared count storage reduced; C6 default PARLIO encoder variants share storage without dropping modes. Routine audited RMT5/PARLIO diagnostics use category logs. Current ESP32/RP/Teensy4 platform trees contain no fl::printf calls. Some legacy FL_WARN diagnostics remain; no blanket conversion claim.
    Sequential local execution and cache reuse Implementations/builds performed one at a time in this checkout; final eleven-row runner is sequential. Existing fbuild/SDK/test caches retained, focused rebuilds used for proven stale outputs. No git worktrees, CI Full, platform workflow dispatch or new workflow files.
    Closure-time cumulative perf All ten native child relationships verified in both directions, and all ten parent perf comments verified: 6032963567,6033440937,6033821040,6035037581,6036277742,6039705248,6040069697,6040499428,6040688753,6041321915.
    Quantified progress and remaining gaps Final scorecard reports2868 B per-target flash savings and39422 B physical RAM across eleven published rows, excluding inherited Teensy gains and frozen baseline bridges. RP uses allocated image flash; other rows retain board flash. Remaining3.10.3 gaps are explicit; parity is not claimed.

    Documentation reconciliation landed in PR #4758, with no production source changes. The implementation acceptance evidence and documentation reconciliation are complete. PR #4758 merged at 79c6cdf9a977e2065986a4800e7253683c1501fd; only agents/tasks/todo.md differs from the validated implementation tree. The parent must remain OPEN even after this bookkeeping is complete.

  14. zackees commented on Oct 7, 2026

    @zackees
    MemberAuthor

    Blink Serial correction — Uno

    Maintainer correction: Blink should not initialize Serial or print setup banners. PR #4759 removes those calls on every platform, retaining LED setup and the blink loop. Landed at a439902ac6af64e600031c01b5c2ac0df2e690bc; candidate and landed trees match.

    Fresh landed local Uno build and bloat budget pass: 3922 B flash /266 B physical RAM, attributed RAM260. Before removal:5130/443, attributed438. This removes 1208 B flash /177 B physical RAM; Serial and HardwareSerial symbols are absent. Existing Uno Blink budget ratcheted to3922 image/260 attributed RAM. Lint and manual three-file review passed.

    Compared with matched3.10.3 Blink3784/131, remaining published Uno gap is now +138 B flash /+135 B RAM. This is an example correction, separate from prior behavior-preserving library optimization savings. Controlled-workload measurements remain separate; other boards have not been remeasured for this example change. The prior eleven-row scorecard remains historical evidence for its pinned SHA, not a claim about the new sketch. Parent stays OPEN; no worktrees or CI Full.

  15. zackees commented on Oct 7, 2026

    @zackees
    MemberAuthor

    Superseded by #4760 at the maintainer’s request so the investigation can restart with equivalent Blink sketches without Serial initialization or prints across all versions. The old published tables mix example overhead with library differences and remain historical evidence. Prior fixes stay landed; ten fresh native platform children are attached to #4760. No new builds or optimization work were started as part of this tracker replacement.

  16. zorathvael commented on Oct 8, 2026

    @zorathvael
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions