Skip to content

ESP8266 native FastPin definitions bypass forced software pin selection #5068

Closed

Description

@zackees

Parent: #5024. Related forced-selection precedent: #5067 (ESP32).

FASTLED_FORCE_SOFTWARE_PINS chooses the primary FastPin<PIN> : detail::ForcedSoftwarePin<PIN> in src/fl/system/fastpin_base.h. The selected platform route below still defines explicit native specializations, which override that primary. Safe fallback methods from #5056 cannot fix selection of a different type.

Source checkpoint: b6935e7b1311ce182a71138c6ee6ca479b188bc2.

  • Conditional route: ESP8266 defined; selected pin-order branch.
  • Dispatch chain: platforms/fastpin.h ESP8266 branch→this header; platforms.h→fastled_esp8266.h alsoincludesit. ALL RAW/D1/NodeMCU _FL_DEFPIN invocations lack FORCE exclusion.
  • Source SHA-256: d58171a2dd3cc2767d5d936c07fca119ceffd91f55df464e25267d8cd8a0488c.
  • src/platforms/esp/8266/fastpin_esp8266.h:68: #define _FL_DEFPIN(PIN, REAL_PIN) template<> class FastPin<PIN> : public _ESPPIN<REAL_PIN, (1<<(REAL_PIN & 0x0F))> {};
  • src/platforms/esp/8266/fastpin_esp8266.h:73: _FL_DEFPIN(0,0); _FL_DEFPIN(1,1); _FL_DEFPIN(2,2); _FL_DEFPIN(3,3);

An actual ESP8266 vendor build of an APA102 public producer with forced software pins, NO_PINMAP and software SPI fails only the selected-type assertion FORCED_FASTPIN_SELECTION_MUST_USE_PRIMARY_FALLBACK for GPIO4. This confirms the fallback is not selected. The same producer without that assertion is the separate compile control; no runtime or physical timing claim follows.

The generated audit records all query results, 103 inspected source paths, 35 definition sites, guards and include edges. Its source positives were independently reviewed. Local audit: .build/spi-force-selection-audit/report.json, SHA-256 ebb780d4d10fc2a0981f505e5c355dedb5636dfa9fe313b5650a6f96bf42407b. No filename/string-absence heuristic alone establishes this finding.

Required acceptance:

  • Exercise RAW, D1 and NodeMCU pin-order branches explicitly, including original GPIO4/16 where legal.
  • Use actual SDK selected-type and executed-route controls with force off/on, mapped and NO_PINMAP configurations. Include-only and real generic software-SPI producers must compile in the intended modes; independent MY9221 users must remain compatible where supported. A macro appearing in a producer or a successful native build is not forced-fallback evidence.
  • Preserve native defaults and applicable pin validity, logical mapping and user exclusions. Prove ordering, initialization LOW, single-bit/byte/bulk GPIO behavior and subsequent pin reuse on the actual selected implementation. Keep native store-count/timing optimization controls separate.
  • Restore the old unguarded-specialization defect and require the same type/route gate to fail for the intended reason. An unrelated compiler/setup failure is insufficient. Bind source, SDK/compiler/configuration, commands and actual artifacts in the managed gate.
  • Recheck actual fallback callees and code/data placement for timing-sensitive consumers. Native IRAM/SRAM receipts cannot certify a newly selected software fallback. No GPIO latency credit or physical-speed claim is authorized by this selection fix.

This issue is unresolved. Closing it must not close the related optimization issue or imply electrical/timing validation.

Activity

  1. added
    sanitized
    on Nov 5, 2026
  2. moved this from Triage to Done in FastLED Trackeron Nov 17, 2026
  3. added a commit that references this issue on Nov 17, 2026
    4290e8f
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

    sanitized

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions