nanoCH32V203 is a development board made by MuseLab based on WCH CH32V203C8T6 with Dual TYPE-C USB interfaces, LCD interface and SD card interface onboard, can be programmed through the USB port, which is convenient for prototype verification and development.
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
If use WCH's official downloader WCHLink, click Flash -> Download to program the flash. If you use the USB1 port for program, 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 WCHISPTool at WCH Official Website
The chip series select CH32Vx series, the chip model select CH32V203, and the download method select USB. Keep pressing the BOOT button on the development board, then press and release the RST button, and finally release the BOOT button to make the chip enter the bootloader. If the bootloader is successfully entered, the target can be detected in the USB device list in the WCHISPTool. Then select the bin or hex file to be programmed, and click Download to burn 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/CH32V203-makefile-example
$cd CH32V203-makefile-example
$make
use the open source download tool wchisp to program the flash, the operation is as follows
wchisp is a tool written in rust, first update rustc
$rustc -V
$rustup update
install wchisp
$cargo install wchisp --git https://github.com/ch32-rs/wchisp
Press and hold the BOOT button on the development board, then press the RST button and release, and finally release the BOOT button to make the chip enter the bootloader, and then call wchisp to program
$sudo /home/pi/.cargo/bin/wchisp info
$sudo /home/pi/.cargo/bin/wchisp flash ./build/app.bin