USB permissions on Linux
On Linux, you will have to configure USB permissions to program microcontrollers. This is explained further on, in the dedicated section.
Set up your development environment for microcontrollers
Installing VSCode
This tutorial explains how to install Visual Studio Code and PlatformIO to program Arduino, ESP32, STM32 and many other microcontrollers.
Prerequisites:
Visual Studio Code (VSCode) is a lightweight, powerful code editor developed by Microsoft.
This tutorial guides you through the complete installation on Windows, macOS and Linux.
Go to the official VSCode website at https://code.visualstudio.com/. Click the download button for Windows. The installation file (VSCodeUserSetup-x64.exe) will be downloaded.
Double-click the downloaded file to start the installation. Accept the licence terms.
Tick the following (recommended) options:
Click Next then Install.
Once the installation is complete, tick Launch Visual Studio Code and click Finish. VSCode starts for the first time.
Go to https://code.visualstudio.com/. Download the version that matches your processor:
If macOS shows a security message, go to System Settings > Privacy & Security, then allow Visual Studio Code to run.
To use VSCode from the terminal (useful for PlatformIO):
Download and install the .deb package from the official website:
sudo apt install ./code_*.debOr through the official repository:
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt update
sudo apt install code
Install the RPM package:
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo sh -c 'echo -e "[code]\\nname=Visual Studio Code\\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\\nenabled=1\\ngpgcheck=1\\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
Then:
sudo dnf check-update
sudo dnf install code
VSCode is available in the AUR:
yay -S visual-studio-code-bin
Or use Snap:
sudo snap install code --classic
Start Visual Studio Code. You should see:
If you see this interface, VSCode is correctly installed!
Here are a few useful settings to improve your development experience.
Install these extensions to improve your productivity: