Closed U007D closed 3 years ago
Oops, I missed that one! I also want to reuse the official SVD, but also patch it to rename all the peripherals and derive some of them. I will probably continue in this repo since it already contains working CI and correct license.
Added a patch and pushed the updated version to master. This SVD is still missing a few peripherals like PRCI, Ethernet and so on. I'm going to add these with svd patches.
I also want to reuse the official SVD, but also patch it to rename all the peripherals and derive some of them.
Sounds great! Lmk if I can help somehow. Happy to collab.
I will probably continue in this repo since it already contains working CI and correct license.
Then I will plan to switch over to your crate then. (As I am not a member of the riscv-rust
team, I felt it wouldn't be appropriate for me to just re-publish a 740 crate based on the risacv-rust team'sfu-540
crate's readme, crate authorship field, etc. wholesale.)
Note SiFive's fu740.svd
(mistakenly?) indicates the bus width as 32-bits (line 7 of https://github.com/riscv-rust/fu740-pac/blob/master/fu740.svd). You (probably) want to patch that line to 64. I've opened an upstream PR.
I fixed width
, but this didn't change generated code at all.
If you want to document/fix other peripherals, you may want to learn more about SVD patch format: https://github.com/stm32-rs/svdtools#device-and-peripheral-yaml-format.
When I pulled your lateat master
to make the same change to width
as you did, I noticed running update.sh
changed the peripheral names according to the patch file (I was expecting those name chages to have already been applied yo the source tree). Also, a great many lines of code did not get regenerated. Is this expected? Diff [here].(https://github.com/U007D/fu740-pac/pull/1)
You're using svd2rust v0.16.1, it's a bit outdated.
Whoops, thank you--And here I thought I had checked everything :)
Confirmed, on svd2rust v0.19.0
, I'm seeing exactly the same thing as you.
I noticed this crate is empty. FYI, I did some work to put an
fu740-pac
together in the spirit of thefu540-pac
https://github.com/U007D/fu740-pac. It is built from SiFive's fu740.svd
included in their freedom sdk.You are welcome to use it however you'd like if it helps putting together an official riscv-rust PAC.