π§ IPECMD Wrapper¶
A modern Python wrapper for the IPECMD command line interface (CLI) program, designed for programming PIC microcontrollers with a beautiful, validated CLI interface.
π Overview¶
IPECMD Wrapper provides a clean, Pythonic interface to the IPECMD command-line tool, making it easy to integrate PIC microcontroller programming into your Python projects and build systems. The latest version features a modern Typer-powered CLI with rich formatting and comprehensive input validation.
Warning
This project is currently in active development. APIs may change between versions.
AI-Generated Content Notice
A significant portion of this project's content (including code, documentation, and examples) has been generated using AI assistance. Please review all code and documentation carefully before use in production environments. We recommend thorough testing and validation of any AI-generated components.
β¨ Features¶
- π Cross-platform: Works on Windows, Linux, and macOS
- π Easy to use: Modern CLI with rich help output and Python API
- π― Flexible: Supports various PIC microcontrollers and programmers
- π‘οΈ Reliable: Comprehensive error handling and input validation
- π§ Modern: Built with modern Python packaging, Typer CLI, and development practices
- β Validated: Automatic validation of tool choices, file paths, and version selections
- π¨ Beautiful: Rich, color-coded CLI output with clear error messages
π Quick Start¶
π¦ Installation¶
π» Modern Command Line Usage¶
# Program a PIC microcontroller with the new validated CLI
ipecmd-wrapper PIC16F876A PK3 --file firmware.hex --power 5.0 --ipecmd-version 6.20
# Get beautiful, organized help
ipecmd-wrapper --help
# Test programmer connection
ipecmd-wrapper PIC16F876A PK4 --file firmware.hex --power 5.0 --test-programmer
π¨ Rich CLI Features¶
The new CLI provides:
- β Input Validation: Tool choices, file paths, and versions are automatically validated
- π― Required vs Optional: Clear distinction between required and optional arguments
- π Rich Help: Beautiful, organized help output with syntax highlighting
- π Clear Errors: Helpful error messages with suggestions for valid inputs
π Python API¶
from ipecmd_wrapper import upload_firmware
# Upload firmware to PIC
success = upload_firmware(
hex_file="firmware.hex",
device="PIC16F876A",
programmer="pickit3"
)
if success:
print("Upload successful!")
else:
print("Upload failed!")
π― Supported Features¶
- π§ Devices: All PIC microcontrollers supported by IPECMD
- π± Programmers: PICKit 3, PICKit 4, ICD 3, ICD 4, and more
- β‘ Operations: Programming, verification, device detection
- π Formats: Intel HEX files
π Requirements¶
- π Python 3.9+
- π§ IPECMD installed and accessible in PATH
- π± Compatible PIC programmer hardware
Documentation¶
- π¦ Installation Guide
- π Quick Start
- π» Command Line Reference
- π Python API Reference
- π Examples
- π οΈ Development Guide
π€ Contributing¶
We welcome contributions! Please see our π€ Contributing Guide for details.
π License¶
This project is licensed under the MIT License - see the π LICENSE file for details.
Related Projects¶
- π§ XC8 Wrapper - Modern Python wrapper for the XC8 C compiler toolchain
- Perfect companion for compiling PIC microcontroller firmware before programming
- Cross-platform support for Windows, Linux, and macOS
- GitHub Repository