Skip to content

fix(build): add fast_isr.S to library.json srcFilter so ESP32 RISC-V PIO builds link - #2502

Merged
zackees merged 1 commit into
masterfrom
library-json-fast-isr-srcfilter
May 24, 2026
Merged

zackees merged 1 commit into
masterfrom
library-json-fast-isr-srcfilter

Conversation

@zackees

@zackees zackees commented May 24, 2026 •

Copy link
Copy Markdown
Member

Summary

ESP32-P4 (and other ESP32 RISC-V variants compiling gpio_isr_rx_mcpwm.cpp.hpp) currently fail to link via PlatformIO on a clean checkout:

ld: undefined reference to `gpio_fast_edge_isr`
collect2.exe: error: ld returned 1 exit status

The handler is declared in src/platforms/esp/32/drivers/gpio_isr_rx/gpio_isr_rx_mcpwm.cpp.hpp:69 under #ifdef __riscv and implemented in fast_isr.S. The library.json srcFilter overrides PIO's default file selection, and without an explicit entry the .S is not assembled.

The fix mirrors the existing pattern for libhelix_mp3/real/arm/*.S — a one-line srcFilter addition.

Test plan

  • bash compile esp32p4 (or any RISC-V variant) succeeds on a clean checkout
  • Existing host tests still pass (no host-side impact — srcFilter only affects PIO library compilation)
  • No size impact on Xtensa builds (assembly is inside #ifdef __riscv and won't be referenced)

Context

Discovered while attempting to reproduce #2493 on an attached ESP32-P4 — the build couldn't even link until this entry was added. Filing as a standalone fix; the #2493 timing follow-up is a separate PR.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated build configuration to enable proper support for ARM assembly and platform-specific GPIO driver components.

Review Change Stack

…lds link

The srcFilter overrides PIO's default file selection. Without an
explicit entry, fast_isr.S is not assembled, which leaves
gpio_fast_edge_isr undefined and breaks the link for ESP32-P4 (and
any other RISC-V variant compiling gpio_isr_rx_mcpwm.cpp.hpp).

Symptom on a clean PlatformIO build for esp32p4 (Blink/AutoResearch):

  ld: undefined reference to `gpio_fast_edge_isr'
  collect2.exe: error: ld returned 1 exit status

The handler is declared in gpio_isr_rx_mcpwm.cpp.hpp:69 under
`#ifdef __riscv` and implemented in fast_isr.S. The filter already
has an explicit entry for the helix MP3 ARM assembly file
(libhelix_mp3/real/arm/*.S); this adds the same kind of entry for
the new GPIO ISR assembly.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented May 24, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7e9c1e22-6c82-46e0-9772-9cb212589687

📥 Commits

Reviewing files that changed from the base of the PR and between adab3f8 and 46e2e44.

📒 Files selected for processing (1)
  • library.json

📝 Walkthrough

Walkthrough

The PR extends the FastLED library.json build configuration by adding two assembly source glob patterns to the srcFilter field, enabling compilation of ARM assembly files from the libhelix_mp3 decoder and ESP32 GPIO ISR receiver driver directories.

Changes

Assembly Source Build Configuration

Layer / File(s) Summary
Build source filter configuration
library.json
The srcFilter array is extended with two new glob patterns to include ARM assembly (*.S) files from the libhelix_mp3 real ARM directory and the ESP32 GPIO ISR receiver driver, enabling these optimized assembly sources to be compiled as part of the library build.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Two assembly paths we now include,
From arm and gpio's woodland thick,
A filter set in JSON's nested sight,
Makes platform code compile just right! ⚙️

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly describes the main change: adding fast_isr.S to library.json srcFilter to fix ESP32 RISC-V PIO builds, which matches the core objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch library-json-fast-isr-srcfilter

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@zackees
zackees merged commit d252b35 into master May 24, 2026
4 of 6 checks passed
@zackees
zackees deleted the library-json-fast-isr-srcfilter branch August 21, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant