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

Move heavylifting to the user, relief us from updating over 40k files #23

Closed
michalfita opened this issue Jul 26, 2022 · 5 comments
Closed
Labels
enhancement New feature or request

Comments

@michalfita
Copy link
Collaborator

michalfita commented Jul 26, 2022

As suggested by @tmplt in #21, this is about harnessing power of build.rs to manage PAC crates.

@michalfita
Copy link
Collaborator Author

@tmplt I have good news: I've hacked my way to get PAC crate where build.rs handles generation via svd2rust. Some long standing unresolved problems in Rust itself stand in opposition to do it in a clean way, but in overall this works with some tradeoffs:

  • All attributes have to be in the static src/lib.rs, so cannot be generated by the tool; there's flag controlling this, so not a big deal apart keeping eye if that changes in the future.
  • Regardless of the flag svd2rust leaves #![doc = ...] attribute in the generated ${OUT}/lib.rs what causes error on inclusion; the workaround is to filter that out from the output, what's memory inefficient.

I'll work on this more and PR some draft, but for now I need to move back to issues that require closing ASAP.

michalfita added a commit that referenced this issue Oct 26, 2022
michalfita added a commit that referenced this issue Oct 26, 2022
@michalfita
Copy link
Collaborator Author

It took some time, but most things seem to be in place. I've published some alpha releases, if anyone is willing to test using them from crates.io. FYI @tmplt

BTW. I've noticed atsam-rs now publish PACs for SAME70 with -pac suffix. I wonder if that competition makes any sense.

@tmplt
Copy link
Member

tmplt commented Feb 24, 2023 via email

@michalfita
Copy link
Collaborator Author

Looks like a side-effect of other PAC generation.

They responded to my request.

I'll take a look once a PR is ready.

That's going to be separate repository (actually is, but not publicized yet).

@michalfita
Copy link
Collaborator Author

This is addressed in atsamx7x-pac repository and issue #56 / PR #61.

@michalfita michalfita added the enhancement New feature or request label Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants