{"id":20140277,"url":"https://github.com/outpost-os/python-svd2json","last_synced_at":"2026-01-28T06:03:49.845Z","repository":{"id":247972800,"uuid":"827378593","full_name":"outpost-os/python-svd2json","owner":"outpost-os","description":" CMSIS SVD file to JSON converter for code generation","archived":false,"fork":false,"pushed_at":"2024-09-26T11:21:46.000Z","size":60,"stargazers_count":0,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T20:23:15.482Z","etag":null,"topics":["cmsis","python","svd"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/outpost-os.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-11T14:37:43.000Z","updated_at":"2024-09-26T11:21:50.000Z","dependencies_parsed_at":"2024-07-15T11:31:01.564Z","dependency_job_id":null,"html_url":"https://github.com/outpost-os/python-svd2json","commit_stats":null,"previous_names":["outpost-os/python-svd2json"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outpost-os%2Fpython-svd2json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outpost-os%2Fpython-svd2json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outpost-os%2Fpython-svd2json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outpost-os%2Fpython-svd2json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/outpost-os","download_url":"https://codeload.github.com/outpost-os/python-svd2json/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248085997,"owners_count":21045249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmsis","python","svd"],"created_at":"2024-11-13T21:49:59.253Z","updated_at":"2026-01-28T06:03:49.776Z","avatar_url":"https://github.com/outpost-os.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nSPDX-FileCopyrightText: 2024 Ledger SAS\nSPDX-License-Identifier: Apache-2.0\n--\u003e\n\n[![REUSE status](https://api.reuse.software/badge/github.com/outpost-os/python-svd2json)](https://api.reuse.software/info/github.com/outpost-os/python-Rsvd2json)\n\n![PyPI - Version](https://img.shields.io/pypi/v/svd2json)\n![PyPI - License](https://img.shields.io/pypi/l/svd2json)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/svd2json)\n\n[![codecov](https://codecov.io/gh/outpost-os/python-svd2json/graph/badge.svg?token=H6VZ47MTRN)](https://codecov.io/gh/outpost-os/python-svd2json)\n![lint](https://github.com/outpost-os/python-svd2json/actions/workflows/lint.yml/badge.svg)\n![unittest](https://github.com/outpost-os/python-svd2json/actions/workflows/unittest.yml/badge.svg)\n![doc](https://github.com/outpost-os/python-svd2json/actions/workflows/doc.yml/badge.svg)\n![quality](https://github.com/outpost-os/python-svd2json/actions/workflows/quality.yml/badge.svg)\n\n# Python svd2json package\n\nThis package converts a [CMSIS SVD (System View Description)](https://arm-software.github.io/CMSIS_5/SVD/html/index.html) file into a more friendly JSon format than raw XML to JSon conversion.\nThe aim of this package is to ease code generation from SVD file. We state that JSon format is the\nbest suitable for this purpose. For instance, it can be used as-is in Jinja2 template processing.\n\n## JSon format\n\nThe resulting JSon `root` node is the `device` node in SVD.\nXML values are converted to equivalent JSon ones.\n\n\u003e **_NOTE:_** Some SVD files might be inconsistent in peripherals and/or registers naming convention across devices or in a single SVD file. E.g. only few registers are prefixed by peripheral name but no others, you can optionally trim this prefix in order to keep code generation as simple as possible and reusable among a wide range of devices/mcu. !!ADD REF!!\n\nAn Additional `interrupts` is added in the resulting JSon which collects all interrupts declared across all peripherals. This can ease, for instance, `VTOR` table generation, one only has to walk through this array.\n\n## Script\nThis package exports the following script:\n### svd2json\n```console\n$ svd2json --help\nusage: svd2json [-h] -s SVD output\n\nconvert svd file to json\n\npositional arguments:\n  output             output filename\n\noptions:\n  -h, --help         show this help message and exit\n  -s SVD, --svd SVD  SVD file to convert\n```\n\n## How to ...\nThis package follows PEP517/518/621 for its build system using a single `pyproject.toml` file and `setuptools` with dynamic versioning as build-backend. Unit testing, linting etc. are done with `tox`.\nThe minimal python version is Python 3.10.\n\n#### Build\nOne can use any python build front-end. E.g. with [PyPA `build` front-end](https://github.com/pypa/build) :\n\n```console\npython -m build\n```\n\n#### Lint\nThis package is linted by [`black`](https://black.readthedocs.io/en/stable/) and [`flake8`](https://flake8.pycqa.org/en/latest/). In case of conflict between those two linter, we choose to follow `black` rules by default as it is closer to `PEP8` than `flake8`.\n\n```console\ntox -e lint\n```\n\n#### Type check\nType checking is done with [mypy](https://mypy-lang.org/) with a python 3.10+ syntax.\n\n```console\ntox -e type\n```\n\n#### License check\nPackage license(s) can be checked using [reuse](https://reuse.software/).\n\n```\ntox -e licenses\n```\n\n#### Doc\nDocumentation is generated using [`Sphinx`](https://www.sphinx-doc.org/en/master/index.html) and using\nthe [numpy style](https://numpydoc.readthedocs.io/en/latest/format.html) for pythondoc with [napoleon extension](https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html).\n\n```console\ntox -e docs\n```\n\n#### Unit tests\nPackage Unit tests are based on `pytest` with coverage support.\n\n```console\ntox -e unittests\ntox -e htmlcov\n```\n\n## License\nLicensed under Apache-2.0\n\n\u003e see [LICENSE](LICENSES/Apache-2.0.txt) file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutpost-os%2Fpython-svd2json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foutpost-os%2Fpython-svd2json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutpost-os%2Fpython-svd2json/lists"}