Supports AVR, ARM (CMSIS-DAP), and CPLD (MAX II)
This project provides firmware for a USB-based programmer built on the CH552 microcontroller, supporting multiple programming targets and protocols, including AVR, ARM Cortex-M, and CPLD devices. The device includes target voltage selection (3.3V / 5V) and can be configured with different firmware to suit specific microcontroller families.
- Microcontroller: CH552G / CH552E / CH552P
- USB Full-Speed Interface (CDC / HID depending on firmware)
- Voltage Selector: 3.3V / 5V target supply switch
- Programmable firmware profiles:
- AVR Programmer (USBasp or Serial UPDI)
- ARM CMSIS-DAP Debugger (picoDAP firmware)
- CPLD JTAG Programmer (Quartus-compatible)
- Protocols: USBasp, SerialUPDI
- Target Devices: ATmega, ATtiny, and other AVR MCUs
- USB Interface: libusb-compatible
- Tool Compatibility:
avrdude
- PlatformIO
- Windows (Zadig/libusb)
- Voltage: Selectable 3.3V or 5V
Build Options:
- Compile with SDCC
- Or flash precompiled binaries using
tools/chprog.py
USBasp mode enumerates as USB HID device; Serial UPDI uses CDC port.
- Protocols: SWD, JTAG (CMSIS-DAP)
- Target Devices: ARM Cortex-M (e.g., STM32, SAM, nRF52)
- Tool Compatibility:
- OpenOCD
- PyOCD
- Keil µVision, SEGGER Ozone
- USB Interface:
- CMSIS-DAP via HID
- CDC UART (optional, for logging or VCP)
- Drivers:
- Linux/macOS: Native
Device appears as HID with optional serial COM port.
- Target Devices: Intel/Altera MAX II (e.g., EPM240)
- Protocol: JTAG via USB-Blaster protocol
- Tool Compatibility:
- Intel Quartus Programmer (via USB-Blaster emulation)
- USB VID/PID Options:
- Safe distribution mode (default):
0x16C0:0x05DC
- Compatibility mode:
0x09FB:0x6001
(for full Quartus support)
- Safe distribution mode (default):
- Voltage Selection: 3.3V / 5V via hardware switch
- Build System:
- Compile with SDCC
- Flash via WCH bootloader or
chprog.py
- SDCC Compiler
- Python 3 with
pyusb
sudo apt install build-essential sdcc python3 python3-pip
pip3 install pyusb
# For bootloader mode
python3 tools/chprog.py <firmware.bin>
Or use WCHISPTool for Windows.
To enter USB bootloader mode:
- Disconnect all power.
- Hold BOOT button.
- Reconnect USB while holding BOOT.
- Release button — the device enters bootloader mode.
Linux users: set proper udev rules if needed.
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="4348", ATTR{idProduct}=="55e0", MODE="666"' | sudo tee /etc/udev/rules.d/99-ch55x.rules
sudo udevadm control --reload
sudo udevadm trigger
Firmware | Protocols | Targets | USB Mode | Tools Supported |
---|---|---|---|---|
AVR Programmer | USBasp / UPDI | AVR (ATmega, ATtiny) | CDC / HID | avrdude , PlatformIO |
CMSIS-DAP | SWD, JTAG | ARM Cortex-M | HID + CDC | OpenOCD, PyOCD |
CPLD Programmer | JTAG (Blaster) | EPM240 / MAX II | HID | Quartus Programmer |
This project is licensed under the MIT License or Creative Commons Attribution-ShareAlike 3.0, depending on the firmware base used. Refer to each firmware subproject for license specifics.