You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci(esp32): build and link a real bare ESP-IDF app - #5009
Adds a real bare ESP-IDF app and validates configuration, compilation and linking without Arduino. The app registers WS2812 LEDs, sets RGB colors and calls FastLED.show() from app_main(). The workflow uses official espressif/idf:v5.5 for esp32, rejects Arduino components, enables FL_NO_ARDUINO, requires ELF/bin output and uploads build evidence.
The real build exposed library defects, now fixed:
Global size_t and ptrdiff_t come only from toolchain <stddef.h> and its system guards; FastLED keeps namespace aliases and no longer declares these global types twice.
ESP dispatchers use normalized detection, including native IDF's ESP_PLATFORM.
The FastLED component declares esp_adc for IDF 5+ and mbedtls; OTA includes its timer API header.
ESP32 derives F_CPU from SDK configuration when no explicit override is supplied.
Matching master pushes run the existing job, addressing CodeRabbit's original review.
Validation on head 3ac74fb068a24484b063d294f2b43ced13df55ac:
The app and its CI compile/link checks retain their semantics; no workaround definitions or disabled checks hide library failures. Only IDF 5.5/esp32 is validated here. Other versions/chips and hardware execution remain unverified.
Related to #3724; completes the real build/link evidence in step 4. Leave this non-draft PR unmerged as requested.
No actionable comments were generated in the recent review.
Walkthrough
This change adds a bare ESP-IDF application and a workflow for ESP-IDF 5.5 on ESP32. It updates ESP32 platform detection and component requirements. It also changes FastLED size-type declarations and adds compile tests for header include order.
Changes: Bare ESP-IDF CI
Layer / File(s)
Summary
ESP-IDF platform and component support src/platforms/esp/is_esp.h, src/platforms.h, src/led_sysdefs.h, src/platforms/int.h, src/platforms/esp/32/core/led_sysdefs_esp32.h, src/platforms/esp/32/ota/ota_impl.cpp.hpp, CMakeLists.txt, ci/tests/test_bare_idf_cmake.py, ci/tests/test_esp_noexcept.py
ESP32 detection and header selection now use FastLED platform macros. The ESP32 sysdefs add a guarded F_CPU fallback from ESP-IDF configuration. Component requirements and related tests include mbedtls and esp_adc.
The project configures the checkout as an ESP-IDF project and rejects resolved component names containing “Arduino.” The app registers FastLED as a requirement and adds an app_main example that configures and displays three WS2812 LEDs. The probe runs as a Python module. The README describes the harness, build setup, and validation limits.
Workflow build and artifact handling .github/workflows/build_bare_idf.yml, README.md
The workflow adds dispatch, push, and pull-request triggers, build conditions, and an ESP-IDF 5.5/ESP32 build. It checks the ELF and BIN outputs, reports BIN size, and uploads build and diagnostic artifacts. The repository README links to the workflow.
Size-type header consistency
Layer / File(s)
Summary
Size-type aliases and header integration src/fl/stl/cstddef.h, src/fl/stl/stdint.h, ci/lint_cpp_rs/src/lint_core/banned_header_data.rs
fl::size_t and fl::ptrdiff_t now alias the global types supplied by <stddef.h>. stdint.h includes the cstddef wrapper and removes its duplicate aliases. The header lint exception allows <stddef.h> in that wrapper.
A new compile test checks all permutations of three size-type headers under native and supported 32-bit compiler arguments. The existing ESP32 preprocessing test changes only its formatting.
sequenceDiagram
participant Workflow as build_bare_idf workflow
participant Docker as ESP-IDF Docker image
participant App as ci/idf_app
participant Artifacts as workflow artifacts
Workflow->>Docker: build ci/idf_app for ESP32
Docker->>App: compile and link application
App-->>Workflow: provide ELF and BIN outputs
Workflow->>Artifacts: upload build outputs
FastLED/FastLED#5008 — This PR updates the probe and component requirements introduced in #5008, and uses its FL_NO_ARDUINO contract in a bare ESP-IDF application.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely describes the main change: adding CI coverage to build and link a real bare ESP-IDF application.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 5 functions across 15 files. (3 skipped: 3 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between 30cec2e and 3ac74fb.
Files selected for processing: 11
CMakeLists.txt
README.md
ci/idf_app/README.md
ci/tests/test_bare_idf_cmake.py
ci/tests/test_esp_noexcept.py
src/led_sysdefs.h
src/platforms.h
src/platforms/esp/32/core/led_sysdefs_esp32.h
src/platforms/esp/32/ota/ota_impl.cpp.hpp
src/platforms/esp/is_esp.h
src/platforms/int.h
Files skipped from review as they are similar to previous changes: 1
ci/idf_app/README.md
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.
Change in examples/Blink per target. The left number is this PR's image flash / attributed RAM in bytes; the colored delta is the change from the merge base (red ↑ is larger, green ↓ is smaller, 0 is unchanged).
Both findings are about the push trigger keeping master CI red, which is no longer true: after the header-conflict fix (src/fl/stl/cstddef.h / stdint.h) the job now links and produces firmware.
Evidence from the latest run (41628653341, job 125892646646):
Bare IDF v5.5 / esp32: 240368 bytes
upload-artifact: ci/idf_app/build/fastled_bare_idf.bin
So the push trigger is now the regression guard that proves a bare-IDF app keeps building on master - keeping it. No code change made for these two comments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a real bare ESP-IDF app and validates configuration, compilation and linking without Arduino. The app registers WS2812 LEDs, sets RGB colors and calls
FastLED.show()fromapp_main(). The workflow uses officialespressif/idf:v5.5for esp32, rejects Arduino components, enablesFL_NO_ARDUINO, requires ELF/bin output and uploads build evidence.The real build exposed library defects, now fixed:
size_tandptrdiff_tcome only from toolchain<stddef.h>and its system guards; FastLED keeps namespace aliases and no longer declares these global types twice.ESP_PLATFORM.esp_adcfor IDF 5+ andmbedtls; OTA includes its timer API header.F_CPUfrom SDK configuration when no explicit override is supplied.Validation on head
3ac74fb068a24484b063d294f2b43ced13df55ac:.bin, uploadedbare-idf-v5.5-esp32artifact..bin.bash test --py: passed (340.86 seconds).bash test --cpp: 329/329 unit targets and 95/95 examples passed.bash lint: passed.bash bare-idf-probe: 36/36 passed, zero offenders.The app and its CI compile/link checks retain their semantics; no workaround definitions or disabled checks hide library failures. Only IDF 5.5/esp32 is validated here. Other versions/chips and hardware execution remain unverified.
Related to #3724; completes the real build/link evidence in step 4. Leave this non-draft PR unmerged as requested.