Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
buildmaster committed Oct 26, 2022
0 parents commit f91d23d
Show file tree
Hide file tree
Showing 125 changed files with 125,197 additions and 0 deletions.
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Changelog

# [2.7] - October 2022

### Changed
- DSG-5451 Added metadata tag for Python 3.10
- DSG-5549 Removed metadata tag for Python 3.6
- DSG-5361 Updated firmware (v1.1.7) for AVR-IoT Cellular Mini provisioning
- DSG-5624 Updated pyedbglib dependency requirement for improved serial port detection

### Fixed
- DSG-5017 Fixed error in example code

## [2.6] - June 2022

### Added
- DSG-4393 Added link to github readme to github docs
- DSG-4445 Added support for CryptoAuth Trust Platform Development Kit (DM320118) provisioning firmware
- DSG-4496 Added support for AVR-IoT Cellular Mini (EV70N78A) provisioning firmware
- DSG-4604 Add SAM-IOT demo firmware for Azure and Google

## [2.3] - December 2021

### Added
- DSG-3304 Sphinx documentation
- DSG-2152 New kit protocols (v2)
- DSG-4086 Publication to GitHib + pypi

## [1.0.5.8] - December 2020
- First public release to PyPi
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License

Copyright (c) 2021 Microchip Technology Inc. and its subsidiaries.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
10 changes: 10 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
recursive-include pykitcommander/fw *.hex
recursive-include pykitcommander/picpack *.py

# These files are read in setup.py so they must be included in the source zip for pip to be able to install the zip
# Note however that since the files are not a part of the package (not inside the pykitcommander sub folder)
# they won't be included in the python wheel.
include pypi.md
include requirements.txt


38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[![MCHP](images/microchip.png)](https://www.microchip.com)

# pykitcommander - Python Kit Commander
pykitcommander manages interaction with Microchip development kits based on PKOB nano on-board debugger

Install using pip from [pypi.org](https://pypi.org/project/pykitcommander/):
```bash
pip install pykitcommander
```

Browse source code on [github](https://github.com/microchip-pic-avr-tools/pykitcommander)

Read API documentation on [github](https://microchip-pic-avr-tools.github.io/pykitcommander)

Read the changelog on [github](https://github.com/microchip-pic-avr-tools/pykitcommander/blob/main/CHANGELOG.md)

## Background
In many situations interaction with peripheral hardware components on a development kit is done via a "bridge" application running on the MCU on that kit. To achieve this, the bridge firmware must be programmed onto that MCU, and then communications over a given channel and protocol can logically link the host computer to the peripheral components.

pykitcommander manages all aspects of this interaction.

## Usage
pykitcommander is intended to be used as a library.
Its primary consumers are:
- pytrustplatform (www.pypi.org/project/pytrustplatform)
- iotprovision (www.pypi.org/project/iotprovision)

Supported kits are:
- AVR-IoT WG and WA
- PIC-IoT WG and WA
- AVR-IoT Cellular Mini
- SAM-IoT WG
- CryptoAuth Trust Platform Development Kit

For usage examples see pypi.md.

## Notes for Linux® systems
This package uses pyedbglib and other libraries for USB transport and some udev rules are required. For details see the pyedbglib package: https://pypi.org/project/pyedbglib
20 changes: 20 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions doc/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
Empty file added doc/source/_static/.keep
Empty file.
9 changes: 9 additions & 0 deletions doc/source/_templates/module.rst_t
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{%- if show_headings %}
{{- basename | e | heading }}

{% endif -%}
.. automodule:: {{ qualname }}
{%- for option in automodule_options %}
:{{ option }}:
{%- endfor %}

47 changes: 47 additions & 0 deletions doc/source/_templates/package.rst_t
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{%- macro automodule(modname, options) -%}
.. automodule:: {{ modname }}
{%- for option in options %}
:{{ option }}:
{%- endfor %}
{%- endmacro %}

{%- macro toctree(docnames) -%}
.. toctree::
:maxdepth: {{ maxdepth }}
{% for docname in docnames %}
{{ docname }}
{%- endfor %}
{%- endmacro %}

{%- if is_namespace %}
{{- [pkgname, "namespace"] | join(" ") | e | heading }}
{% else %}
{{- pkgname | e | heading }}
{% endif %}

{%- if modulefirst and not is_namespace %}
{{ automodule(pkgname, automodule_options) }}
{% endif %}

{%- if subpackages %}

{{ toctree(subpackages) }}
{% endif %}

{%- if submodules %}
{% if separatemodules %}
{{ toctree(submodules) }}
{%- else %}
{%- for submodule in submodules %}
{% if show_headings %}
{{- submodule | e | heading(2) }}
{% endif %}
{{ automodule(submodule, automodule_options) }}
{% endfor %}
{%- endif %}
{% endif %}

{%- if not modulefirst and not is_namespace %}

{{ automodule(pkgname, automodule_options) }}
{% endif %}
8 changes: 8 additions & 0 deletions doc/source/_templates/toc.rst_t
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{ header | heading }}

.. toctree::
:maxdepth: {{ maxdepth }}
{% for docname in docnames %}
{{ docname }}
{%- endfor %}

60 changes: 60 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))

needs_sphinx = "3.5"

# -- Project information -----------------------------------------------------

project = 'pykitcommander'
copyright = '2021, Microchip Technology Inc'
author = 'Microchip Technology Inc'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc']

# Preserve the default argument values of functions in source code and keep them not evaluated for readability:
autodoc_preserve_defaults = True

# Mock out these objects (note: modules, not packages)
autodoc_mock_imports = ['pyedbglib', 'pymcuprog', 'pydebuggerconfig', 'hexdump', 'yaml', 'serial']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'Microchip'
html_theme_path = ['../../themes']
pygments_style = 'default'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
21 changes: 21 additions & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
pykitcommander documentation
============================

.. automodule:: pykitcommander
:members:
:undoc-members:
:show-inheritance:
:noindex:

.. toctree::
:maxdepth: 4
:caption: Contents:

pykitcommander

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
50 changes: 50 additions & 0 deletions doc/source/pykitcommander.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
pykitcommander package
======================

Kit manager
-----------

.. automodule:: pykitcommander.kitmanager
:members:
:undoc-members:
:show-inheritance:

Kit protocols
-------------

.. automodule:: pykitcommander.kitprotocols
:members:
:undoc-members:
:show-inheritance:

Firmware interface
------------------

.. automodule:: pykitcommander.firmwareinterface
:members:
:undoc-members:
:show-inheritance:

Programmer
----------

.. automodule:: pykitcommander.programmer
:members:
:undoc-members:
:show-inheritance:

Errors
------

.. automodule:: pykitcommander.kitcommandererrors
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: pykitcommander
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: faf91f40f63a07514241fba47b837187
tags: 645f666f9bcd5a90fca523b33c5a78b7
Empty file added docs/.nojekyll
Empty file.
21 changes: 21 additions & 0 deletions docs/_sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
pykitcommander documentation
============================

.. automodule:: pykitcommander
:members:
:undoc-members:
:show-inheritance:
:noindex:

.. toctree::
:maxdepth: 4
:caption: Contents:

pykitcommander

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Loading

0 comments on commit f91d23d

Please sign in to comment.