• Stars
    star
    146
  • Rank 252,769 (Top 5 %)
  • Language
    C
  • Created almost 7 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Open-source CH55x flashing tool, SDK....

LibreCH551

An open-source command line flasher program and SDK library for WCH(Nanjing QinHeng Corp.)'s CH55x family. Our Wiki contains a lot of useful tips, it's worth to check out!

The CH55x is a series of 8051 microcontroller with dedicated USB peripheral. CH553/CH554 can be programmed as a USB host. The cheapest one, CH551 only costs 1.5 CNY in retail. It is the ultimate and ideal solution for many low-end USB applications.

Up to now, we have tested out CH551 and CH554, all functions work fine except option byte.

If someone want to help me, please start, fork and support more chips, Thanks!

TODO

Implement chip programming via UART for devices workign on USB Host mode. (It is very simple to realize: just add serial port interface to the program and 0x619e, accumulate checksum in packet tail).

Implement new CH55x ISP protocol (for bootloader version > 2.30), for now we don't have any chip shipped with the new bootloader: WCH's FAE said that they will release chips with new bootloader after Apr.2018.

Contributions are always welcome

Command Line Parameters

  • -f <filename> Erase the code flash and download binary codes to CH55x, note that this tool only accepts .bin files, .hex files will not be accepted. The Eclipse SDCC environment with the setup described in our wiki automatically generates .bin file. To convert a hex file to bin file, on Linux, use objdump, on Windows, use hex2bin.exe in win_tools.zip.
  • -g Execute the user program after downloading
  • -e Erase chip only
  • -D <filename> Read data flash to a file
  • -d <filename> Write the content of a file to data flash
  • -h Display help message

For Linux Users

  • Build: Type make in usbisp directory.
  • Install:Type make install in usbisp directory, you can also pass DESTDIR to the script to set installation path.
  • Linux does not require a specific driver for this program.

For Windows Users

  • The Tool pack for Windows is available here.
  • The wiki page "Setup SDCC developing environment with Eclipse" demonstrates how to setup an IDE for better code editing.
  • On Windows, CH554 ISP mode requires a libusb driver implementation to enable direct device access for librech551.

Driver Installation

  1. Connect your CH55x to one of USB ports on your PC, make sure the MCU enters ISP mode.
  2. Launch zadig (included in win_tools.zip), open Options menu and click List All Devices, you should be able to find your CH55x (Usually names USB Module), optionally you can change its name by check the Edit box.
  3. Double check that the USB ID is correct, USB ID is VID plus PID, for CH554, the USB ID is 4348 55E0.
  4. Select libusb-win32 and click Install Driver, quit Zadig after driver installation.
  • Note: due to unknown reason, sometimes the libusbK driver won't work on some machine with very new USB 3.1 controller. If your PC can not recognize the USB ISP device, try winusb or libusb-win32 instead.

Build Executables

  • Generate EXE file for Microsoft Windows requires Microsoft Visual Studio 2017 and Windows Kits 10.0.15063.0 or above. If your system does not meet the stated requirement, go to Microsoft's website and download the installer for Microsoft Visual Studio 2017 Community Version.
  • It is possible to compile the source with legacy Visual Studio although it is not officially supported.
  1. Download the entire repository and unzip to anywhere you like
  2. Navigate to msvc folder and create a folder called libusb under msvc directory
  3. Go to https://github.com/libusb/libusb/releases to get the latest stable binary snapshots of libusb(e.g. libusb v1.0.21), download the file with extension 7z or tar.bz, then unzip it to msvc\libusb. Now your msvc\libusb should contain at least these folders : MS32, MS64 and include
  4. Launch msvc\librech551.sln and choose your targeting platform (e.g. Release x64), then start compiling.
  • (Windows version only) To remove VC runtime dependency, releases on Github release page is built on Visual C++ together with VC-LTL.

License

GPLv3

Author(s)

Zhiyuan Wan [email protected]

Rikka0w0

More Repositories

1

kamikaze

Light-weight RISC-V RV32IMC microcontroller core.
Verilog
103
star
2

open-ec

Opensource embedded controller firmware for sipeed boards.
C
32
star
3

bapi-rv32i

A extremely size-optimized RV32I soft processor for FPGA.
Verilog
27
star
4

AMBA

Collection of IPs based on AMBA (AHB, APB, AXI) protocols
SystemVerilog
20
star
5

hdcopy-tools

Utility to decompress HD-COPY floppy images.
C
12
star
6

ch55x_usbmidi

CH55x USB MIDI Host & Device.
C
7
star
7

USBtiny

Yet another software USB-Device stack for AVR
C
7
star
8

DSD-Tools

Some useful tools for working on Delta-Sigma Modulator.
C
4
star
9

sofapan

Binaural Renderer Plugin. Can load HRTFs in the SOFA file format and customize it. Audio Plugin based on JUCE. Under Dev.
C
4
star
10

urv-core

Fork of uRV-core, addition RVC support please checkout amba branch.
C
3
star
11

stm32-gcc

Just a stm32-gcc tree, for usb porting
C
3
star
12

rhapsody

Garbage collection.
Python
3
star
13

zaudiodriverwin

prototype of UAC2 driver
C++
2
star
14

anlogic-tools

Opensource tools for Anlogic FPGA.
C
2
star
15

butterfly

An Arduino emulation on Anlogic FPGA platform.
2
star
16

common-ipcores

Common IP cores by Zhiyuan Wan. MIT license.
1
star
17

st7565

st7565 LCD driver
C
1
star
18

hamaya-tools

Some tools to hack up digital music workstation produced by hamaya
C
1
star
19

homemade_pbx

STM32 controlled, CH446 based space division telephone switch.
1
star
20

Rocaloid-Debian

Debian package configure for Rocaloid packages.
Elixir
1
star
21

stm8flasher

A STM8 downloader.
C
1
star
22

font-tools

Font tools included HZKSL/HZKPS font reading, compressing and anti-aliasing for embedded system.
C
1
star
23

general-cores

Mirror of git://ohwr.org/hdl-core-lib/general-cores.git
VHDL
1
star
24

usb3-gl32xx-reverse

USB 3.0 Card Reader chip: GL32xx series chip firmware reversing for fast FPGA FIFO usage.
1
star
25

exflm

YAMAHA EX5/EX7/EX5R Flash module schematic
1
star