-
Notifications
You must be signed in to change notification settings - Fork 59
External overlays support #155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
DhruvaG2000
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine with the idea in general, but I just prefer cleaner commits.
Please use something like CMakeLists: add support for external overlays
Then whatever you've put in the PR description needs to go into the commit message.
Also, please add a line in the README or the variants documentation on how external overlays can be passed/ where they are expected to be located.
a1fd86e to
b4f709a
Compare
I have changed the commit message and added information regarding the new overlay behavior to the |
@lizard123137 Please go through the https://docs.zephyrproject.org/latest/contribute/guidelines.html . You need to add your Signed off by tag. See https://docs.zephyrproject.org/latest/contribute/guidelines.html#commit-guidelines Also see the style in which commit messages have to be written. You can probably feed it through some LLM or chat GPT or the github copilot and it may be able to rephrase it for you. Rest, thanks for adding the line in the docs. |
Added the signed-off-by tag and fixed the character limit for the message. |
soburi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If they don't
provide an overlay their build will fail
anyways due to missing zephyr,user section.
If this is not the right approach
would adding the AtomS3 board to the variants
be a good PR?
This is not a very good commit message.
Please delete this and comment on what the commit done.
Also, the line is too short and difficult to read, so please break it every 70 characters or so.
Agreed, as I said you can use github copilot or chat GPT! |
I changed the commit message to what copilot generated for you |
There was a problem hiding this 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 adds support for external overlay files to allow users to use custom boards without adding them explicitly to the ArduinoCore variants folder. Users can now provide their own overlay files in their projects while using ArduinoCore as a West module.
Changes:
- Changed CMake behavior from fatal error to warning when variant directory not found, with fallback to default variant
- Added empty default variant.h as fallback for unsupported boards
- Updated documentation to explain external overlay usage
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| CMakeLists.txt | Changes FATAL_ERROR to WARNING when variant directory not found, sets fallback to variants/default |
| variants/default/variant.h | New empty header file serving as fallback for boards without variant support |
| documentation/variants.md | Documents the new external overlay capability and requirements |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
It's ready now, please could you just pull rebase and push? |
Allow users who pull ArduinoCore as a module (via west) to provide their own Zephyr overlay files in the application repository instead of modifying ArduinoCore/variants. This enables board-specific overlays (for example when using an AtomS3 board) to live in the consuming project. If an overlay is not provided the build will fail due to the missing zephyr,user section, which is the expected behavior. Signed-off-by: Michal Gagos <lizard123137@gmail.com>
done |
I am currently working on a project where I use
ArduinoCoreas a module in order to use arduino libraries. I am using anAtomS3board and I don't want to add it explicitly to theArduinoCore/variants.These changes will allow the user to provide their own overlay in their project without having to modify the library pulled in by west. If they don't provide an overlay their build will fail anyways due to missing
zephyr,usersection.If this is not the right approach would adding the
AtomS3board to the variants be a good PR?