SVD files for Milk-V Duo 256M

I want to autogenerate peripheral access crates (PACs) in Rust for the the Duo 256M using a Rust tool which requires the SVD file. Where can I find it?

1 Like

There is a tool you can use to generate SVD files from Device Tree Blobs:

https://crates.io/crates/svd-generator

I tried it on the v2.0.1 release ( Release v2.0.1 · milkv-duo/duo-buildroot-sdk-v2 · GitHub ) dtb but it seems there is a lot of custom modules being used and the tool didn’t complete.

The Duo 256M is based on the SG2002. There is a board in the Linux kernel that has a device tree based on the same chip, the LicheeRV Nano B ( linux/arch/riscv/boot/dts/sophgo/sg2002-licheerv-nano-b.dts at v6.17 · torvalds/linux · GitHub )

I was able to use the svd-generator tool to create a SVD. I posted it here: LicheeRV Nano B / Duo 256M SVD ($4899529) · Snippets · GitLab

This should get you close, I don’t know the immediate differences in the board but they are all based around similar cores.

1 Like