Internal experiment: Generate SVDs from internal CSVs in esp-pacs, avoiding internal tools - #475
Merged
Merged
Conversation
burrbull
reviewed
Jul 30, 2026
| write_cpu(&mut out, chip); | ||
| write_peripherals(&mut out, fragment); | ||
|
|
||
| writeln!(out, "</device>").unwrap(); |
Contributor
There was a problem hiding this comment.
What reason of manual text writing instead of svd-encode?
Member
Author
There was a problem hiding this comment.
Hello!
As I said in the PR description, the parsing section is almost completely written by AI and might need a bit of a cleanup in the near future. But also, to be completely fair and I might be wrong here, feel free to disagree with me, but I’m fine with a bit messy/AI-looking generator code, which will also be used exclusively by the team members (as internal CSVs are confidential), as long as the SVD output is correct, we're unlikely to change that code very often.
playfulFence
marked this pull request as ready for review
August 5, 2026 12:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
For now, I have no intention to merge this, it's more like "look, this is possible", feel free to experiment with it (I think @bugadani will be happy to do so 😄 )
With a change like this, I'm aiming to
A) centralize the entire process of creating a PAC for new chips in esp-pacs
B) make the toolset for this to be completely written in Rust, previous internal tools were written in Python, required a lot of dancing around venv and "ew" was the most frequent reaction on working with it 😅
The CSV-parsing part entirely is a product of AI development, code might need to get cleaned up, but again, this is a "blueprint" of a potential future change.
Trying it
--interruptsand--reg-baseare required. This allows to reduce the noise without hugeymls that are written based on these idf headers anyway. Register layouts still come from the GDVS CSV pack. That combination already produces a very close "clone" of what we currently get from internal tools for the base SVD.