Skip to content

πŸ”§ 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

pip install ipecmd-wrapper

πŸ’» 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

🀝 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.

  • πŸ”§ 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

Support