π§ XC8 Wrapper Documentation¶
A modern, secure, and cross-platform wrapper for the Microchip XC8 compiler toolchain.
Get started now View it on GitHub
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.
π What is XC8 Wrapper?¶
XC8 Wrapper is a Python-based command-line tool that provides a modern, user-friendly interface to the Microchip XC8 compiler. It simplifies PIC microcontroller development by offering:
- π Easy-to-use CLI with intuitive commands and options
- π Security-first design with input validation and safe execution
- π Cross-platform support for Windows, Linux, and macOS
- π¨ Rich terminal output with colors and progress indicators
- β‘ Smart XC8 detection that finds your compiler installation automatically
- π§ͺ Comprehensive testing with 78%+ code coverage
π Quick Start¶
π¦ Installation¶
# Install from source (development version)
pip install git+https://github.com/s-celles/xc8-wrapper.git
# Install from PyPI (when available)
# pip install xc8-wrapper
π» Basic Usage¶
# See available commands
xc8-wrapper --help
# Install XC8
xc8-wrapper install
# Compile a simple PIC project
xc8-wrapper cc --xc8-version 3.00 --cpu PIC16F877A main.c
# Compile with optimization and verbose output
xc8-wrapper cc --xc8-version 3.00 --cpu PIC16F877A -O2 -v main.c
Getting Started¶
- π¦ Install XC8 Wrapper - Complete installation guide
- π Create your first project - Step-by-step tutorial with LED blink example
- π Learn the CLI - Complete command reference
- π‘ See examples - Real-world usage patterns and integrations
Documentation¶
Section | Description |
---|---|
π¦ Installation | Installing XC8 Wrapper and XC8 compiler |
π Getting Started | Your first PIC project tutorial |
π CLI Reference | Complete command-line documentation |
π‘ Examples | Real-world usage examples and patterns |
β FAQ | Frequently asked questions and solutions |
π οΈ Development | Development setup and tools guide |
π€ Contributing | Contributing guidelines and workflow |
Features Overview¶
Cross-Platform Compatibility¶
- Windows: Supports both 64-bit and 32-bit Program Files locations
- macOS: Checks
/Applications
and/opt
installation paths - Linux: Supports
/opt
and/usr/local
installation directories
Security Features¶
- Input validation and sanitization
- Path traversal protection
- Executable whitelist enforcement
- Secure subprocess execution
Developer Experience¶
- Colorized terminal output
- Progress indicators and status messages
- Detailed error reporting with helpful suggestions
- Comprehensive logging and debugging options
Requirements¶
- Python: 3.9 or higher
- XC8 Compiler: Any version (2.xx, 3.xx, ...)
- Operating System: Windows, macOS, or Linux
Related Projects¶
π§ IPECMD Wrapper¶
Complete your PIC development workflow with our companion project:
- π¦ Repository: s-celles/ipecmd-wrapper
- π Documentation: s-celles.github.io/ipecmd-wrapper
- π― Purpose: Modern Python wrapper for MPLAB IPE command-line programming tool
Perfect Combination: Use XC8 Wrapper to compile your PIC code, then use IPECMD Wrapper to program it to your microcontroller!
# Complete workflow example
pip install xc8-wrapper ipecmd-wrapper
# 1. Compile with XC8 Wrapper
xc8-wrapper cc --xc8-version 3.00 --cpu PIC16F877A main.c
# 2. Program with IPECMD Wrapper
ipecmd-wrapper -P 16F877A -T PK3 -F dist/main.hex -W 5.0
π License¶
This project is licensed under the MIT License. See the LICENSE file for details.
π€ Contributing¶
We welcome contributions! Please see our Contributing Guide for detailed information on how to contribute to this project.
π¬ Support¶
- π Documentation: You're reading it!
- π Bug Reports: GitHub Issues
- π‘ Feature Requests: GitHub Discussions
- π§ Contact: s-celles