Closed 9names closed 3 years ago
Thank you @9names.
@saramonteiro @jessebraham PTAL
We should also include svd2rust validation as GitHub Action. IMHO dispatched GitHub Action should be sufficient. What's your opinion?
We used Actions for SVD validation for bl602-svd - might be a good starting point if you decide to go this way. https://github.com/pine64/bl602-svd/blob/main/.github/workflows/ci.yml
Hi @9names thank you very much for your report on this. We're in the very beginning of svd automatic generation and feedback is pretty welcome. I'll investigate the issue on our generator and submit a newer fixed version.
I have forked this repository and created a new branch where I have begun work on a verification workflow. This was inspired by the bl602-svd repository. It is configured to run only when manually dispatched.
SVDConv and xmllint are both used for verification. Both are allowed to run to completion rather than killing the workflow if/when warnings are generated. I'm not sure if both are necessary as xmllint
is already checking against the schema, but I am not very familiar with either tool so I will look into it a bit more. You can see a test run of these checks here.
I have since added a step which generates a Peripheral Access Crate (PAC) from the SVD using svd2rust, however this is currently failing due to some issues with the SVD. Manually making the required changes and running the script results in success on my local system.
Unfortunately since there is no Cargo.toml
file present in the repo we are unable to build the PAC, meaning there are potentially still issues that can sneak through the verification process. Replicating the full PAC here just for testing probably falls outside the scope of this repo, however.
If anybody has any feedback on this workflow please let me know!
@jessebraham it seems good.
I also have used python cmsis-svd package, which is also a parser.
I don't know which one fits better xmllint
.
Regarding SVDConv seems to be as convenient as svd2rust for checking the generated peripheral files.
The advantage of using SVDConv is that we can check many other other compliance that in the future
may be useful for debugging purpose when integrating it to Eclipse for example.
BTW, did you get to install the ARM::CMSIS Pack
?
This issue has been resolved in #4.
$ svd2rust --version svd2rust 0.19.0 ( )
$ svd2rust -i ESP32C3.xml [ERROR svd2rust] In device
ESP32C3