A => .gitignore +3 -0
@@ 1,3 @@
+/env/
+__pycache__/
+svdg.egg-info/
A => README.md +2 -0
@@ 1,2 @@
+# svdg
+Generate register map C headers from SVD files
A => requirements.txt +3 -0
@@ 1,3 @@
+jinja2
+cmsis-svd
+click
A => setup.cfg +44 -0
@@ 1,44 @@
+[metadata]
+name = svdg
+author = Kalyan Sriram
+author_email = kalyan@coderkalyan.com
+url = https://coderkalyan.com
+description = Generate register map headers from SVD using Jinja2 templates.
+long_description = file: README.md
+long_description_content_type = text/markdown
+license = MIT
+license_file = LICENSE
+keywords = svd, codegen,
+classifiers =
+ Development Status :: 3 - Alpha
+ Environment :: Console
+ Intended Audience :: Developers
+ License :: OSI Approved :: MIT License
+ Programming Language :: Python
+ Programming Language :: Python :: 3
+ Programming Language :: Python :: 3.5
+ Programming Language :: Python :: 3.6
+ Programming Language :: Python :: 3.7
+ Programming Language :: Python :: 3.8
+ Programming Language :: Python :: 3.9
+ Programming Language :: Python :: 3 :: Only
+ Topic :: Scientific/Engineering
+ Topic :: Software Development :: Embedded Systems
+ Topic :: Software Development :: Libraries
+ Topic :: Software Development :: Code Generators
+ Topic :: Software Development :: Build Tools
+
+[options]
+packages=find:
+install_requires=
+ jinja2
+ cmsis-svd
+ click
+
+zip_safe = False
+
+python_requires = >=3.5
+
+[options.entry_points]
+console_scripts =
+ svdg = svdg.__main__:main
A => setup.py +16 -0
@@ 1,16 @@
+import sys
+import setuptools
+
+from typing import Dict
+
+if int(setuptools.__version__.split('.')[0]) < 30:
+ print('A newer version of setuptools is required. The current version does not support declarative config.',
+ file=sys.stderr)
+ sys.exit(1)
+
+version = {} # type: Dict
+with open('svdg/version.py') as fp:
+ exec(fp.read(), version)
+
+setuptools.setup(version=version['__version__'],
+ package_data={'': ['*.j2', '*.h']})
A => svdg/__main__.py +10 -0
@@ 1,10 @@
+import click
+
+
+@click.command()
+def main():
+ click.echo("Hi")
+
+
+if __name__ == "__main__":
+ main()
A => svdg/version.py +5 -0
@@ 1,5 @@
+"""
+.. autodata:: __version__
+"""
+
+__version__ = "0.0.1"