Skip to content

Am I using generate_svd.py correctly? #15

@U007D

Description

@U007D

When I run ./generate_svd.py -d ~/Development/3rd_party/torvalds/linux/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts -o ../sifive-unleashed.svd (https://github.com/torvalds/linux.git repo master branch).

the tool rejects the # from #include on line 4:

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 88), (line:4, col:1)

I'm new to these tools--any tips?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions