Linux. VSCodium. PlatformIO IDE And The CH32V003 /CH32V006

This article describes how to set up VSCodium and PlatformIO IDE on Linux for development with the CH32V003 and CH32V006 RISC-V microcontrollers. It covers installing the required extensions and setting up udev rules for the WCH-LinkE programmer.

You will need to read the full getting-started guide first.

Install python3-venv

This is a prerequisite for the PlatformIO IDE installer:

sudo apt install python3-venv

Install PlatformIO IDE

PlatformIO IDE isn’t currently available in the list of extensions on VSCodium. But there’s an easy work-around: You need to download two VSIX extensions and install them manually.

Download:

In VSCodium

  1. Click Extensions
  2. Click the four dots at the top right
  3. Click “Install from VSIX”

Install cpptools-linux.vsix then platformio-ide-x.x.x.vsix

Configure udev rules

  1. Follow the PlatformIO udev rules installation instructions here.
  2. Add the following to /etc/udev/rules.d/99-platformio-udev.rules
SUBSYSTEM=="usb|tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="8010", GROUP:="plugdev"
SUBSYSTEM=="usb|tty", ATTRS{idVendor}=="4348", ATTRS{idProduct}=="55e0", GROUP:="plugdev"
SUBSYSTEM=="usb|tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="8012", GROUP:="plugdev"
  1. I had to reload udev with:
sudo udevadm control --reload-rules
sudo udevadm trigger
#You can allegedly also:
sudo service udev restart
#But this didn't work for me
  1. Make sure your user is in the plugdev group

All Done!

You should now be able to upload to the CH32V003 from PlatformIO IDE in VSCodium:

Leave a Reply

Discover more from Silicon Junction

Subscribe now to keep reading and get access to the full archive.

Continue reading