Repository navigation
fix(ci/boards): set PARLIO TX ISR IRAM flags on all PARLIO-capable boards (#3271) - #3275
davidcreated wants to merge 4 commits into
Conversation
…271) CONFIG_PARLIO_TX_ISR_HANDLER_IN_IRAM=1 and CONFIG_PARLIO_TX_ISR_CACHE_SAFE=1 are required for correct PARLIO TX ISR timing — without them the ISR sits in flash and takes cache-miss stalls mid-execution, violating LED protocol timing. The driver only emits a compile-time #warning when the flag is missing. Previously these flags lived only in the root platformio.ini [env:esp32c6] block. CI picked them up by accident via the root-merge in PioCompiler, and only for esp32c6 — every other PARLIO-capable board (esp32s3, esp32h2, esp32p4, esp32c5) compiled without them. Extract a shared ESP32_PARLIO_BUILD_FLAGS constant and apply it to the build_flags of every PARLIO-capable board in ci/boards.py, so boards.py is a self-sufficient source of truth ahead of the planned root-platformio.ini sever, and so the next PARLIO board added cannot silently miss the flags. Root platformio.ini is left intact: that env is still used for standalone manual `pio run` (which does not go through boards.py), and the root-merge removal it depends on is tracked as separate follow-up work.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughA new module-level constant ChangesPARLIO build flags for ESP32 boards
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ci/boards.py`:
- Around line 42-45: Add an explicit type annotation to the
ESP32_PARLIO_BUILD_FLAGS constant at the module level. Since this constant is
assigned a list of strings, add a type annotation indicating it is a list of
strings (list[str]) between the constant name and the assignment operator. This
will improve type safety and IDE support for the codebase.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4d3c10f3-1fb9-41e5-be41-6261d5d86e24
📒 Files selected for processing (1)
ci/boards.py
Address CodeRabbit review on #3275: add explicit type annotation to the module-level constant for type safety and IDE support.
|
Addressed in 1947d37 — added the explicit |
|
Tip For best results, initiate chat on the files or code changes.
(๑˃ᴗ˂)ﻭ If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ci/boards.py`:
- Line 856: Fix the duplicate keyword argument errors in three Board
constructors by merging the PARLIO build flags into a single build_flags list.
In the ESP32_C5_DEVKITC_1 constructor, combine the existing build_flags list
with the PARLIO flags and remove the second build_flags argument. Do the same
for the ESP32H2 constructor and the ESP32_P4 constructor, ensuring each Board
call has only one build_flags parameter that includes both the original flags
and the PARLIO flags merged together using list concatenation or unpacking
syntax.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: f9b7b111-ac1d-4888-b136-afd927ea8802
📒 Files selected for processing (1)
ci/boards.py
|
Thank you for the contribution @davidcreated! Closing as superseded — your fix was correct in intent and just lost the race to a parallel effort by an hour or so. The PARLIO IRAM lockdown has now landed on master across a sequence of PRs:
Net result on master: every PARLIO-capable board (C5/C6/H2/P4) gets the IRAM + cache-safe flags automatically, S3 correctly does not, and a snapshot test (`ci/tests/test_parlio_capable_boards.py`) guards against future drift. Really appreciate you taking the time to file this — same fix, just routed through a different shipping cycle. |
Summary
Fixes #3271.
CONFIG_PARLIO_TX_ISR_HANDLER_IN_IRAM=1andCONFIG_PARLIO_TX_ISR_CACHE_SAFE=1are required for correct PARLIO TX ISR behavior. Without them the ISR sits in flash, takes cache-miss stalls during execution, and violates LED protocol timing — the driver only signals this with a compile-time#warning(src/platforms/esp/32/drivers/parlio/parlio_peripheral_esp.cpp.hpp:46-48).Today these flags live only in the root
platformio.ini[env:esp32c6]block. CI gets them by accident via the root-merge inPioCompiler._init_platformio_build— and only foresp32c6. Every other PARLIO-capable board (esp32s3,esp32h2,esp32p4,esp32c5) compiles without them today.Change
ESP32_PARLIO_BUILD_FLAGSconstant inci/boards.py.build_flagsof every PARLIO-capable board:esp32c5,esp32c6,esp32s3,esp32h2,esp32p4.This makes
ci/boards.pya self-sufficient source of truth ahead of the planned root-platformio.inisever, and ensures the next PARLIO board added cannot silently miss the flags (just spread the shared constant).Scope note
The root
platformio.ini[env:esp32c6]flags are intentionally left in place. That env is still used for standalone manualpio run(which does not go throughboards.py), and the root-merge removal it depends on is tracked as separate follow-up work in #3271. Removing them now would regress standalone dev builds before the sever lands. The duplicate-Don the c6 CI build is harmless.Verification
Rendered each board's
to_platformio_ini()and confirmed both flags are present:python3 -m py_compile ci/boards.pypasses.Summary by CodeRabbit
Release Notes