Welcome to ESP32 Core Board repository
1. Environment Setup (Windows)
Windows Environment Setup — VSCode + ESP-IDF 6.0.2
Windows Environment Setup — VSCode + ESP-IDF 6.0.21. Overview2. Prerequisites2.1 Hardware Requirements2.2 Downloads Required3. Install CH340 Driver3.1 Check if Driver is Already Installed3.2 Download Driver3.3 Installation Steps3.4 Verification4. Install VSCode5. Install ESP-IDF Extension + EIM5.1 Install ESP-IDF Extension5.2 Launch EIM Installer Through Extension6. Open Example and Create Your First Project6.1 Open the Official hello_world Example6.2 Create a Project6.3 Project File Structure6.4 Set Target Chip7. Build, Flash, and Monitor7.1 Connect Hardware7.2 Select Serial Port7.3 Build7.4 Flash7.5 Serial Monitor8. Troubleshooting
1. Overview
ESP-IDF (Espressif IoT Development Framework) is the official development framework provided by Espressif for ESP32 series chips. It is based on FreeRTOS and includes drivers, protocol stacks, build systems, and toolchains.
This tutorial sets up the ESP32-S3 development environment on Windows, consisting of two steps:
Install ESP-IDF framework — Install v6.0.2 online via EIM (ESP-IDF Installation Manager)
Install VSCode extension — Enable VSCode to detect the installed ESP-IDF and provide GUI-based compilation/flashing/monitoring
ESP-IDF v6.0+ uses EIM uniformly as the installer. Whether using GUI mode or command-line mode, EIM handles the downloading and management of the framework and toolchains under the hood. The VSCode extension also has built-in EIM entry points.
2. Prerequisites
2.1 Hardware Requirements
| Item | Requirement |
|---|---|
| Operating System | Windows 10 / 11 (64-bit) |
| Disk Space | ≥ 13 GB (ESP-IDF framework + toolchain ~3~4 GB + GitHub repositories) |
| Memory | ≥ 8 GB |
| USB Interface | At least 1 USB-A / USB-C (for connecting the development board) |
| Network | Must access GitHub (to download toolchains and framework) |
2.2 Downloads Required
| File | Description | Download Address |
|---|---|---|
| VSCode Installer | Visual Studio Code (skip if already installed) | VSCode Download Page |
ESP-IDF framework and toolchains do not need manual download — EIM pulls and installs them automatically online.
3. Install CH340 Driver
The ESP32-S3 development board communicates with the computer via a USB-to-serial chip. Most development boards use the CH340 series chip, but Windows does not include its driver by default, so manual installation is required.
3.1 Check if Driver is Already Installed
Connect the development board to your computer using a USB data cable
Right-click Start Menu → Device Manager → Expand Ports (COM & LPT)
Observe the list:
| Phenomenon | Status | Action |
|---|---|---|
COMx appears (no exclamation mark) | Driver ready | Skip this section |
| Device with yellow exclamation mark | Driver missing | Continue installation |
| No new device appears | USB cable / port issue | Replace data cable or USB port |
3.2 Download Driver
WCH Official Download Page → Download the latest version CH340SER.EXE (compatible with CH340 series).
You can also search for "WCH CH340 driver" to access the official website. The development board in this tutorial uses CH340K, and the installer is approximately 300KB.
3.3 Installation Steps
Double-click
CH341SER.EXEClick INSTALL
After installation completes, you will see "Driver install success!"
Re-plug the development board's USB cable
3.4 Verification
Go back to Device Manager → Ports (COM & LPT), and you should see:
xxxxxxxxxxUSB-SERIAL CH340 (COM3)
Note down the port number (e.g., COM3), as you will need to select it during compilation and flashing.
4. Install VSCode
If VSCode is already installed, skip to Chapter 4.
Double-click
VSCodeUserSetup-x64-1.130.0.exeCheck "I accept the agreement" and click "Next".
.png)
Click "Browse" to select your installation path, then click Next.
.png)
Click "Next".
.png)
Check additional shortcuts, then click "Next".
.png)
Click "Install".
.png)
After installation completes, click "Finish".
.png)
.png)
Launch VSCode
5. Install ESP-IDF Extension + EIM
5.1 Install ESP-IDF Extension
Open VSCode

Click the Extensions icon on the left sidebar (or
Ctrl + Shift + X)
Search for "ESP-IDF"
Select "Espressif IDF" (publisher: Espressif) and click Install
After installation, the ESP-IDF icon will appear in the left activity bar.

Download the following plugin the same way.

5.2 Launch EIM Installer Through Extension
The ESP-IDF extension has a built-in entry point for EIM (ESP-IDF Installation Manager):
Open the ESP-IDF Installation Manager using the ESP-IDF plugin
.
Select GitHub, and the extension will start downloading and launching the EIM installer interface



Use the EIM GUI to install ESP-IDF v6.0.2. We will choose Custom Installation

After entering, Prerequisites Check and Python Sanity Check will run. Once completed, you can Select Target.

Select IDF version.

If you find a newer version is available, you can select Show old stable versions to check historical stable versions.
Select Mirror

Select Features

Select Tools

Select installation path

Then install and wait for the installation to complete.

6. Open Example and Create Your First Project
6.1 Open the Official hello_world Example
Select File → Open Folder

Navigate to the ESP-IDF installation folder (espidf) → 6.0.2 → esp-idf → examples → get-started → hello_world

We can see the project architecture/file structure

6.2 Create a Project
Click the
in the bottom left corner to select the corresponding ESP-IDF environment.

Open the ESP-IDF Installation Manager using the ESP-IDF plugin
, and select New Project Wizard.

Select the corresponding ESP-IDF environment.

Select template.
①ESP-IDF Examples are ready-to-use Demos for learning and referencing functional code. They focus on single-function demonstrations and serve as references for how to use a particular peripheral/protocol. ②ESP-IDF Templates are blank standardized project scaffolds for creating new formal projects, providing the most basic and standardized project skeleton without business functionality. (This document primarily focuses on creating blank templates)
.png)
Create a New Project.

Configure the new project settings ①Project Name
②Enter Project directory
③Choose ESP-IDF Target (IDF_TARGET)
④Choose ESP-IDF Board
⑤Choose serial port

6.3 Project File Structure
xxxxxxxxxxblink/├── CMakeLists.txt # Top-level build file├── main/│ ├── CMakeLists.txt # main component build file│ └── blink_example_main.c├── sdkconfig # Project configuration (generated by Kconfig)└── ...
6.4 Set Target Chip
Click the
in the bottom toolbar → Select esp32s3
ESP-IDF will regenerate
sdkconfigto adapt to ESP32-S3.
7. Build, Flash, and Monitor
7.1 Connect Hardware
Connect the ESP32-S3 development board to your computer using a USB data cable
Open Device Manager → Expand Ports (COM & LPT)
Confirm a new serial port appears (e.g.,
COM3) and remember the port numberCommon USB-to-Serial Chips Driver Source CP2102 / CP2104 Silicon Labs CP210x driver CH340 / CH343 WCH official driver CH9102 WCH official driver FT232 FTDI driver If a yellow exclamation mark appears, install the corresponding driver.
7.2 Select Serial Port
Click the serial port selection area on VSCode's bottom status bar → Select the corresponding COM port.
The bottom status bar should display:
xxxxxxxxxx[ESP-IDF] esp32s3 | COM3 | ...
7.3 Build
Click the
Build icon on the bottom toolbar.
Initial build takes approximately 2~5 minutes, while incremental builds take only a few seconds. The end of the output should display:
xxxxxxxxxxProject build complete.
7.4 Flash
Click the
Flash icon on the bottom toolbar.
After flashing completes, the chip will automatically reset and the program will start running.
7.5 Serial Monitor
Click the
Monitor icon on the bottom toolbar.
You can view the chip's serial log output in the OUTPUT panel.
One-Click Operation: The
Build, Flash and Monitor icon on the bottom toolbar can sequentially complete build + flash + monitor.
8. Troubleshooting
| Phenomenon | Cause | Solution |
|---|---|---|
| EIM fails to download toolchain | GitHub network instability | Select Espressif China mirror in EIM Custom Installation |
| EIM download is slow | Limited domestic access to GitHub | Same as above, switch to domestic mirror |
| VSCode extension cannot detect ESP-IDF | eim_idf.json path abnormal | Check if C:\Espressif\tools\eim_idf.json exists; or manually press F1 → ESP-IDF: Select Current ESP-IDF Version |
idf.py command not available | Not running in EIM terminal | Use F1 → ESP-IDF: Open ESP-IDF Terminal or EIM's Open IDF Terminal |
| Build error "Python not found" | System Python conflicts with IDF Python | Run in EIM terminal, do not use system PowerShell |
| Flash failure "Timed out waiting for packet header" | Chip not in download mode | Hold BOOT button → Press EN button once → Release BOOT |
| Flash failure "Invalid head of packet" | Serial baud rate or driver issue | Lower baud rate (idf.py flash -b 115200) |
| No serial port in Device Manager | USB driver missing | Install CH340 / CP2102 driver |
| COM port occupied | Other terminal programs not closed | Close serial assistant / other VSCode Monitor sessions |
| Build failure "CMake Error" | ESP-IDF environment variables not loaded | Reopen EIM terminal, do not use regular terminal |
