Skip to content

chore(memory): preserve teensy40 default flash/RAM gains (#4737) #4745

Closed

Description

@zackees

Context

Platform sub-issue of #4737. Already improved versus both releases. Preserve the measured 49,152 B flash / 28,320 B RAM reference.

Source measurements, flash / RAM in bytes, fbuild 2.5.37, per-version source/examples and constant per-board build configuration. Reference SHAs: 3.10.3 20667c3a64, 3.10.6 ebf8c2823c, master 0c2e9f7300.

example 3.10.3 3.10.6 master reference
Blink 61440 / 32928 79872 / 69792 49152 / 28320

Execution workflow

Work one checklist item and one platform sub-issue at a time across the entire #4737 project, in the existing repository checkout without git worktrees. Use a feature branch in that checkout and reuse .build/fbuild/teensy40, toolchain/dependency caches and test caches. Run builds sequentially. Verify changed source/flags are reflected in the ELF; use the appropriate wrapper's --clean only when stale-output evidence requires it. Record each completed item's measurements, checks and commit/PR before moving on.

Checklist

  • Reproduce this platform's current starting measurements with recorded SHA, flags and framework versions, and verify cache validity.
  • Create matched symbol/link-map evidence using bash bloat teensy40; retain both the published example and controlled RGB-workload measurements where applicable.
  • Establish a regression budget for the existing gains and validate shared controller/channel/global-state changes from sibling issues.
  • Attribute any new growth with symbol/link-map diffs and recover it before closure.
  • Verify relevant Teensy LED output, timing and initialization behavior; do not require speculative platform edits when the budget remains satisfied.
  • Keep flash and RAM at or below the recorded master reference under the same configuration, or obtain an explicit maintainer-approved measured exception.
  • Add a focused size regression check. For any implementation, capture a failing budget/reproduction before coding (RED) and the passing result afterward (GREEN); run relevant tests, lint and code review.
  • Ratchet applicable existing flash budgets and enforce RAM budgets through existing checks, preserving normal feature behavior and avoiding relaxed ceilings.
  • Publish final before/after bytes, remaining gaps, source SHA, commands, flags, framework versions and landed commit/PR links; update meta(memory): reduce default flash/RAM usage across all measured platforms #4737's platform scorecard.

Decisions

  • This platform has no measured remaining growth in the reference matrix; its role is preserving gains and validating shared changes.
  • Scope is this platform; shared fixes must be measured on affected siblings and tracked in the parent.
  • Budget failures require a focused fix and RED-to-GREEN evidence; passing validation does not require an unrelated code change.

Activity

  1. zackees commented on Oct 7, 2026

    @zackees
    MemberAuthor

    Validation is published in PR #4755, candidate 58123b16a0. Checks/review are running; this child stays open until merge and fresh landed verification.

    Matched published Blink and controlled RGB both measure:

    • 3.10.3: 61440 B flash / 32928 B physical RAM.
    • Current master 0c2e7841e2: 49152 B / 28320 B, equal to the original meta reference.
    • Existing improvement preserved: 12288 B flash / 4608 B RAM. New savings in this validation child: zero.

    Per-version fbuild bloat, build metadata and exact workload sources are retained in .build/memory-4737/teensy40/. Same fbuild 2.5.37, Teensy framework 1.160.0, ARM GCC 11.3.1, 600 MHz, normal -Os/LTO flags. Historical source staged in the same cached project; current published source restored and measured separately.

    New scoped budget enforces image flash 49152 and attributed RAM 22990 with the existing bash bloat --budget check; restored default GREEN. Historical budget RED shows 12288 image /4719 attributed RAM above these ceilings. Attributed RAM is distinct from physical RAM; controlled attribution is 22806 despite equal rounded board totals.

    Strict debug SlimBridge and ObjectFLED targets pass. Actual Teensy SDK build links the default production initialization/show path; ObjectFLED host tests use production logic with a mocked peripheral. No physical waveform claim. No fl::printf matches in Teensy platform code; genuine invalid-pin/bus, disabled-driver and timeout warnings retained. No native source or workflow changes, no features removed or ceilings raised.

    Manual budget review and actual bloat check pass. No existing Teensy 4.0 size workflow to ratchet; none added. Builds/tests local and sequential, caches retained, no worktrees or CI Full. Parent cumulative diff is prepared for posting after landing; #4737 remains open. Next Teensy 4.1 and RP2040, one at a time.

  2. zackees commented on Oct 7, 2026

    @zackees
    MemberAuthor

    Landed PR #4755 at 8647a12f10825567c068223d20f2abbbdb68ffab. Candidate and landed trees match. Fresh local landed rebuild and scoped budget pass: image 49152 B / attributed RAM 22990 B, physical board totals 49152 / 28320.

    Matched 3.10.3 published/control:61440 /32928; current published/control:49152 /28320. The original meta master reference is preserved. Existing improvement versus 3.10.3 remains 12288 B flash /4608 B RAM; no new optimization saving is claimed for this validation child.

    The review finding is fixed: the existing Teensy build workflow supplies the budget to an optional reusable-workflow input, and the gate rebuilds Blink after the example sweep. The exact command passed locally; YAML validation and ci-labels checks pass. No new workflow, native behavior change or raised ceiling. All ordinary PR checks and follow-up review are green; strict SlimBridge/ObjectFLED host logic tests pass. Physical timing was not measured.

    The parent cumulative diff adds Teensy 4.0's validated row, retaining 2792 B flash /1006 B physical RAM new savings across nine published rows. Complete baseline/bloat/toolchain/source evidence is in the PR and earlier progress comment. Builds/tests were local and sequential, caches retained, no worktrees or CI Full.

    Closing this validated child. Parent #4737 remains OPEN. Next: Teensy 4.1 #4746, then RP2040 #4747.

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