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

You are welcome to use this, if it helps #1

Closed
U007D opened this issue Jul 30, 2021 · 8 comments
Closed

You are welcome to use this, if it helps #1

U007D opened this issue Jul 30, 2021 · 8 comments

Comments

@U007D
Copy link

U007D commented Jul 30, 2021

I noticed this crate is empty.
FYI, I did some work to put an fu740-pac together in the spirit of the fu540-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.

@Disasm
Copy link
Member

Disasm commented Jul 30, 2021

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.

@Disasm
Copy link
Member

Disasm commented Jul 30, 2021

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.

@U007D
Copy link
Author

U007D commented Jul 31, 2021

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.

@U007D U007D closed this as completed Jul 31, 2021
@Disasm
Copy link
Member

Disasm commented Aug 1, 2021

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.

@U007D
Copy link
Author

U007D commented Aug 1, 2021

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)

@Disasm
Copy link
Member

Disasm commented Aug 1, 2021

You're using svd2rust v0.16.1, it's a bit outdated.

@U007D
Copy link
Author

U007D commented Aug 1, 2021

Whoops, thank you--And here I thought I had checked everything :)

@U007D
Copy link
Author

U007D commented Aug 1, 2021

Confirmed, on svd2rust v0.19.0, I'm seeing exactly the same thing as you.

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

No branches or pull requests

2 participants