Skip to content

idf component registry #2121

Open
Open

Description

@zackees

Activity

  1. zackees commented on Oct 30, 2025

    @zackees
    MemberAuthor

    Current State
    ✅ Already Implemented

    CMakeLists.txt – includes a valid idf_component_register() call.

    License: MIT (SPDX identifier present).

    Documentation: README.md and library metadata in library.json.

    Examples: Organized and self-contained.

    Legacy ESP-IDF Support: component.mk file for old make-based builds.

    ❌ Missing or Required for Registry

    idf_component.yml — required manifest file.

    Namespace request via components.espressif.com
    .

    Registry authentication (GitHub + API token or OIDC).

  2. BrinkmannJan commented on Jan 9, 2026

    @BrinkmannJan

    As I'm currently struggling to include the FastLED library into a VSC-based ESP-IDF project, it would be really helpful to have the library accessible within the ESP Component Registry.

    I can confirm that I was already able to find the CMakeLists.txt within the FastLED library.

    In the meantime: Is there a guide on how to use FastLED with ESP-IDF in VSC? I'm running into various kinds of problems with the EPS32-P4.

  3. zackees commented on Jan 14, 2026

    @zackees
    MemberAuthor

    Getting FastLED into the component registry is very important. We have a bug filed for this feature.

    Help me help you by listing the steps necessary to build FastLED in pure esp-idf. My goal is to list the library in espressifs package management section once we cut off our dependency on the Arduino lib and headers.

  4. BrinkmannJan commented on Jan 16, 2026

    @BrinkmannJan

    In the meantime, I got it running with the use of copilot agent.
    I also compiled a report on what it has done. I hope this helps:

    Summary: Getting FastLED to work with ESP-IDF (ESP32-P4)

    1. Define dependencies in idf_component.yml

    dependencies:
      espressif/arduino-esp32:
        version: "*"
      fastled:
        git: https://github.com/FastLED/FastLED.git
        version: "3.10.3"

    2. int_windows.h included (Cross-compilation on Windows)

    Problem: When building on Windows for ESP32-P4, _WIN32 s defined by the host compiler. FastLED's int.h checks _WIN32 and includes int_windows.h, which defines types (i32, u32, size, etc.) that conflict with ESP32-specific types from int.h

    Suggested fix for int_windows.h:
    Path to file: src/platforms/shared/int_windows.h

    #pragma once
    
    // Skip if cross-compiling for embedded targets
    #if defined(ESP32) || defined(ESP_PLATFORM) || defined(ESP8266) || defined(__AVR__) || defined(ARDUINO)
        // Empty - types already defined by platform-specific headers
    #else
    
    namespace fl {
        // ... existing Windows type definitions ...
    }
    
    #endif

    3. Missing __new/placement_new_delete.h

    Problem: promise.h includes "__new/placement_new_delete.h", but this file/folder doesn't exist in the 3.10.3 release.
    Workaround: Create src/__new/placement_new_delete.h:

    #pragma once
    #include <new>

    4. Rename main.c → main.cpp

    FastLED is a C++ library and requires a C++ compiler.

    Changes in CMakeLists.txt:

    idf_component_register(SRCS "main.cpp"
                        INCLUDE_DIRS "."
                        REQUIRES fastled)

    5. Fix FastLED CMakeLists.txt

    Problem: file(GLOB "src/**/*.cpp") doesn't find all source files recursively (only 62 of 290).

    Solution in CMakeLists.txt:

    file(GLOB_RECURSE FastLED_SRCS 
        "src/*.cpp"
        "src/**/*.cpp"
    )
    
    # Filter out non-ESP32 platforms
    list(FILTER FastLED_SRCS EXCLUDE REGEX ".*/tests/.*")
    list(FILTER FastLED_SRCS EXCLUDE REGEX ".*/wasm/.*")
    list(FILTER FastLED_SRCS EXCLUDE REGEX ".*/avr/.*")
    list(FILTER FastLED_SRCS EXCLUDE REGEX ".*/arm/.*")
    list(FILTER FastLED_SRCS EXCLUDE REGEX ".*/teensy/.*")
    list(FILTER FastLED_SRCS EXCLUDE REGEX ".*/stub/.*")

    6. FreeRTOS Tick Rate

    In sdkconfig or sdkconfig.defaults:

    CONFIG_FREERTOS_HZ=1000
    

    My issue with this

    • The patches in 2. must be reapplied after every fastLED component update, since managed_components gets re-downloaded
    • The inital build takes now over 1900+ build steps as the whole arduino-esp32 gets compiled. That's around 10 minutes on my machine.
  5. zackees commented on Jan 17, 2026

    @zackees
    MemberAuthor

    PRs welcome for getting us off off arduino headers. Help us help you.

  6. zackees commented on Feb 3, 2026

    @zackees
    MemberAuthor

    The FastLED build on master is now blazing fast. We did it by switching to a mandatory unity build enforced by the project structure and custom cpp linter, you can see it via all the *.cpp.hpp files, and their aggregate in the _build.cpp.hpp per directory with a _build.cpp for each major component. Instead of hundreds of cpp files, we now have only 6 aggregates. If you have a multiprocessor system these will be done in parallel.

    This has sped up all of our compiles. Something like 4-6 seconds now fastled instead of a over minute. So ~90% reduction in build time. Make sure you have LTO and --gc-sections for your build as now there is more pressure on the final program link for code elimination via execution tracing rather than object file level inclusion.

  7. zackees commented on Feb 6, 2026

    @zackees
    MemberAuthor

    I refactored the print functionality of esp platform for fastled and am now doing jtag printing with a fallback to uart for older platforms. This was the #1 blocker for removing arduino dependency.

  8. 4wheeljive commented on Apr 8, 2026

    @4wheeljive
    Contributor

    @BrinkmannJan I don't know if you're still wrestling with the P4, but I spent the past week pounding away and finally got a working setup (including hosted C6 wireless) in ESP-IDF that I ported to a pioarduino/Platformio project:
    https://www.reddit.com/r/FastLED/comments/1sfyyr1/working_esp32p4_with_integratedhosted_esp32c6/

  9. added
    area: core
    status: triage
    on Apr 16, 2026
  10. added
    deferred
    on Aug 20, 2026
  11. zackees commented on Aug 20, 2026

    @zackees
    MemberAuthor

    Deferred during the bug burn-down pending external Espressif Component Registry namespace approval and publication credentials. Standalone component support exists, but registry metadata, authenticated release publication, and a live installability check cannot be completed until that prerequisite changes.

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: coredeferredstatus: triage

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions