Configuration¶
IPECMD Wrapper can be configured through command-line arguments, environment variables, or configuration files. The new Typer-powered CLI provides enhanced validation and user experience.
Modern CLI Features¶
Input Validation¶
The CLI automatically validates: - Tool choices: Only supported programmers (PK3, PK4, ICD3, etc.) are accepted - Version choices: Only supported MPLAB IPE versions (5.50, 6.00, 6.05, 6.10, 6.15, 6.20, 6.25) are accepted - File paths: Hex files are verified to exist before processing - Required arguments: All required parameters must be provided
Rich Help Output¶
Get beautiful, organized help with:
This displays: - ✅ Clear separation between required and optional arguments - 🎨 Syntax highlighting and rich formatting - 📝 Detailed descriptions for each option - 🔍 Validation information for enum choices
Command Line Arguments¶
All configuration options are available as command-line arguments. The new CLI uses long-form names by default with short aliases:
# Modern syntax (recommended)
ipecmd-wrapper PIC16F876A PK3 --file firmware.hex --power 5.0
# With explicit options (also supported)
ipecmd-wrapper PIC16F876A PK3 -F firmware.hex -W 5.0
Environment Variables¶
You can set default values using environment variables:
IPECMD_PATH
¶
Default path to IPECMD executable:
IPECMD_VERSION
¶
Default IPECMD version:
PIC_PROGRAMMER
¶
Default programmer type:
PIC_POWER_VOLTAGE
¶
Default target power voltage:
Configuration Files¶
Project Configuration¶
Create a .ipecmd-wrapper.json
file in your project directory:
{
"device": "PIC16F876A",
"programmer": "PK3",
"power": 5.0,
"ipecmd_version": "6.20",
"default_options": {
"erase": true,
"verify": "P",
"memory": "P"
}
}
User Configuration¶
Create a user-level configuration file:
Windows: %APPDATA%\ipecmd-wrapper\config.json
Linux/macOS: ~/.config/ipecmd-wrapper/config.json
Priority Order¶
Configuration values are resolved in this order (highest to lowest priority):
- Command-line arguments
- Environment variables
- Project configuration file
- User configuration file
- Default values
Supported Devices¶
The wrapper supports all PIC microcontrollers supported by IPECMD, including:
- PIC10F series
- PIC12F series
- PIC16F series
- PIC18F series
- PIC24F series
- PIC32 series
- dsPIC series
Supported Programmers¶
- PK3: PICkit 3
- PK4: PICkit 4
- PK5: PICkit 5
- ICD3: MPLAB ICD 3
- ICD4: MPLAB ICD 4
- ICD5: MPLAB ICD 5
- ICE4: MPLAB ICE 4
- RICE: MPLAB REAL ICE
- SNAP: MPLAB SNAP
- PM3: MPLAB PM3
- PKOB: PICkit On Board
- PKOB4: PICkit 4 On Board
- J32: MPLAB J32
Advanced Configuration¶
Logging¶
Enable debug logging:
Timeout Settings¶
Set custom timeout for operations:
Custom Commands¶
Override default IPECMD commands: