I have applied the linux/patches
to the latest in linux.git
master as of yesterday–a good many of the changes were already there, which was nice to see.
I am assuming I don’t also need to apply the u-boot
patches in order to have a usable .svd
description of the device, can anyone confirm?
I am using GitHub - sifive/cmsis-svd-generator: Generates CMSIS-SVD xml files from DTS info and Register templates on the resulting .dts
file at /arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
as follows:
./generate_svd.py -d ~/Development/3rd_party/torvalds/linux/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts -o ../sifive-unmatched
But am getting an error:
Traceback (most recent call last):
File "/Users/sergibli/Development/bg/sifive-riscv/cmsis-svd-generator/./generate_svd.py", line 139, in <module>
main(sys.argv[1:])
File "/Users/sergibli/Development/bg/sifive-riscv/cmsis-svd-generator/./generate_svd.py", line 132, in main
dts = pydevicetree.Devicetree.parseFile(parsed_args.dts, followIncludes=True)
File "/Users/sergibli/Library/Python/3.9/lib/python/site-packages/pydevicetree/ast/node.py", line 468, in parseFile
return parseTree(contents, dirname, followIncludes)
File "/Users/sergibli/Library/Python/3.9/lib/python/site-packages/pydevicetree/source/parser.py", line 185, in parseTree
return Devicetree(parseElements(dts, pwd, followIncludes))
File "/Users/sergibli/Library/Python/3.9/lib/python/site-packages/pydevicetree/source/parser.py", line 177, in parseElements
elements = grammar.devicetree.parseString(dts, parseAll=True)
File "/usr/local/lib/python3.9/site-packages/pyparsing.py", line 1955, in parseString
raise exc
File "/usr/local/lib/python3.9/site-packages/pyparsing.py", line 3814, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pyparsing.ParseException: Expected end of text, found '#' (at char 83), (line:4, col:1)
▶ head -20 ~/Development/3rd_party/torvalds/linux/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/* Copyright (c) 2020 SiFive, Inc */
#include "fu740-c000.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pwm/pwm.h>
/* Clock frequency (in Hz) of the PCB crystal for rtcclk */
#define RTCCLK_FREQ 1000000
/ {
#address-cells = <2>;
#size-cells = <2>;
model = "SiFive HiFive Unmatched";
compatible = "sifive,hifive-unmatched-a00", "sifive,fu740-c000",
"sifive,fu740";
chosen {
Any ideas why generate_svd.py
is expecting an EOF where it’s receiving the first # from #include
?
Thanks in advance for any clues.