In the last year, WCH has presented a series of RISC-V microcontrollers interesting, you know that MCUs based on this open ISA are great news compared to ARMs, among others. These include the “32 cent” CH003V10 RISC-V microcontroller with 2KB of SRAM and 16KB of flash, and the CH32V307 that has more resources (up to 64KB of SRAM and 256KB of flash) and additional peripherals.
Until now, these microcontrollers could be programmed in C language using the MounRiver IDE or some other open source tools. However, WCH recently announced Arduino IDE support for many of these RISC-V microcontrollers, which will allow more people to participate and use the same IDE as for Arduino and other development boards.
The central library for CH32duino Works with OpenOCD via WCH-LINKE hardware to download firmware and debug WCH chips. In addition, it has a series of tools riscv-none-embed-gcc which supports custom RISC-V instructions (half-word and byte compression instruction extensions, hardware stack push/pop functions) present in WCH's RISC-V microcontroller.
The following development kits are currently supported Arduino IDE compatible:
- EVT board CH32V003F4P
- EVT board CH32V203G8U
- EVT board CH32X035G8U
- EVT board CH32V103R8T6_BLACK
- EVT board CH32V307VCT6_BLACK
All of them with I/O for peripherals ADC, DAC, USART, GPIO, EXTI, SysTick, I2C and SPI.
In order to use them, you will need to follow the following followed:
- Add the following link to the field “Additional license plate manager URLs” in the Arduino 2.0 IDE: https://github.com/openwch/board_manager_files/raw/main/package_ch32v_index.json
- Next, connect the EVT boards of the WCH CH32 MCU
- Select a RISC-V board such as CH32V00x from the Arduino IDE menu as you would with Arduino or compatible boards
- And this way you can load the code of the programmed sketch to see it work.
And remember, Arduino IDE is compatible with Windows, Linux and macOS, although it may require some specific settings for each operating system.
More information - Project GitHub site