Development environment setup
- Install ESP-IDF (and the drivers if using Windows) using EIM (official docs)
- Install the ESP-IDF VS Code extension by Espressif Systems
Creating a project
- Open the command palette (
Ctrl + Shift + P) and selectESP-IDF: New Project - Choose the template named
sample_projectand create the project
After this, you can initialize the repository and push it to GitHub:
git init
git add -A
git commit -m "initial commit"
git branch -M main
git remote add origin https://github.com/user/repo.git
git push -u origin main
For Linux users (skip this if you use Windows)
Run this command, log out, and log back in (or reboot):
sudo usermod -aG dialout $USER
You have to do it only once.
Building and flashing
You can use the commands from the VS Code command palette:
ESP-IDF: Build Your ProjectESP-IDF: Flash Your Project
Note for Windows users (skip this if you use Linux)
If you are on Windows, flashing might show this error:
A fatal error occurred: Could not connect to an Espressif device on any of the 1 available serial ports.
If that happens, press and hold the BOOT button on your board as soon as
you see Connecting....
Top comments (0)