-
Notifications
You must be signed in to change notification settings - Fork 59
Support "file-less" configuration #151
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
base: next
Are you sure you want to change the base?
Conversation
30e80c9 to
2157ae2
Compare
d14bab2 to
769f878
Compare
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 introduces a "file-less" configuration system that automatically configures boards using Arduino-compatible header definitions from the device tree, eliminating the need for board-specific overlay files. The system detects supported connector types (arduino_header, arduino_mkr_header, etc.) and automatically maps GPIO pins, enabling support for 200+ Zephyr-supported boards including the Nucleo series.
Changes:
- Added automatic board detection using device tree connector labels (arduino_header, pico_header, etc.)
- Introduced GPIO port/pin abstraction layer with constexpr helper functions for compile-time pin mapping
- Modified tone/noTone implementation to support dynamic timer allocation by tracking pin assignments
- Updated PWM and ADC pin mappings to support both legacy and new connector-based configurations
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 21 comments.
| File | Description |
|---|---|
| cores/arduino/Arduino.h | Adds macro definitions for automatic connector detection (ZARD_CONNECTOR, ZARD_ADC_CONNECTOR, ZARD_PWM_CONNECTOR) and updates digital/analog pin enums to support both legacy and connector-based configurations |
| cores/arduino/zephyrCommon.cpp | Implements GPIO abstraction layer with constexpr functions for pin mapping, updates all GPIO operations to use new abstraction, and modifies tone/noTone for improved timer management |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
165377e to
aa5f7a5
Compare
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
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9d23221 to
293076c
Compare
|
This PR looks quite interesting, will be on my next list of things to review! |
293076c to
7e1fd4c
Compare
| * Copyright (c) 2026 TOKITA Hiroshi | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ |
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 we can get #161 merged before this, then this will no longer be needed.
4190e65 to
1a5ad63
Compare
Fixed a bug where tone() with duration=0 would stop the tone immediately instead of ringing infinitely. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Allows you to change the maximum number of notes that can be played with `tone()`. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Add a tone_doremi sample to demonstrate how to sounding with tone API Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
In preparation for improvements to allow the use of GPIOs without device tree definitions, the interface will be changed to specify port and pin instead of `gpio_dt_spec`. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
If digital-gpio-pins is not defined, the pin configuration will be generated using the connector definition. This allows ArduinoCore-Zephyr to be used on boards that have arduino-header defined, without requiring specific configuration in ArduinoCore-Zephyr. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
A new configuration method has been adopted, allowing support to be added with less configuration than before. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
1a5ad63 to
fd0d3fb
Compare
This PR introduce new configuration system without variants/[board].overlay.
Boards that has arduino like connector mostly has define
arduino-header.We can use this information to configure automatically for each boards.
We can support all zephyr supported that has
arduino-header.That means, we make it works for more 200 boards, including Nucleo series.
However, only Blinky works out of the box, and ADC and PWM channels are required.
These should be made into snippets in the future.