-
Notifications
You must be signed in to change notification settings - Fork 243
Update STM32H7 SVDs and add H73X/H72X device family #554
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
Conversation
This actually works locally, being sure to use the same tool versions. Not sure what's up with CI. Need to decide how to separate the new device family parts. |
Also I remember when diffing the mmaps there were some regressions. Probably have to add some of the patches back but with pieces removed. |
I've started reviewing this for the existing sub-families, and the new SVDs are certainly an improvement. RM0399: A few improvements and I only spotted one regression (extra fields in DBGMCU.CR) RM0433: More extensive changes, but always improvements I think. Doesn't seem to affect anything in the HAL. RM0455: Again more extensive changes. There are many renames in RCC/PWR like |
Modifying these fields appears to cause undefined/undocumented behavior, so better that we don't include them in the PAC Ref: stm32-rs/stm32h7xx-hal#7 (comment)
The registers and fields match, but for the most part ours has better documentation
There's many case of renames like D3 -> SRD and D1/D2 -> CD, handle these with new match options Requires rust-embedded/svdtools#57 for _clear statements
Yes, I was wondering what to do about the D3->SRD rename. I could tolerate it a bit more if all their newer parts started using that nomenclature but this is unfortunate. I hadn't paid attention to the Sorry, I had to rant. |
It is really strange that they've made the D3->SRD rename for the RM0455 sub-family but not for the (presumably newer) H73X/H72X parts. Just one of those mysteries I guess.. I completely understand the rant, I guess someone at ST had the bright idea to add |
The CI is failing because the Compare mmaps job only uses the |
Unfortunately the restriction is a security one: the CI job for comparing mmaps needs access to repo secrets to know the key to push to the mmaps repo and to leave a comment on the PR, and so we can't allow it to execute arbitrary code from a PR. However, to extract the SVDs requires running the extract script (which is changed in this PR, for instance). That's why it just copies the YAML files and not the Makefile or SVDs from the PR. Changing the workflow file in the PR won't help either: PRs with I think it could be possible to split the workflow in two steps; the first runs as a normal Of course, it's still possible to run the mmap comparison locally too, following the same steps as the CI job. |
This reverts commit 6ef33c6.
That makes complete sense, and I was half expecting that modifying the workflow file in the PR would be disallowed. Running the mmap comparison locally works well of course, but where possible having them automatically linked on the PR is rather nice |
Here are the current mmap diffs as of c8436d9: https://gist.github.com/mattico/378af521ca39ebf41a324a5c8c40613c |
Checked by building the HAL against it, which touches most of these fields
We still have the rather unfortunate situation that ADC3 is derived from ADC1, when in fact the ADC3 registers described in the RM are quite different.
52fdd17
to
c9ad2cc
Compare
The SVD contains multiple definitions of identical register blocks. Derive them instead. Carefully re-create all the mixed-up interrupts.
I can now successfully build the HAL against this PR, so I'm removing the draft status. |
I'm not sure how best to review this, since even going through the mmap diffs by hand is not really feasible. Being able to build the HAL gives some confidence, but I'm sure there are still errors. Perhaps it's worth focusing on the core peripherals (RCC, PWR, SYSCFG) and accepting that errors elsewhere can be fixed by additional PRs. |
Yea, agreed. It's not like we were sure there were zero errors previously anyway. |
I finished reviewing the RCC, PWR and SYSCFG peripherals on a sample of existing parts:
Therefore I think this PR is ready to merge! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks @mattico and @richardeoin!
bors merge
235: Add support for STM32H725/735 parts r=richardeoin a=richardeoin Reference Manual is RM0468 Ref #163 - [x] Updates to support STM32H725/735 parts - [x] Successfully build examples - [x] At least one example for these parts specifically - _examples/ethernet-rtic-stm32h735g-dk.rs_ - [x] Fix other breakages from stm32-rs/stm32-rs#554 - [x] Remove dependency on nightly PAC build Co-authored-by: Richard Meadows <962920+richardeoin@users.noreply.github.com>
WIP due to the large number of changes in the SVD files.