Skip to content

Initialize dev-mcxa platform#12

Merged
tullom merged 9 commits into
OpenDevicePartnership:mainfrom
tullom:init-dev-mcxa
May 12, 2026
Merged

Initialize dev-mcxa platform#12
tullom merged 9 commits into
OpenDevicePartnership:mainfrom
tullom:init-dev-mcxa

Conversation

@tullom
Copy link
Copy Markdown
Contributor

@tullom tullom commented May 5, 2026

  • Add Cargo.toml for the dev-mcxa platform with dependencies for cortex-m, defmt, and embassy.
  • Create build.rs to manage memory.x file for linker.
  • Add VSCode workspace configuration for the dev-mcxa project.
  • Implement Board struct for UART communication using embassy-mcxa.
  • Create main.rs to initialize the platform and spawn UART service task.
  • Implement UartAdapter to bridge embedded-io-async traits for UART communication.

- Add Cargo.toml for the dev-mcxa platform with dependencies for cortex-m, defmt, and embassy.
- Create build.rs to manage memory.x file for linker.
- Add VSCode workspace configuration for the dev-mcxa project.
- Implement Board struct for UART communication using embassy-mcxa.
- Create main.rs to initialize the platform and spawn UART service task.
- Implement UartAdapter to bridge embedded-io-async traits for UART communication.
@tullom tullom self-assigned this May 5, 2026
Copilot AI review requested due to automatic review settings May 5, 2026 20:23
@tullom tullom requested a review from a team as a code owner May 5, 2026 20:23
@tullom tullom added the enhancement New feature or request label May 5, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Cargo Vet Audit Passed

cargo vet has passed in this PR. No new unvetted dependencies were found.

Copy link
Copy Markdown

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 brings up a new standalone platform/dev-mcxa firmware target so the codebase can run the existing mock ODP UART path on an MCXA-based board, alongside the existing dev platform crates.

Changes:

  • Adds a new dev-mcxa crate with target-specific Cargo, linker, and runner configuration.
  • Implements minimal board bring-up plus a UART adapter so embassy-mcxa can drive the existing uart-service.
  • Adds editor configuration so the new platform can be opened and checked from VS Code/rust-analyzer.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
platform/dev-mcxa/src/uart_adapter.rs Bridges embassy-mcxa UART APIs to the older embedded-io-async traits used by uart-service.
platform/dev-mcxa/src/main.rs Adds the MCXA executor entrypoint, clock setup, mock relay init, and UART task spawn.
platform/dev-mcxa/src/board.rs Defines the board-level UART peripheral initialization and pin wiring.
platform/dev-mcxa/memory.x Declares the MCXA flash/RAM linker layout.
platform/dev-mcxa/dev-mcxa.code-workspace Adds a per-platform VS Code workspace.
platform/dev-mcxa/Cargo.toml Introduces the new standalone platform manifest and dependencies.
platform/dev-mcxa/Cargo.lock Locks the dependency graph for the new platform crate.
platform/dev-mcxa/build.rs Copies memory.x into OUT_DIR for linking.
platform/dev-mcxa/.cargo/config.toml Configures the build target, linker flags, and probe-rs runner.
.vscode/settings.json Registers the new platform manifest with shared rust-analyzer settings.

Comment thread platform/dev-mcxa/Cargo.toml
Comment thread platform/dev-mcxa/src/board.rs Outdated
Comment thread platform/dev-mcxa/src/uart_adapter.rs Outdated
Comment thread platform/dev-mcxa/src/main.rs Outdated
Comment thread platform/dev-mcxa/src/uart_adapter.rs Outdated
Comment thread platform/dev-mcxa/Cargo.toml
Comment thread platform/dev-mcxa/Cargo.toml Outdated
Comment thread platform/dev-mcxa/memory.x Outdated
Comment thread platform/dev-mcxa/src/uart_adapter.rs
Comment thread platform/dev-mcxa/src/board.rs Outdated
tullom added 2 commits May 5, 2026 17:13
- Updated embassy dependencies in Cargo.toml to pin to a specific git hash.
- Increased RAM size in memory.x from 128K to 244K.
- Refactored UART to use BBQ with DMA support.
- Added clocks.rs for clock configuration management.
- Adjusted main.rs to utilize the new clock configuration.
Copy link
Copy Markdown

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

Copilot reviewed 17 out of 19 changed files in this pull request and generated 4 comments.

Comment thread platform/dev-mcxa/src/board.rs
Comment thread platform/dev-mcxa/supply-chain/config.toml
Comment thread .github/workflows/check.yml
Comment thread .github/workflows/cargo-vet.yml
Copy link
Copy Markdown
Contributor

@kurtjd kurtjd left a comment

Choose a reason for hiding this comment

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

Looks good, thanks! This was validated against the ec-test-tui I'm guessing?

Though you'll need to update the root README.md, docs/supply-chain.md and scripts/check-all.sh with the new platform name.

Comment thread platform/dev-mcxa/src/main.rs Outdated
Comment thread platform/dev-mcxa/Cargo.toml Outdated
Comment thread platform/dev-mcxa/Cargo.toml Outdated
Comment thread platform/dev-mcxa/src/uart_adapter.rs
@tullom tullom force-pushed the init-dev-mcxa branch 2 times, most recently from dc1b58f to 26195d5 Compare May 12, 2026 03:30
Now that dev-mcxa builds cleanly, treat it like the other dev-*
targets across CI and docs.

- Add dev-mcxa to scripts/check-all.sh and mention it in README.md
  and docs/supply-chain.md
- Enable the standard deny lints and bump to edition 2024
- Alias embedded-io{,-async} 0.6 and 0.7 as distinct packages and
  switch the LPUART adapter to the 0.6 traits required by
  uart-service
- Drop the 3 s startup delay and tidy clocks.rs imports
@tullom tullom requested review from felipebalbi and kurtjd May 12, 2026 03:39
kurtjd
kurtjd previously approved these changes May 12, 2026
Comment thread README.md Outdated
Comment thread platform/dev-mcxa/src/main.rs
Comment thread platform/dev-mcxa/memory.x Outdated
Comment thread docs/supply-chain.md Outdated
@tullom tullom requested review from jerrysxie and kurtjd May 12, 2026 16:55
@felipebalbi felipebalbi dismissed jerrysxie’s stale review May 12, 2026 17:30

embassy-executor changed behavior since RT6xx.

@tullom tullom merged commit 028f621 into OpenDevicePartnership:main May 12, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cargo vet enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants