- Setup
-
Don't use
sudo apt install platformio
but if you did, trysudo apt remove platformio
before proceeding further. -
Install
python-venv
:sudo apt-get install python3-venv
-
Install PlatformIO :
curl -fsSL -o get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py && python3 get-platformio.py
- It will be installed in
/home/YOUR_USERNAME/.platformio/penv/bin/platformio
, so you need to include it into your PATH or SYMLINK it like below to usepio
CLI command from Terminal.
-
Symlink into your
~/.local/bin
:ln -s /home/YOUR_USERNAME/.platformio/penv/bin/platformio ~/.local/bin/pio
-
Now try updating a library :
pio pkg update -g -p "ch32v"
** You now also may install PlatformIO plugin into your vscode
.
-
Install
ch32v
platform package :pio pkg install -g -p https://github.com/Community-PIO-CH32V/platform-ch32v.git
-
Create
udev-rule
forch32v
usb access :sudo touch /etc/udev/rules.d/99-platformio-udev.rules
-
Paste below lines into the rules :
SUBSYSTEM=="usb", ATTR{idVendor}="1a86", ATTR{idProduct}=="8010", GROUP="plugdev" SUBSYSTEM=="usb", ATTR{idVendor}="4348", ATTR{idProduct}=="55e0", GROUP="plugdev" SUBSYSTEM=="usb", ATTR{idVendor}="1a86", ATTR{idProduct}=="8012", GROUP="plugdev"
That's it. Enjoy !
References :