Skip to content

Legacy LPC11xx native FastPin definitions bypass forced software pin selection #5074

Closed

Description

@zackees

Parent: #5024. Related native optimization child: #5043. Its GPIO store/race/timing acceptance remains unchanged; this functional selection defect is a separate prerequisite and cannot close that optimization task.

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: FL_IS_ARM_LPC_11_LEGACY and not845/804/11_USB/15.
  • Dispatch chain: platforms.h FL_IS_ARM_LPC→fastled_arm_lpc.h→fastpin_arm_lpc.h28..31→legacyheader; nativeDEFPIN158..159unexcluded.
  • Source SHA-256: 6ae18a56483e5cf2b796a7edfe3e681710991b90d95ad7400fdd90587b0a60a9.
  • src/platforms/arm/lpc/fastpin_arm_lpc11_legacy.h:158: #define _FL_DEFPIN_LPC11LEGACY(PIN) \
  • src/platforms/arm/lpc/fastpin_arm_lpc11_legacy.h:159: template<> class FastPin<PIN> : public _ARMPIN_LPC11LEGACY<PIN, \

Source-confirmed conditional finding only: no new forced SDK build, runtime waveform or physical timing measurement is claimed.

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 FL_IS_ARM_LPC_11_LEGACY independently of modern LPC selectors and preserve PORT*12+BIT package/logical mapping.
  • 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. zackees commented on Nov 7, 2026

    @zackees
    MemberAuthor

    #5152 (in the merge queue) also covers the legacy LPC11xx route. fastpin_arm_lpc11_legacy.h now rejects FASTLED_FORCE_SOFTWARE_PINS with an explicit #error instead of letting its native FastPin specializations override it; fastpin_arm_lpc.h carries the same guard before its dispatch. The reason is the same as #5073: LPC's fl::pinMode and digitalWrite are no-ops (pin_noop.hpp), so a forced NoPinMapPin would drive nothing.

    Still open on this issue:

    • Forced software pins do not work on LPC11xx; that needs an LPC pin backend.
    • No LPC11xx-legacy board exists in ci/boards.py, so this guard is checked only textually, with no SDK build.
    • No device run, managed gate or artifact binding.
  3. zackees commented on Nov 21, 2026

    @zackees
    MemberAuthor

    Closing: fixed on master by fb810e3 (#5152). Legacy LPC11xx builds now hit an #error when FASTLED_FORCE_SOFTWARE_PINS is set, instead of silently using the native FastPin definitions.

  4. moved this from Triage to Done in FastLED Trackeron Nov 21, 2026
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