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

Generate pads from SVD #23

Merged
merged 4 commits into from
Nov 25, 2022
Merged

Generate pads from SVD #23

merged 4 commits into from
Nov 25, 2022

Conversation

mciantyre
Copy link
Member

@mciantyre mciantyre commented Jan 2, 2022

The PR proposes that we generate pad definitions from the SVD. We use a Python script to generate the pads, and we check in the code. The approach replaces the build script and code generation library that also generated the pads, but relied on human oversight instead of the SVD.

The PR includes new definitions for the 1060 and 1010 pads. I only tested with this crate's test suite. It should be API compatible with the code that was previously generated. I'll move this out of draft once I can test a bit on my 1060 hardware.

The PR enables the tests introduced in #21. It fixes #11.

Python made it easy to prototype and implement. We could also consider re-using parts of the build script library; we would need an XML / SVD parser, and to re-think the data structures that the codegen uses.

@mciantyre mciantyre linked an issue Jan 2, 2022 that may be closed by this pull request
@mciantyre
Copy link
Member Author

Depends on #22.

Comment on lines +2152 to +2153
pub gpio_spi_b0: gpio_spi_b0::Pads,
pub gpio_spi_b1: gpio_spi_b1::Pads,
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that the 1060 has two new pad groups. I've not found direct mention of these pads in the 1060 reference manual, but they seem to be in the SVDs.

Base automatically changed from const-generic-padd-address to master January 2, 2022 23:01
@mciantyre mciantyre marked this pull request as ready for review November 2, 2022 15:22
@mciantyre
Copy link
Member Author

I'll move this out of draft once I can test a bit on my 1060 hardware.

Tested throughout the 0.5 HAL development.

All tests pass, so the new implementation appears to be API compatible.
Generate pad definitions from the SVDs using iomuxc.py.
Demonstrates the fix for the backwards 1010 pads. The tests now run all
the time, and they pass.
@mciantyre mciantyre merged commit ceefcf4 into master Nov 25, 2022
@mciantyre mciantyre deleted the iomuxc-from-svd branch November 25, 2022 18:34
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.

1010 pads defined backwards, and have extra pads
1 participant