A CH32V003 Toolchain — If You Can Get One To Try It On

We’re in an exciting time for cheap microcontrollers, as with both the rise of RISC-V and the split between ARM and its Chinese subsidiary, a heap of super-cheap and very capable parts are coming to market. Sometimes these cheap chips come with the catch of being difficult to program though, but for one of them the ever-dependable [CNLohr] has brought together his own open-source toolchain. The part in question is the WCH CH32V003, which is a ten-cent RISC-V part that has an impressive array of capabilities. As always though, there’s a snag, in that we’re also told that while supplies are improving this part can be hard to find. The repository is ready for when you can get them again though, and currently also contains some demo work including addressable LED driver code.

As an alternative there’s a comparable and slightly cheaper ARM-based part, the Puya PY32. It’s reckoned to be the cheapest of the flash-based microcontrollers, and like the WCH part is bearing down on the crop of one-time-programmable chips such as the famous and considerably less powerful 3-cent Padauk. This end of the market is certainly heating up a little, and from our point of view this can only mean some exciting projects ahead.

28 thoughts on “A CH32V003 Toolchain — If You Can Get One To Try It On

  1. You need to buy a special one-wire flasher from WCH, but they released some code to make a flasher out of a CH32F103, we need people to port that code to an STM32 bluepill:

    https://twitter.com/patrick_riscv/status/1630134151763357696
    https://github.com/openwch/ch32v003/tree/main/CH32V003_1Line_Base_on_CH32F103

    WCH use Keil IDE instead of GCC+Makefiles, it could be converted with keil2gcc tool.

    See also this article by CNX:

    https://www.cnx-software.com/2023/02/22/ch32v003-risc-v-mcu-gets-1-5-development-board-open-source-gcc-toolchain-and-flasher-utility/

    1. A kit with a dev board, a USB flasher interface board, and 5 bare 20 pin chips, costs $5.51 all up from the WCH store on Ali. Packs of 50 chips cost $5 for 8 pin to $7 for 20 pin. Both go in and out of stock, but are seldom out of stock for more than a few days.

    1. embeddedDOOM, which was made by, you guessed it, CNLohr, needs as few as 384kB of RAM. However, this chip contains, as written on the repo :

      2kB of RAM

      It’s not for today…

  2. heh i’m a little excited about RISC-V. and of course i love flash microcontrollers. i just feel like there’s not much point quibbling about the cheapest beyond a certain point. at $25 a board like the official stm32 discovery boards, i am gonna be a little bit concerned about price. but once we get down to the price of a raspberry pico rp2040 board, $4, it just doesn’t matter to me…if i need one, i’ll buy 2 more just to have a stock of them. at that price, i feel like i’m paying more for getting an integrated tested supported board from a reputable vendor than i am for the chip itself.

    if you’re looking at $4 for a pico board at adafruit vs less than $1 for a bare chip, or worse, $2 for a defective board from aliexpress, i just don’t see it as being all that compelling. even when i was a kid and first started my quest for a flash microcontroller, and found out the DS5000 (battery-backed SRAM!) was $50…if it had been $5 instead, i would have been eager to buy two even just with the $30 i got from installing a modem for someone after school.

    obviously if you’re buying a thousand of them for production then you’ll feel totally differently :)

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.