Skip to content

CMakeLists.txt: Improve overlay search rules#150

Merged
DhruvaG2000 merged 1 commit intozephyrproject-rtos:nextfrom
soburi:overlay_search_order
Feb 3, 2026
Merged

CMakeLists.txt: Improve overlay search rules#150
DhruvaG2000 merged 1 commit intozephyrproject-rtos:nextfrom
soburi:overlay_search_order

Conversation

@soburi
Copy link
Copy Markdown
Member

@soburi soburi commented Feb 1, 2026

The latest Zephyr update requires path separator insertion, so we've updated it accordingly.
We've also made changes to handle board revisions.

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>
@soburi soburi requested a review from DhruvaG2000 as a code owner February 1, 2026 14:12
Copilot AI review requested due to automatic review settings February 1, 2026 14:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates CMakeLists.txt files across the codebase to improve overlay search rules for compatibility with the latest Zephyr updates. The changes implement path separator handling (converting double underscores to single underscores) and add support for board revision-specific overlay files.

Changes:

  • Modified main CMakeLists.txt to replace double underscores with single underscores in NORMALIZED_BOARD_TARGET and update variant directory search logic
  • Added board revision support to all sample CMakeLists.txt files, allowing revision-specific overlay files to take precedence over generic ones
  • Updated error messages to reflect new search paths

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
CMakeLists.txt Adds string replacement for path separators and updates variant directory search to check BOARD first, then NORMALIZED_BOARD_TARGET
samples/threads_arduino/CMakeLists.txt Adds conditional overlay file search supporting board revisions
samples/spi_controller/CMakeLists.txt Adds conditional overlay file search supporting board revisions
samples/serial_event/CMakeLists.txt Adds conditional overlay file search supporting board revisions
samples/i2cdemo/CMakeLists.txt Adds conditional overlay file search supporting board revisions
samples/hello_arduino/CMakeLists.txt Adds conditional overlay file search supporting board revisions
samples/fade/CMakeLists.txt Adds conditional overlay file search supporting board revisions
samples/button_press_led/CMakeLists.txt Adds conditional overlay file search supporting board revisions
samples/blinky_arduino/CMakeLists.txt Adds conditional overlay file search supporting board revisions
samples/attach_interrupt/CMakeLists.txt Adds conditional overlay file search supporting board revisions
samples/analog_input/CMakeLists.txt Adds conditional overlay file search supporting board revisions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread samples/threads_arduino/CMakeLists.txt
Comment thread samples/spi_controller/CMakeLists.txt
Comment thread samples/serial_event/CMakeLists.txt
Comment thread samples/i2cdemo/CMakeLists.txt
Comment thread samples/fade/CMakeLists.txt
Comment thread samples/button_press_led/CMakeLists.txt
Comment thread samples/blinky_arduino/CMakeLists.txt
Comment thread samples/hello_arduino/CMakeLists.txt
Comment thread samples/attach_interrupt/CMakeLists.txt
Comment thread samples/analog_input/CMakeLists.txt
@soburi
Copy link
Copy Markdown
Member Author

soburi commented Feb 2, 2026

@DhruvaG2000

There's a lot more this time too.
Please let's start with this.

@DhruvaG2000
Copy link
Copy Markdown
Member

@soburi I was wondering, what should be our strategy with backward compatibility? Like if someone's using an older version of zephyr and things may break for them right? Do we only support the bleeding edge of zephyr RTOS?

@soburi
Copy link
Copy Markdown
Member Author

soburi commented Feb 3, 2026

@soburi I was wondering, what should be our strategy with backward compatibility? Like if someone's using an older version of zephyr and things may break for them right? Do we only support the bleeding edge of zephyr RTOS?

First of all, this software is still in development and has not yet been officially released. From this perspective, I see no choice but to update to the latest Zephyr at this time.

Zephyr does not guarantee permanent API compatibility, so I think we'll follow that. The migration guide clearly states API changes, so backward compatibility may not be maintained "if necessary."
https://docs.zephyrproject.org/latest/releases/migration-guide-4.3.html

So, while realistically, frequent API changes are not a good idea, I think it's reasonable to make changes if necessary by providing an acceptable migration path.

In the long term, I think we'll release ArduinoCore-Zephyr versions corresponding to Zephyr releases and clearly indicate the support period.

Note: This PR change should not affect backward compatibility.

@DhruvaG2000 DhruvaG2000 merged commit 5a312ad into zephyrproject-rtos:next Feb 3, 2026
18 checks passed
@soburi soburi deleted the overlay_search_order branch February 3, 2026 13:29
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.

3 participants