Name | pymdfu JSON |
Version |
2.5.1.9
JSON |
| download |
home_page | None |
Summary | Microchip Device Firmware Upgrade Application |
upload_time | 2024-12-18 07:44:30 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT |
keywords |
microchip
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Microchip Device Firmware Update Tools (pymdfu package)
The `pymdfu` Python package contains various tools to support firmware updates of clients that implement the Microchip Device Firmware Update (MDFU) protocol.
![PyPI - Format](https://img.shields.io/pypi/format/pymdfu)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pymdfu)
![PyPI - License](https://img.shields.io/pypi/l/pymdfu)
## Installation
Install using pip from [pypi](https://pypi.org/project/pymdfu):
```sh
pip install pymdfu
```
# MDFU host application command line interface pymdfu
`pymdfu` is a command line interface for the Microchip Device Firmware Update (MDFU) host application. It provides various actions to interact with MDFU clients, including updating firmware, retrieving client information, and getting help on tool-specific parameters.
## Usage
```sh
pymdfu [-h | --help] [-v <level> | --verbose <level>] [-V | --version] [-R | --release-info] [<action>]
```
### Actions
- `client-info`: Get MDFU client information.
- `tools-help`: Get help on tool-specific parameters.
- `update`: Perform a firmware update.
### Global Options
- `-h, --help`: Show help message and exit.
- `-v <level>, --verbose <level>`: Set logging verbosity/severity level. Valid levels are [debug, info, warning, error, critical]. Default is `info`.
- `-V, --version`: Print `pymdfu` version number and exit.
- `-R, --release-info`: Print `pymdfu` release details and exit.
## Examples
### Update Firmware
Update firmware through a serial port with `update_image.img`:
```sh
pymdfu update --tool serial --image update_image.img --port COM11 --baudrate 115200
```
### Get Client Information
Retrieve MDFU client information using a serial tool:
```sh
pymdfu client-info --tool serial --port COM11 --baudrate 115200
```
### Version and release information
To print the version of `pymdfu` command line tool and the supported MDFU protocol version:
```sh
pymdfu --version
```
To print release details:
```sh
pymdfu --release-info
```
### Help
For general help:
```sh
pymdfu --help
```
For help on a specific action:
```sh
pymdfu <action> --help
```
Get help on tool-specific parameters:
```sh
pymdfu tools-help
```
## Configuration File
For some actions like `update` and `client-info` it is possible to specify a configuration file using the `-c` or `--config-file` option. The configuration file should be in TOML format and can include common parameters and tool-specific parameters. Parameters provided on the command line will take precedence over parameters specified in the config file. Options in tool-specific section will only be applied if the corresponding tool is used e.g. if `--tool serial` is provided the parameters in the section `[serial]` will be applied.
### Example Configuration File
```toml
[common]
verbose = "debug"
[serial]
port = "COM11"
baudrate = 115200
[network]
host = "192.168.1.100"
port = 8080
```
# MDFU client command line interface pymdfuclient
The `pymdfuclient` is a MDFU client with a command line interface and can be used to test MDFU hosts. The client implements the MDFU protocol but not any firmware image specific functions like decoding or verifying the firmware image. This means the tool is firmware image file agnostic and any file can be transferred with the client returning an image state as success after the transfer.
Future versions of this tool might offer specific client implementations that can decode and verify FW images e.g. FW images for Microchip 8-bit microcontroller that use the pyfwimagebuilder tool: https://pypi.org/project/pyfwimagebuilder/
## Usage
```sh
pymdfuclient [-h | --help] [-v <level> | --verbose <level>] [-V | --version] [-R | --release-info] --tool <tool> [<tools-args>...]
```
## Examples
Start MDFU client on localhost port 5558 and use the serial transport layer:
```sh
pymdfuclient --tool network --host localhost --port 5558 --transport serial
```
Start MDFU client on serial port COM11 with baudrate 115200:
```sh
pymdfuclient --tool serial --port COM11 --baudrate 115200
```
# Changelog
## [2.5.1] - December 2024
- pymdfu CLI and library
- MDFU specification 1.2.0 support
- Position independent common CLI arguments
- Common checksum library
- Configurable number of retries
- I2C transport
- I2C transport over network
- pymdfuclient
- I2C transport support
- Inter transaction delay support
### Added
- PYTOOLS-12 As a user I want to list supported hardware tools/adapters
- PYTOOLS-36 pymdfu simulator target tests
- PYTOOLS-272 Move padding and CRC creation from transport layers to utils
- PYTOOLS-309 Allow common arguments anywhere on the command line
- PYTOOLS-311 I2C transport specification updates
## [2.4.0] - August 2024
- pymdfu CLI and library
- SPI transport layer
- Packet based networking layer
- Linux SPI subsystem support
- Linux I2C subsystem support
- Transport and MAC layers refactored into their own sub-modules
- Aardvark tool support with SPI and I2C interfaces
- MCP2221A tool support
- MCP2210 tool support
- Logging configuration through TOML file
- Support MDFU protocol specfication version 1.1
- Checks for client MDFU version and exits if not supported by host
- CLI help for tool specific options
- CLI configuration by file
- pymdfuclient
- Support for serial port.
### Added
- PYTOOLS-278 Packet based networking MAC
- PYTOOLS-277 Serial interface support in pymdfuclient
- PYTOOLS-275 Linux SPI and I2C subsystem support
- PYTOOLS-274 SPI transport layer spec update
- PYTOOLS-271 Transport and MAC layer restructuring
- PYTOOLS-270 Aardvark tool support
- PYTOOLS-269 Replace yaml logging configuration with TOML
- PYTOOLS-267 Update pymdfu excludes
- PYTOOLS-257 Remove @property from classmethods since it will not be supported in Python 3.13
- PYTOOLS-254 SPI transport layer
- PYTOOLS-253 MCP2210 tool
- PYTOOLS-243 MCP2221A tool
- PYTOOLS-242 I2C transport layer prototype
- PYTOOLS-191 Add supported MDFU protocol version and verify client version
- PYTOOLS-160 Tools API rework
- PYTOOLS-111 Specification for CLI configuration file
- PYTOOLS-17 Support for reading configuration file
- PYTOOLS-14 CLI help for tool specific options
- PYTOOLS-258 Document new CLI commands and options
### Fixed
- PYTOOLS-265 Handle file transfer abort response when no additional data is present
- PYTOOLS-210 Code in pymdfu break binary building
## [1.0.2] - December 2023
### Added
- PYTOOLS-211 Add missing packaging dependency
## [1.0.1] - December 2023
- Support MDFU get client info command
- Read client command timeouts
- Read client MDFU protocol version
- Support individual command timeouts
- Decode transport and file transfer abort error causes
- Check image state command response
- Bugfixes
### Added
- PYTOOLS-156 New get client information command with version and command timeouts
- PYTOOLS-91 Decode transport and file transfer abort error causes
- PYTOOLS-90 Check "get image state" command response packet payload for image status
### Fixed
- PYTOOLS-155 PyMDFU tool usage guideline is incorrect
- PYTOOLS-84 Document link between pymdfu and pyfwimagebuilder
## [0.1.4] - October 2023
Initial public beta release.
### Initial beta release
## [0.0.1] - October 2023
- Placeholder release
Raw data
{
"_id": null,
"home_page": null,
"name": "pymdfu",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "Microchip",
"author": null,
"author_email": "Microchip Technology <support@microchip.com>",
"download_url": null,
"platform": null,
"description": "# Microchip Device Firmware Update Tools (pymdfu package)\n\nThe `pymdfu` Python package contains various tools to support firmware updates of clients that implement the Microchip Device Firmware Update (MDFU) protocol.\n\n![PyPI - Format](https://img.shields.io/pypi/format/pymdfu)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pymdfu)\n![PyPI - License](https://img.shields.io/pypi/l/pymdfu)\n\n## Installation\nInstall using pip from [pypi](https://pypi.org/project/pymdfu):\n```sh\npip install pymdfu\n```\n\n# MDFU host application command line interface pymdfu\n\n`pymdfu` is a command line interface for the Microchip Device Firmware Update (MDFU) host application. It provides various actions to interact with MDFU clients, including updating firmware, retrieving client information, and getting help on tool-specific parameters.\n\n## Usage\n```sh\npymdfu [-h | --help] [-v <level> | --verbose <level>] [-V | --version] [-R | --release-info] [<action>]\n```\n\n### Actions\n\n- `client-info`: Get MDFU client information.\n- `tools-help`: Get help on tool-specific parameters.\n- `update`: Perform a firmware update.\n\n### Global Options\n\n- `-h, --help`: Show help message and exit.\n- `-v <level>, --verbose <level>`: Set logging verbosity/severity level. Valid levels are [debug, info, warning, error, critical]. Default is `info`.\n- `-V, --version`: Print `pymdfu` version number and exit.\n- `-R, --release-info`: Print `pymdfu` release details and exit.\n\n## Examples\n\n### Update Firmware\n\nUpdate firmware through a serial port with `update_image.img`:\n\n```sh\npymdfu update --tool serial --image update_image.img --port COM11 --baudrate 115200\n```\n\n### Get Client Information\n\nRetrieve MDFU client information using a serial tool:\n\n```sh\npymdfu client-info --tool serial --port COM11 --baudrate 115200\n```\n\n### Version and release information\nTo print the version of `pymdfu` command line tool and the supported MDFU protocol version:\n\n```sh\npymdfu --version\n```\n\nTo print release details:\n\n```sh\npymdfu --release-info\n```\n\n### Help\n\nFor general help:\n\n```sh\npymdfu --help\n```\n\nFor help on a specific action:\n\n```sh\npymdfu <action> --help\n```\n\nGet help on tool-specific parameters:\n\n```sh\npymdfu tools-help\n```\n\n## Configuration File\n\nFor some actions like `update` and `client-info` it is possible to specify a configuration file using the `-c` or `--config-file` option. The configuration file should be in TOML format and can include common parameters and tool-specific parameters. Parameters provided on the command line will take precedence over parameters specified in the config file. Options in tool-specific section will only be applied if the corresponding tool is used e.g. if `--tool serial` is provided the parameters in the section `[serial]` will be applied.\n\n### Example Configuration File\n\n```toml\n[common]\nverbose = \"debug\"\n\n[serial]\nport = \"COM11\"\nbaudrate = 115200\n\n[network]\nhost = \"192.168.1.100\"\nport = 8080\n```\n# MDFU client command line interface pymdfuclient\n\nThe `pymdfuclient` is a MDFU client with a command line interface and can be used to test MDFU hosts. The client implements the MDFU protocol but not any firmware image specific functions like decoding or verifying the firmware image. This means the tool is firmware image file agnostic and any file can be transferred with the client returning an image state as success after the transfer.\n\nFuture versions of this tool might offer specific client implementations that can decode and verify FW images e.g. FW images for Microchip 8-bit microcontroller that use the pyfwimagebuilder tool: https://pypi.org/project/pyfwimagebuilder/\n\n## Usage\n\n```sh\npymdfuclient [-h | --help] [-v <level> | --verbose <level>] [-V | --version] [-R | --release-info] --tool <tool> [<tools-args>...]\n```\n## Examples\n\nStart MDFU client on localhost port 5558 and use the serial transport layer:\n```sh\npymdfuclient --tool network --host localhost --port 5558 --transport serial\n```\n\nStart MDFU client on serial port COM11 with baudrate 115200:\n```sh\npymdfuclient --tool serial --port COM11 --baudrate 115200\n```\n# Changelog\n## [2.5.1] - December 2024\n- pymdfu CLI and library\n - MDFU specification 1.2.0 support\n - Position independent common CLI arguments\n - Common checksum library\n - Configurable number of retries\n - I2C transport\n - I2C transport over network\n- pymdfuclient\n - I2C transport support\n - Inter transaction delay support\n\n### Added\n- PYTOOLS-12 As a user I want to list supported hardware tools/adapters\n- PYTOOLS-36 pymdfu simulator target tests\n- PYTOOLS-272 Move padding and CRC creation from transport layers to utils\n- PYTOOLS-309 Allow common arguments anywhere on the command line\n- PYTOOLS-311 I2C transport specification updates\n\n## [2.4.0] - August 2024\n- pymdfu CLI and library\n - SPI transport layer\n - Packet based networking layer\n - Linux SPI subsystem support\n - Linux I2C subsystem support\n - Transport and MAC layers refactored into their own sub-modules\n - Aardvark tool support with SPI and I2C interfaces\n - MCP2221A tool support\n - MCP2210 tool support\n - Logging configuration through TOML file\n - Support MDFU protocol specfication version 1.1\n - Checks for client MDFU version and exits if not supported by host\n - CLI help for tool specific options\n - CLI configuration by file\n- pymdfuclient\n - Support for serial port.\n\n### Added\n- PYTOOLS-278 Packet based networking MAC\n- PYTOOLS-277 Serial interface support in pymdfuclient\n- PYTOOLS-275 Linux SPI and I2C subsystem support\n- PYTOOLS-274 SPI transport layer spec update\n- PYTOOLS-271 Transport and MAC layer restructuring\n- PYTOOLS-270 Aardvark tool support\n- PYTOOLS-269 Replace yaml logging configuration with TOML\n- PYTOOLS-267 Update pymdfu excludes\n- PYTOOLS-257 Remove @property from classmethods since it will not be supported in Python 3.13\n- PYTOOLS-254 SPI transport layer\n- PYTOOLS-253 MCP2210 tool\n- PYTOOLS-243 MCP2221A tool\n- PYTOOLS-242 I2C transport layer prototype\n- PYTOOLS-191 Add supported MDFU protocol version and verify client version\n- PYTOOLS-160 Tools API rework\n- PYTOOLS-111 Specification for CLI configuration file\n- PYTOOLS-17 Support for reading configuration file\n- PYTOOLS-14 CLI help for tool specific options\n- PYTOOLS-258 Document new CLI commands and options\n### Fixed\n- PYTOOLS-265 Handle file transfer abort response when no additional data is present\n- PYTOOLS-210 Code in pymdfu break binary building\n\n## [1.0.2] - December 2023\n### Added\n- PYTOOLS-211 Add missing packaging dependency\n\n## [1.0.1] - December 2023\n\n- Support MDFU get client info command\n - Read client command timeouts\n - Read client MDFU protocol version\n- Support individual command timeouts\n- Decode transport and file transfer abort error causes\n- Check image state command response\n- Bugfixes\n\n### Added\n- PYTOOLS-156 New get client information command with version and command timeouts\n- PYTOOLS-91 Decode transport and file transfer abort error causes\n- PYTOOLS-90 Check \"get image state\" command response packet payload for image status\n\n### Fixed\n- PYTOOLS-155 PyMDFU tool usage guideline is incorrect\n- PYTOOLS-84 Document link between pymdfu and pyfwimagebuilder\n\n## [0.1.4] - October 2023\n\nInitial public beta release.\n\n### Initial beta release\n\n## [0.0.1] - October 2023\n\n- Placeholder release\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Microchip Device Firmware Upgrade Application",
"version": "2.5.1.9",
"project_urls": {
"Homepage": "https://www.microchip.com"
},
"split_keywords": [
"microchip"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a49509199fd0e060ef7bbaab9baea41ce0113118b3adb8d3539d4b94421b3392",
"md5": "c6280bd26854753e9a7ebec74b55ea37",
"sha256": "22ba63c95e4239ff779005810e86ebe3795eac188f333dd325f84358184b8f95"
},
"downloads": -1,
"filename": "pymdfu-2.5.1.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c6280bd26854753e9a7ebec74b55ea37",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 74795,
"upload_time": "2024-12-18T07:44:30",
"upload_time_iso_8601": "2024-12-18T07:44:30.660574Z",
"url": "https://files.pythonhosted.org/packages/a4/95/09199fd0e060ef7bbaab9baea41ce0113118b3adb8d3539d4b94421b3392/pymdfu-2.5.1.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-18 07:44:30",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pymdfu"
}