nanoCH32V003 is a development board made by MuseLab based on WCH CH32V003F4U6.
- on-board 24MHz Crystal oscillator
- Reset Button
- LED
- Power by TYPE-C USB
- Download with WCH-LinkE(1-wire serial debug interface)
WCH officially provides MounRiver Studio IDE development environment, which supports Windows/Linux/Mac. The instructions are as follows
download the MounRiver Studio IDE from the official website MounRiver Studio, and just select the latest version to download.
Take the GPIO project as an example, double-click GPIO_Toggle.wvproj to open the project
Click Project -> Build Project to compile the project
use WCH's official downloader WCH-LinkE, click Flash -> Download to program the flash. you can also use the WCH-LinkUtility tool, the operation instructions are as follows
Note: The compiled binary file is located in the obj directory of the factory, such as EVT\EXAM\GPIO\GPIO_Toggle\obj\GPIO_Toggle.hex
download WCH-LinkUtility at WCH Official Website
The chip series select RISC-V, the chip model select CH32V003, click Target -> Connect WCH-Link, Then select the bin or hex file to be programmed, and click Target -> Program to program the firmware.
Download the RISC-V toolchain https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack/releases to the local, then modify ~/.bashrc and import it into environment variables, for example as follows
export PATH=${PATH}:/home/pi/tool/xpack-riscv-none-embed-gcc-10.2.0-1.2/bin
$git clone https://github.com/wuxx/CH32V003-makefile-example
$cd CH32V003-makefile-example
$make
$git clone https://github.com/karlp/openocd-hacks
$cd openocd-hacks
$./bootstrap
$./configure --disable-werror
$make
$make install (can skip this step if other version of openocd is already installed)
use a simple script wlink_write.sh
to program, you may need to edit the path of openocd in script
$cd tools
$./wlink_write.sh ../demo/blink_1000.bin