A PlatformIO platform for Microchip PIC microcontroller programming (8bit).
For complete documentation, installation instructions, usage examples, and API reference, visit:
https://s-celles.github.io/platform-pic8bit/
- 🔧 Build and upload firmware for PIC 8-bit MCUs using PlatformIO
- ✅ Supports (at least partially) XC8 toolchain via
xc8-wrapper
- 🎯 Uploads HEX files using
ipecmd-wrapper
and MPLAB IPECMD
This is an unofficial, community-maintained PlatformIO platform for Microchip PIC 8-bit microcontrollers.
It is experimental and not endorsed or supported by Microchip (nor by PlatformIO team). Use at your own risk.
Features may change and stability is not guaranteed.
This package provides a PlatformIO platform for PIC microcontrollers (8bit). It interfaces with Microchip's XC8 compiler and MPLAB IPE command-line tool (IPECMD). But it does NOT include the actual MPLAB IPE software nor XC8 compiler.
The XC8 compiler & MPLAB IPE tools are proprietary software owned exclusively by Microchip Technology Inc. You must obtain proper licenses from Microchip to use these tools.
- 📚 Documentation - Complete documentation
- 💾 Repository - Source code
- 🐛 Issues - Bug reports
- 💡 Feature Requests - Discussions and feature requests
- 📝 Changelog - Release history
platform-pic8bit is released under the Apache Licence 2.0 (see LICENSE file). Microchip XC8 compiler & MPLAB IPE Tools: Proprietary Microchip licenses (separate licensing required)
- This platform is unofficial and not supported by Microchip.
- Make sure XC8 compiler is installed for compiling.
- Make sure MPLAB X and IPECMD are installed for uploading.
- Dependencies are automatically installed when you install the platform
When you install this platform, it will automatically install the required Python dependencies:
# Install platform (dependencies installed automatically)
pio platform install file://path/to/platform-pic8bit
# Or install from repository
pio platform install https://github.com/s-celles/platform-pic8bit.git
If automatic installation fails, you can install dependencies manually:
# Option 1: Install the whole package (recommended)
pip install -e .
# Option 2: Install individual dependencies
pip install git+https://github.com/s-celles/xc8-wrapper.git
pip install git+https://github.com/s-celles/ipecmd-wrapper.git
# Option 3: Use the setup script
python setup_dependencies.py
# Option 4: Use the console script (if package is installed)
setup-pic8bit-deps
For development work:
# Clone and install in development mode
git clone https://github.com/s-celles/platform-pic8bit.git
cd platform-pic8bit
pip install -e .[dev]
# Run tests
pytest
# Format code
black .
# Type checking
mypy .
Before using this platform, ensure you have installed:
- XC8 Compiler from Microchip (required for compilation)
- MPLAB X IDE with IPECMD (required for uploading to device)
# Create new project
pio project init --board pic16f876a --project-option "framework=pic-xc8"
# Build project
pio run
# Upload to device
pio run -t upload
- See
requirements.txt
for Python dependencies.
Contributions welcome! See the Contributing Guide for setup instructions and contribution guidelines.
Made with ❤️ by Sébastien Celles for the PIC developer community.