Skip to content

slim bridge: decide Direct DriverTraits policy; convert AVR/ATtiny #4590

Closed as not planned

Description

@zackees

Open decision: do bit-bang platforms move onto the template with a manager-free Direct DriverTraits, or are they exempted? The requirement is zero flash increase.

Measure a same-SHA bash bloat on uno and an ATtiny board. Files:

  • src/platforms/avr/clockless_avr.h
  • src/platforms/avr/attiny/clockless_blocking.h
  • src/platforms/avr/attiny/clockless_blocking_controller.h

Part of #4580. Follow the slim bridge format, the gap register (A1-A12) and the testing plan (T0-T4) there. Acceptance: the T1 conformance suite passes, a same-SHA bash bloat before/after is recorded, and AutoResearch evidence is included where hardware is available.

Activity

  1. zackees commented on Sep 25, 2026

    @zackees
    MemberAuthor

    Decision: exempt pure bit-bang/direct controllers; convert only channel-backed ones

    Measured: same toolchain, Blink, bash bloat <board> --build, 2026-09-24.

    Board Flash Channel code linked (ChannelManager, fl::Channel, ChannelEvents, ChannelData, IChannelDriver)
    uno (AVR) 4,750 B none
    teensy41 58,136 B none; the legacy path is the direct ObjectFLED proxy (46 KB of ObjectFLED code)
    rp2040 90,185 B none; the legacy path is direct PIO (38.8 KB)

    The slim bridge saves flash by removing fl::Channel from the legacy path, and these platforms never linked it. For them:

    • Bridged DriverTraits would add ChannelManager and the channel stack (a flash increase);
    • Direct DriverTraits would be a no-gain refactor of timing-critical bit-bang code, and most of those boards have no hardware in the loop.

    Rule: a platform converts if and only if its legacy controller already uses the channel pattern: an fl::Channel subclass, or it owns a ChannelData and a channel driver.

    This issue is exempt as well.

    Revisit only if one of these platforms' legacy controller starts using a channel driver.

  2. zackees commented on Sep 25, 2026

    @zackees
    MemberAuthor

    Exempt per the decision recorded in #4590: this platform's legacy clockless path links no channel code, so the slim bridge has nothing to remove, and bridging would add ChannelManager. Reopen if its legacy controller adopts a channel driver.

  3. zackees commented on Sep 25, 2026

    @zackees
    MemberAuthor

    Correction: Teensy 4.x and RP2040/2350 have channel engines (ObjectFLED/FlexIO/LPUART; PIO/UART/SPI) that their legacy clockless controllers bypass, so the blanket exemption doesn't fit them. Follow-up #4599 measures whether to bridge their legacy controllers onto those engines.

  4. zackees commented on Sep 25, 2026

    @zackees
    MemberAuthor

    Reopened under follow-up meta #4601. The exemption in #4590 is being re-evaluated per platform by measurement rather than applied as a blanket rule.

  5. moved this from Done to Triage in FastLED Trackeron Sep 25, 2026
  6. zackees commented on Sep 25, 2026

    @zackees
    MemberAuthor

    Measured on origin/master e61aae4f0d, Blink, bash bloat <board> --build.

    AVR/ATtiny: there is no channel driver (FASTLED_HAS_CHANNELS 0, and no IChannelDriver or BusTraits under src/platforms/avr). The legacy files do not reference channel types.

    Board Flash RAM Channel symbols
    uno 4,750 B 628 B none
    attiny85 3,190 B 449 B none

    Policy (Direct DriverTraits): a platform moves to fl::SlimBridgeController only when it has a channel engine to bridge onto (Bridged), and only if that is flash-neutral or better with feature parity. A pure bit-bang or direct controller does not get a "Direct" traits reshuffle. That would re-home the same cycle-counted code without saving flash, with a real regression risk and no hardware validation. So no Direct DriverTraits is added, and AVR/ATtiny stays as-is.

    Per-platform outcomes (all closed as not planned, with evidence in each comment):

    The Bridged candidates that remain are Teensy 4.x and RP2040/2350, tracked in #4599/#4588/#4589.

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