Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PAC for SAMC21J, built on demand #665

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

jboynes
Copy link
Contributor

@jboynes jboynes commented Jan 14, 2023

Summary

This is a WIP, poking at generating the PAC directly from the SVD at build time. The idea here was to decouple the PACs from each other, making it easier to add new devices and to update them individually if new versions come out.

This relies on the current version of svd2rust, 0.28, which exposes the generation APIs allowing it to be called from the build.rs script. The SVD is still patched using XSLT before generation, and there is a little post-processing needed to deal with inner attributes in the generated code.

The build script seems to work but could use some improvement. I think it would be possible to publish as its own crate so that it could be reused across PACs.

There were some changes in svd2rust 0.28 that introduced a dependency on critical-section which brought in other issues. I've tested this on a dev board to the extent a simple blinky works. Due to the changes in the PAC API more work would be needed to integrate with the HAL.

Posting here for feedback.
Thanks

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.

1 participant