CMakeLists.txt: Improve overlay search rules#146
Closed
soburi wants to merge 1 commit intozephyrproject-rtos:nextfrom
Closed
CMakeLists.txt: Improve overlay search rules#146soburi wants to merge 1 commit intozephyrproject-rtos:nextfrom
soburi wants to merge 1 commit intozephyrproject-rtos:nextfrom
Conversation
The latest Zephyr update requires path separator insertion, so we've updated it accordingly. We've also made changes to handle board revisions. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR updates how Arduino variants and devicetree overlays are located to align with recent Zephyr changes and to support per‑board revisions.
Changes:
- In the root
CMakeLists.txt, normalizeNORMALIZED_BOARD_TARGETand adjustvariant_dirlookup to prefervariants/${BOARD}with a fallback tovariants/${NORMALIZED_BOARD_TARGET}, improving compatibility with Zephyr’s updated board naming/path rules. - In all Arduino sample
CMakeLists.txt, changeDTC_OVERLAY_FILEhandling to first look for a${NORMALIZED_BOARD_TARGET}_${BOARD_REVISION}.overlayand fall back to the base${NORMALIZED_BOARD_TARGET}.overlay, so board revisions can use dedicated overlays. - Keep behavior safe when no module-specific overlay exists by not forcing
DTC_OVERLAY_FILEif neither the revision-specific nor the base overlay file is present.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
CMakeLists.txt |
Normalizes NORMALIZED_BOARD_TARGET (replacing __ with _) and updates variant directory selection to try variants/${BOARD} first, then variants/${NORMALIZED_BOARD_TARGET}, with an updated fatal error message if neither exists. |
samples/threads_arduino/CMakeLists.txt |
Adds conditional logic to set DTC_OVERLAY_FILE to a board‑revision overlay if it exists, otherwise to the base overlay, for the threads Arduino sample. |
samples/spi_controller/CMakeLists.txt |
Same overlay selection logic as above, applied to the SPI controller sample. |
samples/serial_event/CMakeLists.txt |
Same overlay selection logic as above, applied to the serial event sample. |
samples/i2cdemo/CMakeLists.txt |
Same overlay selection logic as above, applied to the I²C demo sample. |
samples/hello_arduino/CMakeLists.txt |
Same overlay selection logic as above, applied to the hello Arduino sample. |
samples/fade/CMakeLists.txt |
Same overlay selection logic as above, applied to the fade sample. |
samples/button_press_led/CMakeLists.txt |
Same overlay selection logic as above, applied to the button‑press‑LED sample. |
samples/blinky_arduino/CMakeLists.txt |
Same overlay selection logic as above, applied to the blinky Arduino sample. |
samples/attach_interrupt/CMakeLists.txt |
Same overlay selection logic as above, applied to the attach‑interrupt sample. |
samples/analog_input/CMakeLists.txt |
Same overlay selection logic as above, applied to the analog input sample. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
soburi
pushed a commit
to soburi/ArduinoCore-zephyr
that referenced
this pull request
Feb 6, 2026
…_write_overload SerialUSB: fix missing overload after zephyrproject-rtos#123
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The latest Zephyr update requires path separator insertion, so we've updated it accordingly.
We've also made changes to handle board revisions.