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

GD32: xml.etree.ElementTree.ParseError: The processing instruction target matching "[xX][mM][lL]" is not allowed. #16

Open
xobs opened this issue Jan 18, 2023 · 1 comment

Comments

@xobs
Copy link

xobs commented Jan 18, 2023

The attached SVD file fails to load:

Traceback (most recent call last):
  File "C:\Users\smcro\Software\SVD-Loader-Ghidra\SVD-Loader.py", line 62, in <module>
    parser = SVDParser.for_xml_file(str(svd_file))
  File "C:\Users\smcro\Software\SVD-Loader-Ghidra\cmsis_svd\parser.py", line 72, in for_xml_file
    return cls(ET.parse(path), remove_reserved)
  File "C:\Users\smcro\Software\ghidra_10.2.2_PUBLIC\Ghidra\Features\Python\data\jython-2.7.3\Lib\xml\etree\ElementTree.py", line 1184, in parse
    tree.parse(source, parser)
  File "C:\Users\smcro\Software\ghidra_10.2.2_PUBLIC\Ghidra\Features\Python\data\jython-2.7.3\Lib\xml\etree\ElementTree.py", line 657, in parse
    self._root = parser.close()
  File "C:\Users\smcro\Software\ghidra_10.2.2_PUBLIC\Ghidra\Features\Python\data\jython-2.7.3\Lib\xml\etree\ElementTree.py", line 1667, in close
    self._raiseerror(v)
  File "C:\Users\smcro\Software\ghidra_10.2.2_PUBLIC\Ghidra\Features\Python\data\jython-2.7.3\Lib\xml\etree\ElementTree.py", line 1519, in _raiseerror
    raise err
  File "<string>", line None
xml.etree.ElementTree.ParseError: The processing instruction target matching "[xX][mM][lL]" is not allowed.
SVD-Loader.py> Finished!

GD32F4xx.zip

@xobs
Copy link
Author

xobs commented Jan 18, 2023

Note: This is fixed if I modify the .svd file and remove two spaces that appeared at the top.

This file is straight from the vendor, so this script probably ought to be able to eat this kind of file.

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

1 participant