Skip to content

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

  1. πŸ“¦ Install XC8 Wrapper - Complete installation guide
  2. πŸš€ Create your first project - Step-by-step tutorial with LED blink example
  3. πŸ“– Learn the CLI - Complete command reference
  4. πŸ’‘ 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

πŸ”§ IPECMD Wrapper

Complete your PIC development workflow with our companion project:

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