Skip to content

Conversation

@chrysn
Copy link
Member

@chrysn chrysn commented Dec 8, 2025

(Built on #67, please ignore the first two commits)

This builds up UARTs to be useful with Ariel OS in a way that avoids the need for pins.rs in applications (which I think is part of the purpose of board descriptions: to enable generic applications to run on any board, no matter whether the application or the board description is out-of-tree).

Concrete changes:

  • I'm making serde strict. If this is controversial, I'll move it out into another commit, but I think it matters, for Ariel has already started racking up various "alternative syntaxes" for active-high/low. (Those are not cleaned up here yet, just avoiding the issue gets worse)
  • "host_facing" is defined as a new property. This is an important property, because boards may have all kinds of UARTs (to on-board devices, to extension ports, to the debugger or to USB), and the latter two are the ones an application that offers, say, a shell, or debug output, or (in my case) a serial line network uplink wants to select.
    • In an extra commit, that is turned into a has_ property, so laze can filter on such a port's presence to decide if an application makese sense to build there.
  • Allow annotating which UART devices go with which UART-as-defined-so-far (i.e., pair of TX/RX pins). See comment there -- at some point, this could be automated.
  • Finally, UARTs get exposed to Ariel. Conveniently, this change does not need to lockstep with Ariel, because as long as no devices declare their MCU periph, nothing gets gen'd

Some usages of the generated files are not as standalone Rust files but
run through `include!()`, and doc comments do not work there.
This reverts some of the late changes to [57] because they would not
work for inlined files.

[57]: #57 (comment)
The WIP macros are being adjusted to the macro looking more array-like.
chrysn added a commit to chrysn-pull-requests/ariel-os that referenced this pull request Dec 9, 2025
Branch from ariel-os/sbd#68 -- applying only the
UART relevant changes.
chrysn added a commit to chrysn-pull-requests/ariel-os that referenced this pull request Dec 9, 2025
Branch from ariel-os/sbd#68 -- applying only the
UART relevant changes.
chrysn added a commit to chrysn-pull-requests/ariel-os that referenced this pull request Dec 11, 2025
Branch from ariel-os/sbd#68 -- applying only the
UART relevant changes.
@chrysn chrysn requested a review from kaspar030 December 11, 2025 18:02
chrysn added a commit to chrysn-pull-requests/ariel-os that referenced this pull request Dec 17, 2025
Branch from ariel-os/sbd#68 -- applying only the
UART relevant changes.
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.

2 participants