Skip to content

Replace flexSPI IP interface with ROM API - #61

Merged
felipebalbi merged 3 commits into
OpenDevicePartnership:mcxa-secure-bootfrom
alamfarjadf:flexspi
Oct 28, 2026
Merged

felipebalbi merged 3 commits into
OpenDevicePartnership:mcxa-secure-bootfrom
alamfarjadf:flexspi

Conversation

@alamfarjadf

Copy link
Copy Markdown

Hopefully the last functional PR for MCXA.

Replaces the existing flexSPI IP interface (which has confusing IP offsets) with @felipebalbi's new ROM API interface from Embassy-mcxa.

PR 7249

Init, read and write interfaces updated with new_with_options, partial_read and partial_program.

Keeps speed and settings at safe minimums for maximum compatibility (performance concern is limited since we are only reading few journal bytes/updating them). Validated on WB/MX chips.

Tested as working on both EVK (port A) and target (port B).

@jerrysxie
jerrysxie requested review from JamesHuard and felipebalbi and a balanced review from Copilot October 27, 2026 00:49
@jerrysxie jerrysxie added this to EC Oct 27, 2026
@jerrysxie jerrysxie moved this to In Progress in EC Oct 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Boot-critical ROM initialization needs hardware-focused human review, including resolution of the clock-source selection issue.

1 open issue
What changed in this PR

Replaces the MCXA bootloader’s direct FlexSPI interface with Embassy’s ROM-backed NOR driver for external flash and boot-journal persistence.

Changes:

  • Uses ROM-based flash probing, initialization, reads, erases, and page-split partial programming.
  • Preserves Port A/Port B board support and removes the legacy self-test probe.
  • Updates Embassy revisions and lockfiles in the library and example workspaces.
File Description
libs/​ec-slimloader-mcxa/​src/​board.rs Migrates external flash operations and initialization to the ROM API.
libs/​ec-slimloader-mcxa/​Cargo.toml Removes the flexspi-selftest feature.
libs/​Cargo.toml Updates Embassy dependency revisions.
libs/​Cargo.lock Records updated library dependencies.
examples/​mcxa-577app/​Cargo.toml Aligns example Embassy revisions with the library.
examples/​mcxa-577app/​Cargo.lock Records updated example dependencies.

Review effort: Balanced

Comment thread libs/ec-slimloader-mcxa/src/board.rs Outdated
Comment thread libs/ec-slimloader-mcxa/src/board.rs Outdated
Comment thread libs/ec-slimloader-mcxa/src/board.rs Outdated
Comment thread libs/ec-slimloader-mcxa/src/board.rs Outdated
Comment thread libs/ec-slimloader-mcxa/src/board.rs Outdated
Comment thread libs/ec-slimloader-mcxa/src/board.rs Outdated
Comment thread libs/ec-slimloader-mcxa/src/board.rs
Comment thread libs/ec-slimloader-mcxa/src/board.rs
@felipebalbi
felipebalbi merged commit 7ca7797 into OpenDevicePartnership:mcxa-secure-boot Oct 28, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in EC Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants