Skip to content

feat: export UARTs to Ariel#68

Merged
kaspar030 merged 7 commits intomainfrom
has-host-art
Mar 26, 2026
Merged

feat: export UARTs to Ariel#68
kaspar030 merged 7 commits intomainfrom
has-host-art

Conversation

@chrysn
Copy link
Copy Markdown
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) [edit: dropped on reviewer request]
  • "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

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.
chrysn added a commit to chrysn-pull-requests/ariel-os that referenced this pull request Jan 14, 2026
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 Jan 14, 2026
Branch from ariel-os/sbd#68 -- applying only the
UART relevant changes.
@chrysn chrysn requested review from kaspar030 and removed request for kaspar030 January 14, 2026 13:25
@chrysn chrysn force-pushed the has-host-art branch 2 times, most recently from 49353aa to a586226 Compare February 19, 2026 12:17
@chrysn chrysn requested review from kaspar030 and removed request for kaspar030 February 19, 2026 12:19
@chrysn
Copy link
Copy Markdown
Member Author

chrysn commented Feb 19, 2026

Rebased, cleaned up, and added a test.

Now not based on the problematic #67 series any more.

Having this in (and ideally released) would make it practical to turn ariel-os/ariel-os#1613 into a reviewable state.

Copy link
Copy Markdown
Member

@ROMemories ROMemories left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't looked at the rest.

Comment thread crates/sbd-gen-schema/src/lib.rs
@chrysn chrysn requested a review from ROMemories February 22, 2026 21:28
chrysn added a commit to chrysn-pull-requests/ariel-os that referenced this pull request Feb 23, 2026
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 Feb 23, 2026
Branch from ariel-os/sbd#68 -- applying only the
UART relevant changes.
@kaspar030 kaspar030 changed the title Export UARTs to Ariel feat: export UARTs to Ariel Feb 26, 2026
Copy link
Copy Markdown
Member

@ROMemories ROMemories left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally I think we should have the matching implementation in Ariel OS before landing this.

Comment thread crates/sbd-gen/src/riot.rs Outdated
Comment thread crates/sbd-gen/src/ariel.rs
Comment thread crates/sbd-gen/src/ariel.rs
Comment thread crates/sbd-gen-schema/src/lib.rs Outdated
Comment thread crates/sbd-gen-schema/src/lib.rs
Comment thread crates/sbd-gen-schema/src/lib.rs
Comment thread crates/sbd-gen-schema/src/lib.rs Outdated
@chrysn chrysn requested a review from ROMemories March 3, 2026 16:40
@chrysn
Copy link
Copy Markdown
Member Author

chrysn commented Mar 3, 2026

Generally I think we should have the matching implementation in Ariel OS before landing this.

How? That'd be a chicken-and-egg situation. We can add code in Ariel OS, but that will have dead code until it is also added to the boards, and the boards can't have it until we update which sbd version it uses.

There is an open PR that uses it, ariel-os/ariel-os#1613, but that depends on this PR. I think that's the sensible sequence: PR here (done), test in Ariel in that PR (done), merge this, release sbd (it doesn't change output unless one does place the UARTs in the descriptions), merge the Ariel PR (including updated board files, so we never merge untested code).

@chrysn
Copy link
Copy Markdown
Member Author

chrysn commented Mar 25, 2026

Rebased onto main; I think all comments are addressed.

@chrysn chrysn requested review from ROMemories and removed request for ROMemories and kaspar030 March 25, 2026 11:22
@chrysn chrysn requested a review from kaspar030 March 25, 2026 11:22
///
/// [hard problem]: https://en.wikipedia.org/wiki/Boolean_satisfiability_problem
#[serde(default)]
pub possible_peripherals: Vec<String>,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, so this is clearly chip specific meta info. We'll have to move this there (at some point). Let's go with it for now.

@kaspar030 kaspar030 merged commit d0ff3df into main Mar 26, 2026
3 checks passed
@kaspar030 kaspar030 deleted the has-host-art branch March 26, 2026 13:31
@kaspar030
Copy link
Copy Markdown
Member

What's the next step? probably a version of ariel-os/ariel-os#1613 with just the uart 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.

3 participants