A utility for programming PIC microntronllers.
Project description
picchick
piccchick
is a commandline utility written in python that interacts with
various programmers in order to flash the memory of a microcontroller.
The function is the same as avrdude
, i.e. to provide a way to flash a compiled
.hex file onto a microcontroller. The typical development stack involving
picchick looks like:
Developing (nano) > Compiling (xc8-cc) > Flashing (picchick)
The latest documentation is available in the docs/ folder, or hosted online at rexploits.com/picchick
Installation
Requirements
- xc8 compiler
- Available from Microchip's website
- python >= 3.10
- pyserial
- Compatible serial programmer
- See above for information about programmers.
From PyPi
picchick
can be installed using pip:
pip install picchick
From Source
Building the latest git version is as simple as pip installing the repo
directory. The -e, --editable flag can be added so a git pull
will update the
picchick
command automatically.
git clone https://github.com/Rex--/picchick.git
cd picchick/
pip install [-e] .
picchick -h
Instead of installing the package, picchick
can also be run as a python module:
python -m picchick -h
A wrapper script is provided that does this, providing a bit cleaner interface:
chmod +x picchick.sh
./picchick.sh -h
NOTE: You may have to install pyserial for the above methods.
Usage
$> picchick -h
usage: picchick [--read addr] [--write addr word] [--erase [addr]] [--verify] [-f] [--map] [--list-ports] [hexfile]
picchick -d <mcu> -c <programmer> -P <port> -B <baud> [--erase] [--verify] [--reset] -f <hexfile>
picchick [-d mcu] --map [hexfile]
A utility to aid in programming PIC microcontrollers
positional arguments:
hexfile path to a hexfile
options:
-h, --help show this help message and exit
-d mcu, --device mcu device to be programmed
-c programmer type of programmer
-P port, --port port programmer serial port
-B baud, --baud baud serial connection baudrate
--read addr read word at specified address
--write addr word write word to specified address
--erase [addr] erase device or specified address
-f, --flash flash hexfile onto the device
--verify verify device memory
--reset reset device
--map display the hexfile
--list-ports list available serial ports
flag arguments:
addr: device memory address in hexadecimal
'all' all device memory areas
'flash' user flash area
Examples
The typical command to erase then flash a hexfile onto a device looks like:
picchick -d <mcu> -c <programmer> -P <port> -B <baud> [--erase] [--verify] -f <hexfile>
picchick -c picstick -d 16lf19196 -P /dev/ttyACM0 -B 115200 --erase -f blink.hex
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file picchick-0.3.1.tar.gz
.
File metadata
- Download URL: picchick-0.3.1.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.12.0 keyring/23.4.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b054d087145b8efbb28aa46f90f683ccae6f0f1423379b2ea7fe5286d57fd833 |
|
MD5 | 6074b7b1fb037cdfc5df19bb08fd6c76 |
|
BLAKE2b-256 | 07211b95a67865c36f170455b70e899dff4fe2111bd49f9e4ad06555fe2edad3 |
File details
Details for the file picchick-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: picchick-0.3.1-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.12.0 keyring/23.4.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b3c815487194498fc405594c9ab4c32b7b3797c3f22fe0908945d5645bc70ed |
|
MD5 | aac892ea8263a66183f85cbe04f27a9b |
|
BLAKE2b-256 | ecb45eec0158d7153be72a6dca860a70e892b22487dff5e602510a511706fa1b |