zephyrSerial: provide ARDUINO_ROUTER_SERIAL from DTS#370
Open
pillo79 wants to merge 5 commits intoarduino:mainfrom
Open
zephyrSerial: provide ARDUINO_ROUTER_SERIAL from DTS#370pillo79 wants to merge 5 commits intoarduino:mainfrom
pillo79 wants to merge 5 commits intoarduino:mainfrom
Conversation
f8add01 to
bf18e46
Compare
ea09a82 to
4b5ef3d
Compare
This commit rewrites the serial port definition logic based on the DT config. From the DT definition, the number of generic serial instances is determined, and the Serial object(s) are declared accordingly. The indexes of the serial instances are determined by a mapping function so that the 'Serial' instance can be skipped if desired (e.g. when SerialUSB is used). The common parts are factored out to a single macro that is used to declare all the serial instances. Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Export two macros that automatically map to Serial objects depending on the current board's DT configuration: - ARDUINO_CONSOLE_SERIAL: Serial object used for the Zephyr console - ARDUINO_HARDWARE_SERIAL: First generic Serial object (usually on pins D0/D1) Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This commit adds a conditional include for "postvariant.h" in the Arduino.h header file. If it exists, it will be included after the main Arduino definitions. This allows for additional variant-specific configurations or overrides to be applied without modifying the core Arduino.h file directly. Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
If the board has an 'arduino,router-serial' node, then the functionality of the 'Serial' object is actually provided by the 'Monitor' object in the Arduino_RouterBridge library. Define the property for the UNO Q board and make sure the library is always included in every sketch so that the 'Serial' object is properly defined. A stub header is provided in the 'libraries/stubs' folder to handle the case of the library not being installed, so that the core can be used without requiring the installation of the libray. Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
The real DebugLog library is currently not compatible with the UNO Q. Until a fix is implemented, this commit adds a shadow header that disables all logging and assertions. Include this only on the UNO Q artifact. Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Built
|
| Artifact | Board | Core | Tests | RAM | Sketches | Warnings | Errors |
|---|---|---|---|---|---|---|---|
✅ zephyr_contrib |
ek_ra8d1
| 📗 | ✅ |
11.9% |
2 | - | - |
frdm_mcxn947
| 3 🏷️ | ✅ |
58.0% |
2 | - | - | |
frdm_rw612
| 1 🏷️ | ✅ |
83.0% |
2 | - | - | |
✔️* zephyr_main |
giga
| 4 🏷️ | ✅* |
54.5% |
44 | 8 | - |
nano33ble
| 1 🏷️ | ✅* |
78.7% |
22 | 8 | - | |
nano_matter
| 📗 | ✔️* |
|
20 | 8 | (2*) | |
niclasense
| 2 🏷️ | ✅* |
|
20 | 8 | - | |
opta
| 4 🏷️ | ✔️* |
46.7% |
54 | 8 | (2*) | |
portentac33
| 3 🏷️ | ✔️* |
|
56 | 8 | (8*) | |
portentah7
| 3 🏷️ | ✔️* |
47.3% |
58 | 8 | (2*) | |
✅* zephyr_unoq |
unoq
| 📗 | ✅* |
26.4% |
62 | 8 | - |
Legend
Board Test Status description 🔥 🔥 Test run failed to complete. ❌ 🔴 Test completed with unexpected errors. ✔️* 🚫 Test completed with errors, but all are known/expected. ✅* 🟡 Test completed with some warnings; no errors detected. ✅ 🟢 Test passed successfully, with no warnings or errors. 🌑 🌑 Test was skipped.
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.
This PR tries to provide an
ARDUINO_ROUTER_SERIAL#define for the Arduino UNO Q from the DeviceTree Zephyr code, to be used to customize the library compilation stage and allowSerialto be exported to sketches.Requires:
Serialobject with latest cores arduino-libraries/Arduino_RouterBridge#57DNM until above PRs are merged and the last 'wip' commit is removed.EDIT: Blocker PRs merged!