This example program blinks the LED connected to pin 0 of GPIO port 3 at 2 Hz. There's no external header files, register defines, or libraries required to build. This project uses CMake for the build system and SDCC for the compiler.
- Buy a CH551 development board from http://www.electrodragon.com/product/ch551-mini-dev-board-ch55x-series/
- Install CMake and SDCC
- Build and install
wchisptool
from https://github.com/rgwan/librech551 - Generate makefile: (optionally use ccmake or cmake-gui to configure project)
$ cd build $ cmake ..
- Build and flash program:
$ make $ make flash $ make erase $ make clean