-
Notifications
You must be signed in to change notification settings - Fork 4
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
failing to convert from JH7100 / VisionFive 1 DTS in U-Boot #16
Comments
Note: Similar to #15, it does work when I take the VisionFive DTS from Linux. However, the result is useless, almost empty: <?xml version="1.0" encoding="utf-8"?>
<device schemaVersion="1.3" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="CMSIS-SVD.xsd">
<name>StarFive VisionFive V1</name>
<version>0.1</version>
<description>From StarFive VisionFive V1,model device generator</description>
<addressUnitBits>8</addressUnitBits>
<width>32</width>
<size>32</size>
<access>read-write</access>
<peripherals>
</peripherals>
</device> |
@orangecms This tool is pretty specific to SiFive stuff, and looks up regmap SVD definitions based on the base name in DTS. Educated guess is that because the name in the DTS is "StarFive" and not "SiFive", none of the regmaps are found. The tool also looks up entries based on the Currently working on a fix to have this tool parse DTS for boards based on SiFive SoCs, and hopefully generalize to work with regmaps for non-SiFive based products. Probably going to mean manually, or some other way, building those regmap SVD files, and adding them to the lookup path. That DTS in your original post also doesn't contain a |
Ah, gotcha... So the tool is essentially only useful for peripherals it knows, and the StarFive ones are mostly not among them. :/
Oh cool, thank you!
Yea that makes sense. I wasn't that familiar with DT when I tried this. |
I also had better luck by running the C preprocessor over the DTS file before passing to
Still going to run into issues with DTS files used in Linux, since they seem to use the Edit: so, I got a little further with parsing: rmsyn/generalize-dts-parser It mostly works, and can generate a rough SVD from this DTS: Still working on |
Hi @rmsyn! Is there any progress with that? :) |
Helllo @grinux, there is progress. You can follow my current work in either the open PR: #19, or the fork branch I try to update similarly: https://github.com/rmsyn/cmsis-svd-generator/tree/dev Currently, I am debugging an issue with the generated You'll also probably need to edit some names in DTS files that may not be valid identifiers in whatever language you're building a peripheral access library (e.g. So, it works, but I'm still working out some errors. Most come from parsing spec sheets, and driver implementations in other projects. 😬 |
I'm trying to get an SVD from https://github.com/starfive-tech/u-boot/blob/07eac31890155be6005237cecdc1871d471c86c7/arch/riscv/dts/jh7100-visionfive.dts - failing in any of the following ways:
Passing the DTS to cmsis-svd-generator errors when facing the
#include
statements, yielding parser errors.So I tried preprocessing with
cpp
, which errors when encountering&
characters.So I compiled again to a flat tree using
dtc
, and then got parser errors again for the/
in the beginning already (/ {
is how a tree starts).For details, please see the Gist with more notes:
https://gist.github.com/orangecms/2d014eb3a21123b4da89d13f974f7c6b
The text was updated successfully, but these errors were encountered: