Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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