# pymcuprog - Python MCU programmer
pymcuprog is a utility for programming various Microchip MCU devices using Microchip CMSIS-DAP based debuggers
## Overview
pymcuprog is available:
* install using pip from pypi: https://pypi.org/project/pymcuprog
* browse source code on github: https://github.com/microchip-pic-avr-tools/pymcuprog
* read API documentation on github: https://microchip-pic-avr-tools.github.io/pymcuprog
## Usage
pymcuprog can be used as a command-line interface or a library
### Command-line programming
for help, use:
```bash
pymcuprog --help
```
#### Action: ping
checks connectivity by reading the device identity
Example:
```bash
pymcuprog ping
```
#### Action: erase
erases device memories
* use -m to erase only a specified memory region (if available)
Example: chip erase the device
```bash
pymcuprog erase
```
#### Action: write
writes device memories
* use -f for writing from a file, or
* use -l for writing literal values
* use -m to specify memory type for literal writing
* use -o to specify offset for literal writing
Example: writes the content of an Intel® hex file to the appropriate memory areas on the device
```bash
pymcuprog write -f app.hex
```
Note: memory is not erased automatically before writing!
Example: erases memories and then writes an Intel hex file:
```bash
pymcuprog write -f app.hex --erase
```
Example: erases memories, writes an Intel hex file and then verifies the content:
```bash
pymcuprog write -f app.hex --erase --verify
```
#### Action: read
reads device memories
* use -m to specify memory type
* use -o to specify offset to read from
* use -b to specify number of bytes to read
* use -f to read to a file
Example: reads 64 bytes of flash memory from offset 0x1000
```bash
pymcuprog read -m flash -o 0x1000 -b 64
```
#### Action: reset
resets the target device
Example:
```bash
pymcuprog reset
```
### Command-line board utilities
#### Action: getvoltage
reads the actual target operating voltage
Example:
```bash
pymcuprog getvoltage
```
#### Action: getsupplyvoltage
reads the supply voltage (set-point)
Example:
```bash
pymcuprog getsupplyvoltage
```
#### Action: getusbvoltage
reads the USB voltage (Vbus)
Example:
```bash
pymcuprog getusbvoltage
```
#### Action: setsupplyvoltage
sets the target supply voltage
* use -l to specify a literal supply voltage value
Example: sets the target supply voltage on a Curiosity Nano kit to 3.3V
```bash
pymcuprog setsupplyvoltage -l 3.3
```
#### Action: reboot-debugger
reboots the debugger
Example: reboots a Curiosity Nano kit
```bash
pymcuprog reboot-debugger
```
### Generic utilities
#### Action: makeuf2
converts Intel hex file to UF2 file
* use -f to specify input hex file
* use --uf2file to specify name of output UF2 file (optional)
Example: converts myfile.hex to newfile.uf2
```bash
pymcuprog makeuf2 -f myfile.hex --uf2file newfile.uf2
```
The --uf2file argument is optional. By default pymcuprog will generate a UF2 file with the same name as the hex but with .uf2 extension.
### Command-line switches
Many of these switches are optional, and many parameters are automatically set when using a Curiosity Nano or Xplained Pro kit.
* -t TOOL to select which tool to use. Optional if only one is connected.
* -s SERIALNUMBER to select which tool instance to use. Optional if only one is connected.
* -d DEVICE to specify the device to program. Optional when using a kit.
* -i INTERFACE to specify the target communication interface. Optional.
* -p PACKPATH to specify the path to the DFP for PIC devices*
* -c CLK to specify the programming interface clock speed. Optional.
* --verify to verify after programming
* -u UART to use native host serial port UART for UPDI instead of a USB-based tool.
* -H MODE to select UPDI high-voltage entry mode ('tool-toggle-power', 'user-toggle-power', 'simple-unsafe-pulse')
* -U to write user row values when the device is locked (UPDI only)
* -C to erase and unlock a locked device (UPDI only)
* -v LEVEL for selecting logging verbosity ('debug', 'info', 'warning', 'error', 'critical')
####
*Notes regarding PACKPATH argument
While pymcuprog itself contains sufficient information to program AVR devices (with UPDI interface), it is unable to program a PIC device without access to programming scripts for that device. These scripts are deployed in Device Family Packs (DFP) on https://packs.download.microchip.com and are only provided for PIC devices mounted on Curiosity Nano boards or other boards with the PKOB nano (nEDBG) debugger. To use pymcuprog with PIC devices, you will either need to download a DFP for the PIC in question, or have MPLAB X v5.25 or later installed. In either case the path to the particular device in the scripts folder inside the DFP must be passed into pymcuprog using the -p PACKPATH argument. Remember to quote the path (`"<path>"`) if the path itself contains spaces.
NOTE FOR WINDOWS USERS: Avoid ending a quoted `"<path>"` argument with a backslash (`'\'`), this will cause the PACKPATH to not be found. `"C:\foo\bar"` will work, while `"C:\foo\bar\"` will not.
Example: Ping the device on a PIC16F15244 Curiosity Nano
```bash
pymcuprog ping -p "c:\Program Files (x86)\Microchip\MPLABX\v5.40\packs\Microchip\PIC16F1xxxx_DFP\1.4.119\scripts\pic16f15244"
```
### Serial port UPDI (pyupdi)
The AVR UPDI interface implements a UART protocol, which means that it can be used by simply connecting TX and RX pins of a serial port together with the UPDI pin; with a series resistor (eg: 1k) between TX and UPDI to handle contention. (This configuration is also known as "pyupdi".) Be sure to connect a common ground, and use a TTL serial adapter running at the same voltage as the AVR device.
<pre>
Vcc Vcc
+-+ +-+
| |
+---------------------+ | | +--------------------+
| Serial port +-+ +-+ AVR device |
| | +----------+ | |
| TX +------+ 1k +---------+ UPDI |
| | +----------+ | | |
| | | | |
| RX +----------------------+ | |
| | | |
| +--+ +--+ |
+---------------------+ | | +--------------------+
+-+ +-+
GND GND
</pre>
pymcuprog includes this implementation as an alternative to USB/EDBG-based tools. To connect via a serial port, use the "uart" tool type with the UART switch in addition.
Example: checks connectivity by reading the device identity
```bash
pymcuprog ping -d avr128da48 -t uart -u com35
```
When using serial port UPDI it is optional to use:
* --clk BAUD to specify the baud rate (defaults to 115200)
* --uart-timeout TIMEOUT to specify the uart read timeout (defaults to 1.0s)
Increasing the baud rate can decrease programming time. Decreasing the timeout can decrease the initial connection latency when UPDI is disabled and does not respond. These parameters can be tweaked to suit the serial port adapter in use.
### Library
pymcuprog can be used as a library using its backend API. For example:
```python
# pymcuprog uses the Python logging module
import logging
logging.basicConfig(format="%(levelname)s: %(message)s", level=logging.WARNING)
# Configure the session
from pymcuprog.backend import SessionConfig
sessionconfig = SessionConfig("atmega4808")
# Instantiate USB transport (only 1 tool connected)
from pymcuprog.toolconnection import ToolUsbHidConnection
transport = ToolUsbHidConnection()
# Instantiate backend
from pymcuprog.backend import Backend
backend = Backend()
# Connect to tool using transport
backend.connect_to_tool(transport)
# Start the session
backend.start_session(sessionconfig)
# Read the target device_id
device_id = backend.read_device_id()
print ("Device ID is {0:06X}".format(int.from_bytes(device_id, byteorder="little")))
```
## Logging
This package uses the Python logging module for publishing log messages to library users.
A basic configuration can be used (see example), but for best results a more thorough configuration is recommended in order to control the verbosity of output from dependencies in the stack which also use logging.
See logging.yaml which is included in the package (although only used for CLI)
## Dependencies
pymcuprog depends on pyedbglib for its transport protocol.
pyedbglib requires a USB transport library like libusb. See pyedbglib package for more information.
## Versioning
pymcuprog version can be determined using the CLI:
```bash
pymcuprog -V
```
or using the library:
```python
from pymcuprog import __version__ as pymcuprog_version
print("pymcuprog version {}".format(pymcuprog_version))
```
In addition, the CLI-backend API is versioned for convenience:
```python
from pymcuprog.backend import Backend
backend = Backend()
print("pymcuprog backend API version: {}".format(backend.get_api_version()))
```
## Supported devices and tools
pymcuprog is primarily intended for use with PKOB nano (nEDBG) debuggers which are found on Curiosity Nano kits and other development boards. This means that it is continuously tested with a selection of AVR devices with UPDI interface as well as a selection of PIC devices. However since the protocol is compatible between all EDBG-based debuggers (pyedbglib) it is possible to use pymcuprog with a wide range of debuggers and devices, although not all device families/interfaces have been implemented.
### Debuggers / Tools
pymcuprog supports:
* PKOB nano (nEDBG) - on-board debugger on Curiosity Nano
* MPLAB PICkit 4 In-Circuit Debugger (when in 'AVR mode')
* MPLAB Snap In-Circuit Debugger (when in 'AVR mode')
* Atmel-ICE
* Power Debugger
* EDBG - on-board debugger on Xplained Pro/Ultra
* mEDBG - on-board debugger on Xplained Mini/Nano
* JTAGICE3 (firmware version 3.0 or newer)
Although not all functionality is provided on all debuggers/boards. See device support section below.
### Devices
pymcuprog supports:
* All UPDI devices, whether mounted on kits or standalone
* PIC devices mounted on Curiosity Nano kits, or similar board with PKOB nano (nEDBG) debugger
Other devices (eg ATmega328P, ATsamd21e18a) may be partially supported for experimental purposes
## 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
# Changelog
## [3.17] - March 2024
### Added
- DSG-7091 Add CLI command to convert hex file to UF2
### Changed
- DSG-6630 Improve presentation of memory data on console
### Fixed
- DSG-6636 UPDI devices tinyAVR(R)/megaAVR(R) overwrites preceding bytes when writing single values to user row
- DSG-7110 Programming failure of AVR64DU32 target with pymcuprog
- DSG-7223 Serial UPDI uses Flash page buffer erase for EEPROM on AVR EA and EB
- DSG-7224 Serial UPDI does not support writing complete user row in one operation for AVR DU
## [3.16] - November 2023
### Added
- DSG-6057 Added support for BOOT_ROW memtype
- DSG-6631 Added serialupdi support for P:4 and P:5
- DSG-6213 Added AVR EB
### Changed
- DSG-5887 Refactor serialupdi NVM variants
- DSG-6210 Made serialupdi logging more concise
- DSG-6533 Help tweaks
### Fixed
- DSG-5817 Improved error handling with SAM devices
- DSG-6409 Error return code when --verify fails
- DSG-6590 Corrected AVR Ex to use 24-bit addressing for serialupdi
## [3.14] - October 2022
### Added
- DSG-5158 github-28 Added CLI switch for serial port read timeout
- DSG-5421 Added support for AVR DU and additional AVR DD devices
### Changed
- DSG-5418 Added Python 3.10 metadata tag
- DSG-5543 Removed Python 3.6 metadata tag
- DSG-5417 Removed distutils usage
### Fixed
- DSG-5157 github-29 Fixed return value on error
- DSG-4836 Corrected flash offset compensation for avrdebugger
## [3.13] - May 2022
### Added
- DSG-3936 Fixed AVR ISP implementation and added commands (beta)
- DSG-4172 github-10 Disable ACK response signature on serialUPDI block write (speed-up)
- DSG-3951 github-8 Added --erase argument to erase device before write with single execution
- DSG-3972 CLI help additions
- DSG-3997 Added debugwire_disable() to Avr8Protocol
### Fixed
- DSG-3945, DSG-3938 Unable to write fuse byte 0 on Curiosity Nano ATtiny kits
- DSG-4488 github-19 Return bytearray (not list) from serialUPDI read
- DSG-4594 SAMD21 performance improvement (SAM-IoT provisioning)
- DSG-4540 Fixed SAMD21 non-word-oriented read failure
- DSG-3941 Improved feedback on verification failure
- DSG-3944 Removed timeout warning for serialUPDI with a locked device
- DSG-4419 Corrected AVR high voltage UPDI device data
- DSG-3993 github-9 Corrected AVR signature sizes to make additional data available
## [3.10] - October 2021
### Added
- DSG-2702 Add serialupdi backend for AVR EA
- DSG-3633 github-3 Add missing AVR-DB devices
- DSG-3635 github-4 Add missing ATtiny devices
- DSG-3662 Add ascii-art for serialUPDI
- DSG-3804 Add py39 metadata to package
- DSG-3943 github-7 Add CLI documentation
### Fixed
- DSG-2859 github-1 serialUPDI write user_row on locked device fails
- DSG-3538 github-2 Unable to write fuses on ATmega4809 using serialUPDI
- DSG-3817 SAM D21 user row programming fails
- DSG-3952 Incorrect size of FUSES on Dx, Ex devices
## [3.9] - April 2021
### Added
- DSG-2920 Raise exception if device ID does not match
- DSG-2918 SerialUPDI: error recovery if non-ascii characters are read in SIB
- DSG-2861 Valid memory types are listed if an invalid one is specified
### Fixed
- DSG-3238 PIC16 eeprom displays incorrect address
- DSG-3239 PIC16 eeprom verification does not work
- DSG-2925 UPDI device revision not correctly parsed/displayed
- DSG-2860 SerialUPDI: chip erase does not work on locked device
- DSG-2857 SerialUPDI: crash when writing lockbits
- DSG-2855 Verify action fails if hex file contains eeprom content
- DSG-2854 User row excluded when reading to hex file
- DSG-2850 UPDI device model fix (sram)
### Changed
- DSG-2862 Improved exception handling
- DSG-3203 Improved exception handling
- DSG-3178 Cosmetic changes for publication
## [3.7.4] - December 2020
### Added
- DSG-1492 Added verify function
- DSG-2039 Added all UPDI devices
- DSG-2279 Added error codes
- DSG-1550 Flash-only erase
### Fixed
- DSG-2470 No feedback when multiple kits are connected
- DSG-2014 Error when reading using -m and -o but no -b
- DSG-2738 Padding to page size when writing user row on locked device
### Changed
- DSG-2234 Logging using logging module
- DSG-2034 prevent read using -b with no -m specified
- DSG-2009 prevent writing from hexfile with memory type specified
- DSG-2012 prevent writing from hexfile with offset specified
- DSG-2458 documentation changes
- DSG-2041 documentation changes
- DSG-2042 documentation changes
- DSG-2043 documentation changes
- DSG-2011 documentation changes
## [3.1.3] - June 2020
- First public release to PyPi
Raw data
{
"_id": null,
"home_page": null,
"name": "pymcuprog",
"maintainer": null,
"docs_url": null,
"requires_python": ">=2.7",
"maintainer_email": null,
"keywords": "Microchip, nEDBG, Curiosity Nano, PKOB nano, debugger",
"author": "Microchip Technology",
"author_email": "support@microchip.com",
"download_url": null,
"platform": null,
"description": "# pymcuprog - Python MCU programmer\npymcuprog is a utility for programming various Microchip MCU devices using Microchip CMSIS-DAP based debuggers\n\n## Overview\npymcuprog is available:\n\n* install using pip from pypi: https://pypi.org/project/pymcuprog\n* browse source code on github: https://github.com/microchip-pic-avr-tools/pymcuprog\n* read API documentation on github: https://microchip-pic-avr-tools.github.io/pymcuprog\n\n## Usage\npymcuprog can be used as a command-line interface or a library\n\n### Command-line programming\nfor help, use:\n```bash\npymcuprog --help\n```\n\n#### Action: ping\nchecks connectivity by reading the device identity\n\nExample:\n```bash\npymcuprog ping\n```\n#### Action: erase\nerases device memories\n* use -m to erase only a specified memory region (if available)\n\nExample: chip erase the device\n```bash\npymcuprog erase\n```\n#### Action: write\nwrites device memories\n* use -f for writing from a file, or\n* use -l for writing literal values\n* use -m to specify memory type for literal writing\n* use -o to specify offset for literal writing\n\nExample: writes the content of an Intel\u00ae hex file to the appropriate memory areas on the device\n```bash\npymcuprog write -f app.hex\n```\nNote: memory is not erased automatically before writing!\n\nExample: erases memories and then writes an Intel hex file:\n```bash\npymcuprog write -f app.hex --erase\n```\n\nExample: erases memories, writes an Intel hex file and then verifies the content:\n```bash\npymcuprog write -f app.hex --erase --verify\n```\n\n#### Action: read\nreads device memories\n* use -m to specify memory type\n* use -o to specify offset to read from\n* use -b to specify number of bytes to read\n* use -f to read to a file\n\nExample: reads 64 bytes of flash memory from offset 0x1000\n```bash\npymcuprog read -m flash -o 0x1000 -b 64\n```\n\n#### Action: reset\nresets the target device\n\nExample:\n```bash\npymcuprog reset\n```\n\n### Command-line board utilities\n\n#### Action: getvoltage\nreads the actual target operating voltage\n\nExample:\n```bash\npymcuprog getvoltage\n```\n\n#### Action: getsupplyvoltage\nreads the supply voltage (set-point)\n\nExample:\n```bash\npymcuprog getsupplyvoltage\n```\n\n#### Action: getusbvoltage\nreads the USB voltage (Vbus)\n\nExample:\n```bash\npymcuprog getusbvoltage\n```\n\n#### Action: setsupplyvoltage\nsets the target supply voltage\n* use -l to specify a literal supply voltage value\n\nExample: sets the target supply voltage on a Curiosity Nano kit to 3.3V\n```bash\npymcuprog setsupplyvoltage -l 3.3\n```\n\n#### Action: reboot-debugger\nreboots the debugger\n\nExample: reboots a Curiosity Nano kit\n```bash\npymcuprog reboot-debugger\n```\n\n### Generic utilities\n\n#### Action: makeuf2\nconverts Intel hex file to UF2 file\n* use -f to specify input hex file\n* use --uf2file to specify name of output UF2 file (optional)\n\nExample: converts myfile.hex to newfile.uf2\n```bash\npymcuprog makeuf2 -f myfile.hex --uf2file newfile.uf2\n```\nThe --uf2file argument is optional. By default pymcuprog will generate a UF2 file with the same name as the hex but with .uf2 extension.\n\n\n### Command-line switches\nMany of these switches are optional, and many parameters are automatically set when using a Curiosity Nano or Xplained Pro kit.\n* -t TOOL to select which tool to use. Optional if only one is connected.\n* -s SERIALNUMBER to select which tool instance to use. Optional if only one is connected.\n* -d DEVICE to specify the device to program. Optional when using a kit.\n* -i INTERFACE to specify the target communication interface. Optional.\n* -p PACKPATH to specify the path to the DFP for PIC devices*\n* -c CLK to specify the programming interface clock speed. Optional.\n* --verify to verify after programming\n* -u UART to use native host serial port UART for UPDI instead of a USB-based tool.\n* -H MODE to select UPDI high-voltage entry mode ('tool-toggle-power', 'user-toggle-power', 'simple-unsafe-pulse')\n* -U to write user row values when the device is locked (UPDI only)\n* -C to erase and unlock a locked device (UPDI only)\n* -v LEVEL for selecting logging verbosity ('debug', 'info', 'warning', 'error', 'critical')\n\n\n####\n*Notes regarding PACKPATH argument\n\nWhile pymcuprog itself contains sufficient information to program AVR devices (with UPDI interface), it is unable to program a PIC device without access to programming scripts for that device. These scripts are deployed in Device Family Packs (DFP) on https://packs.download.microchip.com and are only provided for PIC devices mounted on Curiosity Nano boards or other boards with the PKOB nano (nEDBG) debugger. To use pymcuprog with PIC devices, you will either need to download a DFP for the PIC in question, or have MPLAB X v5.25 or later installed. In either case the path to the particular device in the scripts folder inside the DFP must be passed into pymcuprog using the -p PACKPATH argument. Remember to quote the path (`\"<path>\"`) if the path itself contains spaces.\n\nNOTE FOR WINDOWS USERS: Avoid ending a quoted `\"<path>\"` argument with a backslash (`'\\'`), this will cause the PACKPATH to not be found. `\"C:\\foo\\bar\"` will work, while `\"C:\\foo\\bar\\\"` will not.\n\nExample: Ping the device on a PIC16F15244 Curiosity Nano\n```bash\npymcuprog ping -p \"c:\\Program Files (x86)\\Microchip\\MPLABX\\v5.40\\packs\\Microchip\\PIC16F1xxxx_DFP\\1.4.119\\scripts\\pic16f15244\"\n```\n\n### Serial port UPDI (pyupdi)\nThe AVR UPDI interface implements a UART protocol, which means that it can be used by simply connecting TX and RX pins of a serial port together with the UPDI pin; with a series resistor (eg: 1k) between TX and UPDI to handle contention. (This configuration is also known as \"pyupdi\".) Be sure to connect a common ground, and use a TTL serial adapter running at the same voltage as the AVR device.\n\n<pre>\n Vcc Vcc\n +-+ +-+\n | |\n +---------------------+ | | +--------------------+\n | Serial port +-+ +-+ AVR device |\n | | +----------+ | |\n | TX +------+ 1k +---------+ UPDI |\n | | +----------+ | | |\n | | | | |\n | RX +----------------------+ | |\n | | | |\n | +--+ +--+ |\n +---------------------+ | | +--------------------+\n +-+ +-+\n GND GND\n</pre>\n\npymcuprog includes this implementation as an alternative to USB/EDBG-based tools. To connect via a serial port, use the \"uart\" tool type with the UART switch in addition.\n\nExample: checks connectivity by reading the device identity\n```bash\npymcuprog ping -d avr128da48 -t uart -u com35\n```\n\nWhen using serial port UPDI it is optional to use:\n* --clk BAUD to specify the baud rate (defaults to 115200)\n* --uart-timeout TIMEOUT to specify the uart read timeout (defaults to 1.0s)\n\nIncreasing the baud rate can decrease programming time. Decreasing the timeout can decrease the initial connection latency when UPDI is disabled and does not respond. These parameters can be tweaked to suit the serial port adapter in use.\n\n\n### Library\npymcuprog can be used as a library using its backend API. For example:\n```python\n# pymcuprog uses the Python logging module\nimport logging\nlogging.basicConfig(format=\"%(levelname)s: %(message)s\", level=logging.WARNING)\n\n# Configure the session\nfrom pymcuprog.backend import SessionConfig\nsessionconfig = SessionConfig(\"atmega4808\")\n\n# Instantiate USB transport (only 1 tool connected)\nfrom pymcuprog.toolconnection import ToolUsbHidConnection\ntransport = ToolUsbHidConnection()\n\n# Instantiate backend\nfrom pymcuprog.backend import Backend\nbackend = Backend()\n\n# Connect to tool using transport\nbackend.connect_to_tool(transport)\n\n# Start the session\nbackend.start_session(sessionconfig)\n\n# Read the target device_id\ndevice_id = backend.read_device_id()\nprint (\"Device ID is {0:06X}\".format(int.from_bytes(device_id, byteorder=\"little\")))\n```\n\n## Logging\nThis package uses the Python logging module for publishing log messages to library users.\nA basic configuration can be used (see example), but for best results a more thorough configuration is recommended in order to control the verbosity of output from dependencies in the stack which also use logging.\nSee logging.yaml which is included in the package (although only used for CLI)\n\n## Dependencies\npymcuprog depends on pyedbglib for its transport protocol.\npyedbglib requires a USB transport library like libusb. See pyedbglib package for more information.\n\n## Versioning\npymcuprog version can be determined using the CLI:\n```bash\npymcuprog -V\n```\n\nor using the library:\n```python\nfrom pymcuprog import __version__ as pymcuprog_version\nprint(\"pymcuprog version {}\".format(pymcuprog_version))\n```\n\nIn addition, the CLI-backend API is versioned for convenience:\n```python\nfrom pymcuprog.backend import Backend\nbackend = Backend()\nprint(\"pymcuprog backend API version: {}\".format(backend.get_api_version()))\n```\n\n## Supported devices and tools\npymcuprog is primarily intended for use with PKOB nano (nEDBG) debuggers which are found on Curiosity Nano kits and other development boards. This means that it is continuously tested with a selection of AVR devices with UPDI interface as well as a selection of PIC devices. However since the protocol is compatible between all EDBG-based debuggers (pyedbglib) it is possible to use pymcuprog with a wide range of debuggers and devices, although not all device families/interfaces have been implemented.\n\n### Debuggers / Tools\npymcuprog supports:\n* PKOB nano (nEDBG) - on-board debugger on Curiosity Nano\n* MPLAB PICkit 4 In-Circuit Debugger (when in 'AVR mode')\n* MPLAB Snap In-Circuit Debugger (when in 'AVR mode')\n* Atmel-ICE\n* Power Debugger\n* EDBG - on-board debugger on Xplained Pro/Ultra\n* mEDBG - on-board debugger on Xplained Mini/Nano\n* JTAGICE3 (firmware version 3.0 or newer)\n\nAlthough not all functionality is provided on all debuggers/boards. See device support section below.\n\n### Devices\npymcuprog supports:\n* All UPDI devices, whether mounted on kits or standalone\n* PIC devices mounted on Curiosity Nano kits, or similar board with PKOB nano (nEDBG) debugger\n\nOther devices (eg ATmega328P, ATsamd21e18a) may be partially supported for experimental purposes\n\n## Notes for Linux\u00ae systems\nThis 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\n\n# Changelog\n\n\n## [3.17] - March 2024\n\n### Added\n- DSG-7091 Add CLI command to convert hex file to UF2\n\n### Changed\n- DSG-6630 Improve presentation of memory data on console\n\n### Fixed\n- DSG-6636 UPDI devices tinyAVR(R)/megaAVR(R) overwrites preceding bytes when writing single values to user row\n- DSG-7110 Programming failure of AVR64DU32 target with pymcuprog\n- DSG-7223 Serial UPDI uses Flash page buffer erase for EEPROM on AVR EA and EB\n- DSG-7224 Serial UPDI does not support writing complete user row in one operation for AVR DU\n\n## [3.16] - November 2023\n\n### Added\n- DSG-6057 Added support for BOOT_ROW memtype\n- DSG-6631 Added serialupdi support for P:4 and P:5\n- DSG-6213 Added AVR EB\n\n### Changed\n- DSG-5887 Refactor serialupdi NVM variants\n- DSG-6210 Made serialupdi logging more concise\n- DSG-6533 Help tweaks\n\n### Fixed\n- DSG-5817 Improved error handling with SAM devices\n- DSG-6409 Error return code when --verify fails\n- DSG-6590 Corrected AVR Ex to use 24-bit addressing for serialupdi\n\n## [3.14] - October 2022\n\n### Added\n- DSG-5158 github-28 Added CLI switch for serial port read timeout\n- DSG-5421 Added support for AVR DU and additional AVR DD devices\n\n### Changed\n- DSG-5418 Added Python 3.10 metadata tag\n- DSG-5543 Removed Python 3.6 metadata tag\n- DSG-5417 Removed distutils usage\n\n### Fixed\n- DSG-5157 github-29 Fixed return value on error\n- DSG-4836 Corrected flash offset compensation for avrdebugger\n\n## [3.13] - May 2022\n\n### Added\n- DSG-3936 Fixed AVR ISP implementation and added commands (beta)\n- DSG-4172 github-10 Disable ACK response signature on serialUPDI block write (speed-up)\n- DSG-3951 github-8 Added --erase argument to erase device before write with single execution\n- DSG-3972 CLI help additions\n- DSG-3997 Added debugwire_disable() to Avr8Protocol\n\n### Fixed\n- DSG-3945, DSG-3938 Unable to write fuse byte 0 on Curiosity Nano ATtiny kits\n- DSG-4488 github-19 Return bytearray (not list) from serialUPDI read\n- DSG-4594 SAMD21 performance improvement (SAM-IoT provisioning)\n- DSG-4540 Fixed SAMD21 non-word-oriented read failure\n- DSG-3941 Improved feedback on verification failure\n- DSG-3944 Removed timeout warning for serialUPDI with a locked device\n- DSG-4419 Corrected AVR high voltage UPDI device data\n- DSG-3993 github-9 Corrected AVR signature sizes to make additional data available\n\n## [3.10] - October 2021\n\n### Added\n- DSG-2702 Add serialupdi backend for AVR EA\n- DSG-3633 github-3 Add missing AVR-DB devices\n- DSG-3635 github-4 Add missing ATtiny devices\n- DSG-3662 Add ascii-art for serialUPDI\n- DSG-3804 Add py39 metadata to package\n- DSG-3943 github-7 Add CLI documentation\n\n### Fixed\n- DSG-2859 github-1 serialUPDI write user_row on locked device fails\n- DSG-3538 github-2 Unable to write fuses on ATmega4809 using serialUPDI\n- DSG-3817 SAM D21 user row programming fails\n- DSG-3952 Incorrect size of FUSES on Dx, Ex devices\n\n## [3.9] - April 2021\n\n### Added\n- DSG-2920 Raise exception if device ID does not match\n- DSG-2918 SerialUPDI: error recovery if non-ascii characters are read in SIB\n- DSG-2861 Valid memory types are listed if an invalid one is specified\n\n### Fixed\n- DSG-3238 PIC16 eeprom displays incorrect address\n- DSG-3239 PIC16 eeprom verification does not work\n- DSG-2925 UPDI device revision not correctly parsed/displayed\n- DSG-2860 SerialUPDI: chip erase does not work on locked device\n- DSG-2857 SerialUPDI: crash when writing lockbits\n- DSG-2855 Verify action fails if hex file contains eeprom content\n- DSG-2854 User row excluded when reading to hex file\n- DSG-2850 UPDI device model fix (sram)\n\n### Changed\n- DSG-2862 Improved exception handling\n- DSG-3203 Improved exception handling\n- DSG-3178 Cosmetic changes for publication\n\n## [3.7.4] - December 2020\n\n### Added\n- DSG-1492 Added verify function\n- DSG-2039 Added all UPDI devices\n- DSG-2279 Added error codes\n- DSG-1550 Flash-only erase\n\n### Fixed\n- DSG-2470 No feedback when multiple kits are connected\n- DSG-2014 Error when reading using -m and -o but no -b\n- DSG-2738 Padding to page size when writing user row on locked device\n\n### Changed\n- DSG-2234 Logging using logging module\n- DSG-2034 prevent read using -b with no -m specified\n- DSG-2009 prevent writing from hexfile with memory type specified\n- DSG-2012 prevent writing from hexfile with offset specified\n- DSG-2458 documentation changes\n- DSG-2041 documentation changes\n- DSG-2042 documentation changes\n- DSG-2043 documentation changes\n- DSG-2011 documentation changes\n\n## [3.1.3] - June 2020\n- First public release to PyPi\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Tools for programming of MCUs using Microchip CMSIS-DAP based debuggers",
"version": "3.17.3.45",
"project_urls": null,
"split_keywords": [
"microchip",
" nedbg",
" curiosity nano",
" pkob nano",
" debugger"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "24ef7a043e2d91bf69912041dffb82e7558d3c9062ed01cc098d45f5d9dc39f5",
"md5": "cd3a4ba577ebc67ef8b7cfb5830e556b",
"sha256": "94e9567584397ebc30237ecf84da724e7cfd37ef3bd3ddc0c21c1d18b7d9ed56"
},
"downloads": -1,
"filename": "pymcuprog-3.17.3.45-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cd3a4ba577ebc67ef8b7cfb5830e556b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=2.7",
"size": 224159,
"upload_time": "2024-03-22T09:31:12",
"upload_time_iso_8601": "2024-03-22T09:31:12.512811Z",
"url": "https://files.pythonhosted.org/packages/24/ef/7a043e2d91bf69912041dffb82e7558d3c9062ed01cc098d45f5d9dc39f5/pymcuprog-3.17.3.45-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-22 09:31:12",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pymcuprog"
}