Skip to content

Ch55x devices support #1432

Open
Open

Description

@vnkbln

Hi all! I get an error when compiling:
#error "This platform isn't recognized by FastLED... yet.

Tell me how I can add support for these chips?

I found this library, it works, but it's not very convenient

Activity

  1. robertlipe commented on Aug 28, 2023

    @robertlipe
    Contributor

    I'm not a FastLED insider, but there's unlikely to be any magic required. It's a mere matter of engineering. The thing that makes supporting WS281x parts "hard" is the precise timing required to squirt out the needed protocol on the data pin. If you have access to a logic analyzer and/or scope so you can see what you actually place on the bus - as opposed to just confirming the presence or absence of blinking, which relies on those bulbs interpreting what you placed on the wire - it'll surely get easier.

    Find a platform now in FastLED/src/platforms that's simliar to the cores (ARM? RISC_V? 8051?) in the part that you care about and start writing. In order to hit the timing requirements, you may need to have a dash of assembly to disable interrupts and bang directly on GPIO pins, but there's unlikely inherently anything hard about it, particularly if you need only a few bulbs supported and not hundreds per strand.

    If you can't do it yourself, it's a nice atomic task for a contract programming project. There's surely a clearly defined, testable delivery: your CH55x hardware/project working, right? Make it happen and get the code back to the project for integration so it'll be there for the next person. Perhaps the code you cite will be inspirational.

    Also, please consider rephrasing the subject of this post to help project maintainers. "Feature request: adding CH55x support" or something to make it clear if you're offering to add such support or looking for someone else to do the work for you (perhaps at a price). This will help others that may be interested in such a combination know if you're actively working on it, have abandoned it, etc.

  2. added
    area: core
    status: stale
    status: triage
    on Apr 16, 2026
  3. zackees commented on Apr 20, 2026

    @zackees
    Member

    Research note against current repo head as of 2026-04-20: I still do not see any CH55x/WCH backend in the repo. The supported platform tree covers AVR, ESP, RP2040, STM32/SAMD/Teensy/nRF52/Renesas, etc., so CH55x support would be a new platform port, not a small board-definition tweak.

    The next useful step would be a narrow porting spike: add platform detection in src/led_sysdefs.h, define the pin/timing layer, and then bring up either a clockless GPIO path or a usable SPI-style output path for the CH55x toolchain.

  4. zackees commented on Jun 3, 2026

    @zackees
    Member

    Tracked in FastLED/fbuild#384 for CH55x / 8051 fbuild platform/build support validation.

    That fbuild issue is scoped to board metadata, toolchain/backend support, and FastLED smoke-build evidence. Any remaining FastLED source/platform-code blocker should stay linked from both sides.

  5. zackees commented on Jun 3, 2026

    @zackees
    Member

    fbuild backend status for CH55x / 8051

    Status check from the fbuild side, tracked at FastLED/fbuild#384.

    fbuild today:

    • Board metadata for the CH55x family is present (CH559.json plus ~250 other intel_mcs51 boards in crates/fbuild-config/assets/boards/json/), and the 8051 board-id macro test (AT89S51 / NAKED_ARCH_MCS51) passes.
    • The intel_mcs51 platform string is not mapped in fbuild's Platform enum (crates/fbuild-core/src/lib.rs::Platform::from_platform_str). Running fbuild build against a minimal CH559 fixture (tests/platform/ch559/, added in test(ch559): add intel_mcs51 smoke fixture tracking FastLED CH55x fbuild#394) currently fails immediately with unsupported platform: intel_mcs51.
    • No native SDCC compiler/linker/orchestrator exists in fbuild-build. Even with a Platform::IntelMcs51 enum variant, get_platform_support would fall through to "native orchestrator for ... not yet implemented".

    FastLED side (blocking everything above):

    • src/led_sysdefs.h has no 8051 / SDCC branch. Compiling FastLED with an 8051 toolchain (sdcc, __SDCC_mcs51, __C51__, etc.) falls through to the explicit #error "This platform isn't recognized by FastLED... yet." — that is the error reported in this issue. src/platforms.h is in the same shape.
    • Adding even a stub platforms/mcs51/ with led_sysdefs_mcs51.h + fastled_mcs51.h and a matching #elif defined(__SDCC_mcs51) || defined(__C51__) branch in both led_sysdefs.h and platforms.h would unblock platform detection. After that, the work is wiring up FastPin/Clockless/cycle-counting for the 8051 ISA — non-trivial because 8051 doesn't have the C++17 / inline-asm headroom most existing FastLED platforms assume.

    The ch55xduino/WS2812 library you linked is essentially a hand-rolled cycle-counted bit-bang in assembly, so it confirms the path forward but doesn't bolt straight onto FastLED's Clockless template machinery.

    TL;DR: fbuild-side support is two well-scoped chunks of work (Platform::IntelMcs51 + an SDCC orchestrator) and is being tracked at FastLED/fbuild#384, but the prerequisite that unblocks this issue is on the FastLED side — adding a mcs51/SDCC platform header. Happy to do the fbuild backend work once a FastLED platform stub lands.

    Reproducer fixture added in FastLED/fbuild#394.

  6. removed
    status: stale
    on Sep 1, 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

    area: corestatus: triage

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions