CH32V003 RISC-V MCU gets $1.5 development board, open source GCC toolchain and flasher utility

When we first wrote about the 10-cent CH32V003 RISC-V MCU it was offered in a $7 development board and the closed-source MounRiver Studio IDE had to be used for programming. But things have improved since October 2022, and now, you can buy a CH32V003 board for as little as $1.5 plus shipping, and an open-source GCC toolchain and flasher/downloader are now available.

Let’s have a look at the hardware first with the low-cost nanoCH32V003 development board featuring a 48 MHz CH32V003 RISC-V microcontroller with 2KB SRAM and 16KB flash, a USB Type-C port for power, a reset button, and two rows of headers for the GPIOs.

Cheap CH32V003 RISC-V development boardMuseLab nanoCH32V003 specifications:

  • MCU – WCH CH32V003F4U6 32-bit RISC-V2A microcontroller up to 48 MHz with 2KB SRAM, 16KB flash (QFN20 package)
  • Expansion – 2x 11-pin headers with up to 18x GPIOs,  1x USART, 1x I2C, 1x SPI, 8-channel 10-bit ADC, 5V, 3.3V, GND
  • Debugging – 3-pin 1-wire serial debug interface to connect WCHLink-E debugger
  • Misc – 24MHz crystal oscillator, Reset button, and LED
  • Power Supply – 5V via USB-C port
  • Dimensions – TBD

nanoCH32V003 Development Board WCHLink E debuggerThe board requires the WCHLink-E debugger shown on the right above for programming and debugging. MuseLab provides PDF schematics, demo binaries, tools, and documentation on GitHub. Two development methods are available: the usual MounRiver Studio IDE and WCH-LinkUtility for the WCH-LinkE downloader/debugger, and an open-source toolchain based on GCC named xPack RISC-V Embedded GCC along with samples that can be compiled with make:

But you’d still need to use the WCH-LinkUtility programs to flash the resulting binary to the board through the WCHLink-E debugger.

That’s unless you rely on CNLohr work, as he played with the CH32V003 MCU to create the Makefile samples compiled with the gcc-riscv64 toolchain and the minichlink open-source utility to flash the program to the board. It can be tried with the blink sample as follows:

It fails for me because the make command will not only compile the sample, but also flash the hex file to the board, and I don’t have the board nor the WCHLink-E debugger attached to my computer:

The toolchain and utility can be used in Windows, Linux and/or WSL, but minichlink program still needs some work as it currently ignores all the response codes, except when querying the chip. As a side note, there’s also another project that updated OpenOCD to support CH32V003 microcontroller.

You can purchase the nanoCH32V003 for $1.5 on Aliexpress. But that price does not include shipping ($3.78 here), and you may want to purchase a pack of ten for $15 instead since the shipping fee is the same. You may also want to get one WCHLinkE provided in a $6.5 bundle with the nanoCH32V003 since it’s needed to program the board.

Via LinuxGizmos and thanks to Zoobab and Jon for the tips.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard

15 Replies to “CH32V003 RISC-V MCU gets $1.5 development board, open source GCC toolchain and flasher utility”

  1. Are these really $1.5 ? Shipping costs from your Aliexpress link to UK are $4.27 so $6. Better shipping options at W Official Store. Anyway may be headline should be “plus postage”

    1. In Europe the board is €1.77. Board + programmer is €7.64 for the two with €5.05 delivery. Realistically the lowest you can get started for is therefore €12.69.

  2. There are now cheaper WCHLinkE clones flashers on Ali around 1.2EUR.

    They have a messy table of compatibility with 3 different versions of the flashers, so beware to order the right now.

    Some of them won’t work with the ch32v003.

    1. As mentioned in the post, it’s possible to buy a pack of ten boards for $18.78 including shipping (to Thailand). That’s around $1.88 per board.

        1. Actually, shipping costs are ok. The problem is, that shipping from abroad is too cheap, that ruins all local market.

  3. Someone wanted to use this RISC-V MCU with Python, like MicroPython, but looks like specs aren’t enough:

    Snek is a tiny embeddable language targeting processors with only a few kB of flash and ram. Think of something that would have been running BASIC years ago and you’ll have the idea. These processors are too small to run MicroPython

  4. In case anybody has purchased this, tried CNLohr’s blink example, wondered “why isn’t it blinking,” and found the documentation lacking, the built-in LED is on GPIO D6.

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC