{ "info": { "author": "Paul Osborne", "author_email": "osbpau@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Topic :: Software Development :: Code Generators", "Topic :: Software Development :: Embedded Systems", "Topic :: System :: Boot :: Init", "Topic :: System :: Hardware", "Topic :: System :: Hardware :: Hardware Drivers", "Topic :: System :: Operating System Kernels", "Topic :: Text Processing :: Markup", "Topic :: Utilities" ], "description": "Python CMSIS SVD Parser\n=======================\n\nThis directory contains the code for a CMSIS SVD parser in Python.\nThe parser is able to read in an input SVD and provide Python objects\ncontaining the information from the SVD. This frees the developer\n(you) from having to worry about the SVD XML and each vendor's little\nquirks.\n\nInstall It\n----------\n\nYou can install the latest stable version from pypi:\n\n```sh\npip install -U cmsis-svd\n```\n\nTo install the latest development version by doing. If this fails,\nyou may need to update the version of pip you are using.\n\n```sh\npip install -U -e 'git+https://github.com/posborne/cmsis-svd.git#egg=cmsis-svd&subdirectory=python'\n````\n\nExample\n-------\n\nThere's a lot of information you can glean from the SVDs for various\nplatforms. Let's say, for instance, that I wanted to see the names\nand base address of each peripheral on the Freescale K20 (D7). Since the\nK20 SVD is packaged with the library, I can do the following:\n\n```python\nfrom cmsis_svd.parser import SVDParser\n\nparser = SVDParser.for_packaged_svd('Freescale', 'MK20D7.xml')\nfor peripheral in parser.get_device().peripherals:\n print(\"%s @ 0x%08x\" % (peripheral.name, peripheral.base_address))\n```\n\nThis generates the following output:\n\n```\nFTFL_FlashConfig @ 0x00000400\nAIPS0 @ 0x40000000\nAIPS1 @ 0x40080000\nAXBS @ 0x40004000\nDMA @ 0x40008000\nFB @ 0x4000c000\nFMC @ 0x4001f000\nFTFL @ 0x40020000\nDMAMUX @ 0x40021000\nCAN0 @ 0x40024000\nSPI0 @ 0x4002c000\nSPI1 @ 0x4002d000\n...\n```\n\nExample 2: Convert to JSON\n--------------------------\n\nThe data structures representing the SVD data have the ability to\nconvert themselves to a dictionary suitable for serialization as\nJSON. This works recursively. To generate JSON data and pretty print\nit you can do something like the following:\n\n```python\nfrom cmsis_svd.parser import SVDParser\n\nparser = SVDParser.for_packaged_svd('Freescale', 'MK20D7.xml')\nsvd_dict = parser.get_device().to_dict()\nprint(json.dumps(svd_dict, sort_key=True,\n indent=4, separators=(',', ': ')))\n```\n\nDevelopment\n-----------\n\nOnce you have the code checked out, you can run the following from\nthis directory to install dependencies:\n\n```sh\nvirtualenv env\nsource env/bin/activate\npip install -r dev-requirements.txt\n```\n\nThen, to run the tests:\n\n```sh\nnosetests .\n```\n\nThere are quite a few SVD files, so the tests take a bit. If you have\nsome extra CPUs to throw at the problem, you can do the following:\n\n```sh\nnosetes --process=8 .\n```\n\nWhere `8` can be replaced with as many processes as you see fit.\nGenerally, 2x the number of processors in your machine is a good\nstarting place.\n\nContributing\n------------\n\nPlease open issues and submit pull requests on Github.\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/posborne/cmsis-svd", "keywords": null, "license": "Apache 2.0", "maintainer": null, "maintainer_email": null, "name": "cmsis-svd", "package_url": "https://pypi.org/project/cmsis-svd/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/cmsis-svd/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/posborne/cmsis-svd" }, "release_url": "https://pypi.org/project/cmsis-svd/0.4/", "requires_dist": null, "requires_python": null, "summary": "CMSIS SVD data files and parser", "version": "0.4" }, "last_serial": 2276303, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "0c89beac551f475001fa73f542fb7ef7", "sha256": "7464593a8347cee352309277db40633651f0ac15c93772c8fb87531974bf91b2" }, "downloads": -1, "filename": "cmsis-svd-0.1.tar.gz", "has_sig": false, "md5_digest": "0c89beac551f475001fa73f542fb7ef7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24987402, "upload_time": "2015-06-13T01:20:26", "url": "https://files.pythonhosted.org/packages/2b/62/35f00ab602e5dbb83dab1fa9ba67072f750e1e9046d8bb3f82c138166dbf/cmsis-svd-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "a44ef0cea9fc2ba5b11841381cd2668e", "sha256": "accbfd89faf8c83e6708fe9e022a36e57cf85e4d21c8573037a2805a7c36c126" }, "downloads": -1, "filename": "cmsis-svd-0.2.tar.gz", "has_sig": false, "md5_digest": "a44ef0cea9fc2ba5b11841381cd2668e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29293877, "upload_time": "2016-01-27T03:07:34", "url": "https://files.pythonhosted.org/packages/16/38/aac658d407d53fdd9f35b0f52a7398ba6b940155f885c6ffae518795c797/cmsis-svd-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "5c298fcd9d6f68c2cc7cb12a43230373", "sha256": "790613acd4e65797e89ec34469215ed8ad412de1fc5a27e9be30353390307419" }, "downloads": -1, "filename": "cmsis-svd-0.3.tar.gz", "has_sig": false, "md5_digest": "5c298fcd9d6f68c2cc7cb12a43230373", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29297437, "upload_time": "2016-03-11T05:39:51", "url": "https://files.pythonhosted.org/packages/73/a2/6a8b8e31d48d7bc585922822842bff20c2a34c3406e8120121f4ebd55b53/cmsis-svd-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "f9ed2273c5635aa6d1e38b779ccd44b6", "sha256": "b5f439fc6bbc43c9b56dd822f1f764359d503c685a42f913a1cfc2a3c6c42b2c" }, "downloads": -1, "filename": "cmsis-svd-0.4.tar.gz", "has_sig": false, "md5_digest": "f9ed2273c5635aa6d1e38b779ccd44b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34915839, "upload_time": "2016-08-11T16:29:39", "url": "https://files.pythonhosted.org/packages/36/0c/a4d0c814fbd356b9eb98da4b89d903d4d293970abe73c77368cac62eb4fe/cmsis-svd-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f9ed2273c5635aa6d1e38b779ccd44b6", "sha256": "b5f439fc6bbc43c9b56dd822f1f764359d503c685a42f913a1cfc2a3c6c42b2c" }, "downloads": -1, "filename": "cmsis-svd-0.4.tar.gz", "has_sig": false, "md5_digest": "f9ed2273c5635aa6d1e38b779ccd44b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34915839, "upload_time": "2016-08-11T16:29:39", "url": "https://files.pythonhosted.org/packages/36/0c/a4d0c814fbd356b9eb98da4b89d903d4d293970abe73c77368cac62eb4fe/cmsis-svd-0.4.tar.gz" } ] }