Skip to content

Conversation

@lizard123137
Copy link
Contributor

I am currently working on a project where I use ArduinoCore as a module in order to use arduino libraries. I am using an AtomS3 board and I don't want to add it explicitly to the ArduinoCore/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,user section.

If this is not the right approach would adding the AtomS3 board to the variants be a good PR?

Copy link
Member

@DhruvaG2000 DhruvaG2000 left a 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.

@lizard123137 lizard123137 force-pushed the next branch 2 times, most recently from a1fd86e to b4f709a Compare February 5, 2026 11:49
@lizard123137
Copy link
Contributor Author

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.

I have changed the commit message and added information regarding the new overlay behavior to the variants.md document

@DhruvaG2000
Copy link
Member

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.

I have changed the commit message and added information regarding the new overlay behavior to the variants.md document

@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.

@lizard123137
Copy link
Contributor Author

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.

I have changed the commit message and added information regarding the new overlay behavior to the variants.md document

@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.

Copy link
Member

@soburi soburi left a 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.

@DhruvaG2000
Copy link
Member

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!
This is just something that copilot was able to do:

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.

@lizard123137
Copy link
Contributor Author

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! This is just something that copilot was able to do:

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.

I changed the commit message to what copilot generated for you

Copy link

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 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.

@DhruvaG2000
Copy link
Member

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>
@lizard123137
Copy link
Contributor Author

It's ready now, please could you just pull rebase and push?

done

@soburi soburi merged commit 7eab9c4 into zephyrproject-rtos:next Feb 9, 2026
3 checks passed
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