Skip to content

Update MCXA metapac to work with newer toolchain#77

Merged
Wassasin merged 46 commits intoembassy-rs:mainfrom
Wassasin:mcxa-metapac-update
Apr 20, 2026
Merged

Update MCXA metapac to work with newer toolchain#77
Wassasin merged 46 commits intoembassy-rs:mainfrom
Wassasin:mcxa-metapac-update

Conversation

@Wassasin
Copy link
Copy Markdown
Contributor

@Wassasin Wassasin commented Apr 9, 2026

Requires #69 to be merged first.

The transforms have been been kept up to date with the manual changes to the metapac. Furthermore, some metapac files do not have the correct casing for the various fields. This PR intends to remedy that.

Will cause breaking changes necessitating HAL fixes. Most notably enum variants are now PascalCase.

TODO

Comment thread generator/src/commands/generate.rs
Comment thread generator/src/lib.rs
ChipDescription { chip: "LPC55S16", metadata: Some("LPC55S16"), cores: &["LPC55S16"], metapac: false },
ChipDescription { chip: "LPC55S69", metadata: Some("LPC55S6x"), cores: &["LPC55S69_cm33_core0", "LPC55S69_cm33_core1"], metapac: false },
ChipDescription { chip: "MCXN947", metadata: None, cores: &["MCXN947_cm33_core0", "MCXN947_cm33_core1"], metapac: false },
ChipDescription { chip: "MCXA256", metadata: Some("MCXA2xx"), cores: &["MCXA256"], metapac: true },
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've been thinking about this. Technically, MCXA256 is one of the smaller variants. Should we move to the 266 SVD instead? According to the datasheet , the 266 has more uarts, more CAN, has the Segment LCD controller, and can lock the CPU at 240MHz.

It looks like, at some point, the PAC should learn about more variants of the MCXA family. Maybe not worth looking at it right now, but we should probably revisit this in the future.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Doesn't matter that much in the end as long as the metadata is correct.

The metadata can work for multiple chips, but that's not really used yet.
Every peripheral can have an only_in field with regex, so it only applies to a subset of the chips.
But that's unused currently

Comment thread generator/README.md
## Updating

The chips supported by this project are defined in [`lib.rs`](/generator/src/lib.rs).
The SVDs can be selected from the submodule in `data/mcux-soc-svd`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think, at some point, it might also be worth removing the submodule and teaching the generator to download the latest release ZIP archive.

We would probably want to also (originally suggested by @diondokter) split the generated crate out to its own repository.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I would at least want to pin the SVD to a specific version.

@Wassasin Wassasin force-pushed the mcxa-metapac-update branch 2 times, most recently from 739b82d to f188932 Compare April 13, 2026 14:15
@Wassasin Wassasin force-pushed the mcxa-metapac-update branch from 1b32c72 to aa1f6fa Compare April 14, 2026 11:56
@Wassasin Wassasin marked this pull request as ready for review April 20, 2026 11:52
@Wassasin Wassasin merged commit be247eb into embassy-rs:main Apr 20, 2026
13 checks passed
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