MikroC PIC32 Bootloader Extension

Flash PIC32 microcontrollers using the MikroC HID bootloader directly from Visual Studio Code.

Features
- 🚀 One-Click Flashing: Flash .hex files to PIC32 devices with a single command
- ⚡ Status Bar Button: Quick access button in the status bar (click "⚡ Flash PIC32")
- 🔍 Auto-Discovery: Automatically finds .hex files in your workspace
- 📁 Multiple Files: Quick picker when multiple .hex files are found
- 💻 Terminal Integration: See bootloader output in real-time
- ⚙️ Configurable: Customize bootloader path, file patterns, and UI elements
- 🛡️ Error Handling: Clear, actionable error messages
Prerequisites
Required
- MikroC HID Bootloader: Download from MikroC_bootloader
- PIC32 Device: With MikroC bootloader firmware installed
- USB Connection: Or serial connection (depending on bootloader mode)
Recommended
- VS Code 1.106.1 or later
- Windows OS (tested on Windows 10/11)
Installation
From VS Code Marketplace (Coming Soon)
- Open VS Code
- Press
Ctrl+Shift+X to open Extensions
- Search for "MikroC PIC32 Bootloader"
- Click Install
From VSIX File
- Download the latest
.vsix from Releases
- Open VS Code
- Press
Ctrl+Shift+P
- Type "Install from VSIX"
- Select the downloaded file
From Source
git clone https://github.com/Davec6505/mikroc-bootloader-plugin.git
cd mikroc-bootloader-plugin
npm install
npm run compile
npx @vscode/vsce package
code --install-extension mikroc-pic32-bootloader-1.0.0.vsix
Configuration
- Open VS Code Settings (
File > Preferences > Settings)
- Search for "MikroC PIC32"
- Configure:
- Bootloader Path: Path to your
mikro_hb.exe location
- Hex File Pattern: Glob pattern for finding .hex files (default:
**/*.hex)
- Show Status Bar Button: Show/hide the quick access button (default: enabled)
Example:
{
"mikroc-pic32-bootloader.bootloaderPath": "C:\\Tools\\mikro_hb.exe",
"mikroc-pic32-bootloader.hexFilePattern": "**/*.hex",
"mikroc-pic32-bootloader.showStatusBarButton": true
}
Usage
Basic Workflow
Method 1: Status Bar Button (Quickest)
- Connect Device: Connect your PIC32 device and ensure it's in bootloader mode
- Click Button: Click the "⚡ Flash PIC32" button in the status bar (bottom-left)
- Select File: If multiple .hex files exist, select the one to flash
- Monitor: Watch the terminal output for flash progress
Method 2: Command Palette
- Connect Device: Connect your PIC32 device and ensure it's in bootloader mode
- Open Project: Open your MikroC project workspace in VS Code
- Flash: Press
Ctrl+Shift+P and type "MikroC PIC32: Flash Device"
- Select File: If multiple .hex files exist, select the one to flash
- Monitor: Watch the terminal output for flash progress
Keyboard Shortcut (Optional)
Add a custom keybinding in keybindings.json:
{
"key": "ctrl+alt+f",
"command": "mikroc-pic32-bootloader.flash"
}
Troubleshooting
Common Issues
| Issue |
Solution |
| "Bootloader path not configured" |
Set the path in VS Code settings |
| "No .hex files found" |
Ensure your project has compiled .hex files |
| "Exit code: 1" |
Device not connected or not in bootloader mode |
| "No output from bootloader" |
Check USB connection and device status |
Debug Steps
- Verify
mikro_hb.exe exists at configured path
- Test bootloader manually:
mikro_hb.exe path\to\file.hex
- Check VS Code Output panel (View > Output > MikroC Bootloader)
- Check terminal output for detailed error messages
Development
See DEVELOPER_GUIDE.md for:
- Code architecture
- API documentation
- Building from source
- Contributing guidelines
Learning Resources
See VIDEO_TUTORIALS.md for:
- VS Code extension development tutorials
- TypeScript learning resources
- Step-by-step guides
Contributing
Contributions are welcome! See CONTRIBUTING.md for guidelines.
Changelog
See CHANGELOG.md for version history.
License
MIT License - see LICENSE file for details.
Support
Acknowledgments
- MikroElektronika for the MikroC compiler
- VS Code team for excellent extension APIs
⭐ If this extension helped you, please star the repo!
Features
- Flash .hex files to PIC32 devices via USB HID
- Automatic detection of .hex files in your workspace
- Quick picker when multiple .hex files are found
- Integrated terminal output for bootloader status
Usage
- Open a workspace containing your PIC32 project with .hex files
- Press
Ctrl+Shift+P and type "Flash to PIC32 Device"
- Select the .hex file to flash (if multiple are found)
- The bootloader will execute and flash your device
Extension Settings
This extension contributes the following settings:
mikroc-pic32-bootloader.bootloaderPath: Path to the mikro_hb.exe bootloader executable
mikroc-pic32-bootloader.hexFilePattern: Glob pattern to search for .hex files (default: **/bins/**/*.hex)
Release Notes
0.0.1
Initial release - Flash PIC32 devices via USB HID bootloader
Following extension guidelines
Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.
Working with Markdown
You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
- Split the editor (
Cmd+\ on macOS or Ctrl+\ on Windows and Linux).
- Toggle preview (
Shift+Cmd+V on macOS or Shift+Ctrl+V on Windows and Linux).
- Press
Ctrl+Space (Windows, Linux, macOS) to see a list of Markdown snippets.
Enjoy!