All Projects → MarsTechHAN → ch552tool

MarsTechHAN / ch552tool

Licence: GPL-3.0 license
An open sourced python tool for flashing WCH CH55x series USB microcontroller with bootloader v2.30, v2.31 & v2.40.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ch552tool

DAP-Cat-Programmer
An Open-Source CMSIS-DAP Debug Probe based on DAPLink and USB bus convert and it can realize USB convert to serial interface based in CH552, low-cost of $3 dollars
Stars: ✭ 57 (-41.84%)
Mutual labels:  ch551, ch552
arduino
required (and optional) source files for the Arduino development environment, specifically the hardware/arduino sub-directory, to support xmega processors
Stars: ✭ 18 (-81.63%)
Mutual labels:  microcontroller, usb
CH55x USB CompositeDevice
USB Composite Device Demo (Keyboard, Custom HID and Massive Storage) using CH55x
Stars: ✭ 94 (-4.08%)
Mutual labels:  usb, ch554
usb
Minimalist portable USB device stack for SAMD21, LPC1800, LPC4300, Xmega
Stars: ✭ 90 (-8.16%)
Mutual labels:  microcontroller, usb
nrf52-keyboard
A BLE & 2.4G Keyboard Firmware using nrf52810/52811/52832
Stars: ✭ 101 (+3.06%)
Mutual labels:  usb, ch552
CH552
L1 R1:WCH 24MHz MCS-51 USB MCU (CH552T/CH552P/CH552E/CH552G/CH551G)
Stars: ✭ 32 (-67.35%)
Mutual labels:  usb, wch
ISASTM
STM32-based ISA-over-USB-adapter
Stars: ✭ 86 (-12.24%)
Mutual labels:  usb
osx86 linux
osx86 install maker and utilities for Linux
Stars: ✭ 13 (-86.73%)
Mutual labels:  usb
Raspberry-MIDI-Controller
A python script that sends MIDI signals from the Raspberry (client) to a Computer (host)
Stars: ✭ 44 (-55.1%)
Mutual labels:  usb
stm32 i2c to usb hid multitouch
i2c to usb hid multi touch with stm32
Stars: ✭ 55 (-43.88%)
Mutual labels:  usb
grml-plus
Script to add grml (from grml.org) and more stuff to a USB key
Stars: ✭ 13 (-86.73%)
Mutual labels:  usb
EnvOpenPico
An open source RP2040 MCU Board Family
Stars: ✭ 87 (-11.22%)
Mutual labels:  microcontroller
Gesture-Detecting-Macro-Keyboard
Glorified Bluetooth macro keyboard with machine learning (TensorFlow Lite for Microcontrollers) running on an ESP32.
Stars: ✭ 68 (-30.61%)
Mutual labels:  microcontroller
m4vga-rs
VGA-style video output for STM32F4 processors, in Rust
Stars: ✭ 122 (+24.49%)
Mutual labels:  microcontroller
exynos-usbdl
Unsigned code loader for Exynos BootROM
Stars: ✭ 57 (-41.84%)
Mutual labels:  usb
vcvrack-rtlsdr
📻 FM radio for rtl-sdr USB dongles in the VCVRack environment
Stars: ✭ 20 (-79.59%)
Mutual labels:  usb
bl mcu sdk
bl_mcu_sdk is MCU software development kit provided by Bouffalo Lab Team for BL602/BL604, BL702/BL704/BL706, BL616/BL618, BL808 and other series of RISC-V based chips in the future.
Stars: ✭ 147 (+50%)
Mutual labels:  usb
microS2
microS2 - An esp32-s2 based development board 🚀
Stars: ✭ 18 (-81.63%)
Mutual labels:  microcontroller
STM32 USB CH341
STM32 USB simulates CH341.
Stars: ✭ 52 (-46.94%)
Mutual labels:  usb
8814au
Linux Driver for USB WiFi Adapters that are based on the RTL8814AU Chipset
Stars: ✭ 283 (+188.78%)
Mutual labels:  usb

ch55xtool

Now available on pypi

An open sourced python command line flash tool for flashing WinChipHead CH55x series 8051 USB micro controllers, including CH551, CH552, CH553, CH554, CH559, CH569 (including CH56x), etc. with bootloader version(BTV) above 2.30 (including 2.30, 2.31, 2.40, 2.71), etc. (You can check the verision by using the official CH55x Tool.)

Usage

  • -f/–flash <filename> Erase the whole chip, and flash the bin file to the CH55x.
  • -e/–erase_flash Erase the whole program flash.
  • –verify_flash [filename] Verify program flash contend with given file, if filename ommited verifying with flashed data. No verifying perormed without this flag.
  • -r/–reset_at_end Issue reset and run after all.
  • -d/–data <filename> Erase the whole data flash and write the bin file to the CH55x.
  • -c/–erase_dataflash Erase the whole data flash.
  • –verify_data [filename] Verify data flash contend with given file, if filename ommited verifying with written data. No verifying perormed without this flag.
  • -g/–read_dataflash Read content of data flash to file.
  • -p/–print_chip_cfg Read and print chip configuration bits 3 x 32 bit values.
python3 -m ch55xtool -f THE_BINARY_FILE.bin

Tool Setup

  • Linux Distros > Most Linux distros come with libusb, so you only need to install the pyusb packge.
python3 -mpip install ch55xtool
  • Mac OS
For Mac OS, you need to install both libusb and pyusb.
# If you dont have brew installed.
# /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install libusb
python3 -mpip install ch55xtool
  • As for Windows, oh no… :(

    1. First, you need to download the Zadig for replacing the CH375 driver from WCH to libusb.
    2. Click the Options->List all devices, to show all devices
    3. Find the device marked with USB Module, which presented driver is CH375_balabala
    4. Replace the driver with libusb-win32.
    5. Install the pyusb package with python -mpip install pyusb. Since for windows, they dont use python3, but you have to make sure you have the pythono3 in the PATH
    6. If you want to use the WCH Toolchain, open the device manager, find the device marked with libusb-win32 deives, right clicked on it, and Uninstall the driver and delete the driver. You can also check the FAQ of Zadig HERE.

FAQ

  • Why I got a Error: No backend available ?
On windows, this means you dont a valid libusb device, see the guide above. For other system, you might dont have the libusb installed, follow the guide above.
  • Why it said NO_DEV_FOUND ?
Pyusb unable to fine the device with given PID&VID. Maybe you dont power on your device, or it is not in DFU mode.
  • I got a USB_ERROR_CANNOT_SET_CONFIG error.
This high probability is a permission issue. Add SUBSYSTEM=="usb", ATTRS{idVendor}=="4348", MODE="0666" to /etc/udev/rules.d/50-ch55x.rules, and re-plug your device. Otherwise you need sudo.
  • I got a USB_ERROR_CANNOT_DETACH_KERNEL_DRIVER, or USB_ERROR_CANNOT_CLAIM_INTERFACE error.
I never met with those problems on a working CH552. Checking the power, the previliage, and praying may help.
  • What if it return Bootloader version not supported?
The program dont support BTVER lower than 2.30(welcome PR, but since they are too old, I dont have plan to support them). Or maybe they have a newer verison, for this situlation, it is welcome for you to open an issue.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].