ESP-IDF
This chapter includes the following sections. Please read as needed:
ESP-IDF Getting Started
New to ESP32 ESP-IDF development and looking to get started quickly? We have prepared a general Getting Started Tutorial for you.
- Section 1: Environment Setup
- Section 2: Running Examples
- Section 3: Creating a Project
- Section 4: Using Components
- Section 5: Debugging
- Section 6: FreeRTOS
- Section 7: Peripherals
- Section 8: Wi-Fi Programming
- Section 9: BLE Programming
Please Note: This tutorial uses the ESP32-S3-Zero as a teaching example, and all hardware code is based on its pinout. Before you start, it is recommended that you check the pinout of your development board to ensure the pin configuration is correct.
Setting Up the Development Environment
For the ESP32-C6-Touch-LCD-1.28 development board, ESP-IDF V5.5.2 or above is required.
The following guide uses Windows as an example, demonstrating development using VS Code + the ESP-IDF extension. macOS and Linux users should refer to the official documentation.
The screenshots in this section use ESP-IDF V5.5.2 as an example. When installing, please select the ESP-IDF version that matches your board's example.
Install the ESP-IDF Development Environment
-
Download the installation manager from the ESP-IDF Installation Manager page. This is Espressif's latest cross-platform installer. The following steps demonstrate how to use its offline installation feature.
Click the Offline Installer tab on the page, then select Windows as the operating system and the ESP-IDF version you need (the version shown in the screenshot is for reference only — choose the version that fits your actual needs).

After confirming your selection, click the download button. The browser will automatically download two files: the ESP-IDF Offline Package (.zst) and the ESP-IDF Installer (.exe).

Please wait for both files to finish downloading.
-
Once the download is complete, double-click to run the ESP-IDF Installer (eim-gui-windows-x64.exe).
The installer will automatically detect if the offline package exists in the same directory. Click Install from archive.

Next, select the installation path. We recommend using the default path. If you need to customize it, ensure the path does not contain Chinese characters or spaces. Click Start installation to proceed.

-
When you see the following screen, the ESP-IDF installation is successful.

-
We recommend installing the drivers as well. Click Finish installation, then select Install driver.

Install Visual Studio Code and the ESP-IDF Extension
-
Download and install Visual Studio Code.
-
During installation, it is recommended to check Add "Open with Code" action to Windows Explorer file context menu to facilitate opening project folders quickly.
-
In VS Code, click the Extensions icon
in the Activity Bar on the side (or use the shortcut Ctrl + Shift + X) to open the Extensions view.
-
Enter ESP-IDF in the search box, locate the ESP-IDF extension, and click Install.

-
For ESP-IDF extension versions ≥ 2.0, the extension will automatically detect and recognize the ESP-IDF environment installed in the previous steps, requiring no manual configuration.
Example
The ESP-IDF examples are located in the ESP-IDF directory of the example package.
| Example | Basic Program Description | Dependency Library |
|---|---|---|
| 01_Factory | Factory test program | - |
| 02_QMI8658 | Print the raw data from the IMU | - |
| 03_PCF85063 | Read RTC time and print it | - |
| 04_SD_Card | Load and display TF card information | - |
| 05_WIFI_AP | Set to AP mode to obtain the IP addresses of connected devices | - |
| 06_WIFI_STA | Set to STA mode to connect to Wi-Fi and obtain an IP address | - |
| 07_ESP-Brookesia | brookesia APP example | - |
| 08_LVGL_Demo | LVGL example | LVGL |
01_Factory
Example Description
- This is a comprehensive example for the ESP32-C6-Touch-LCD-1.28, and is also the factory-default flashed example.
Expected Behavior
- After compiling and uploading the program, the screen enters the display test interface and cycles through red, green, and blue colors.
- Swipe left or right on the screen to switch between different screens and view various parameters.
![]() | ![]() | ![]() |
|---|
02_QMI8658
Example Description
- This example uses the I2C protocol to initialize the QMI8658 chip, then reads the corresponding attitude data and prints it to the terminal.
Expected Behavior
-
Open the serial monitor to view the raw data output from the IMU (Euler angles require conversion), as shown in the figure below:
03_PCF85063
Example Description
- This example demonstrates how the ESP32-C6-Touch-LCD-1.28 reads the time and date from the PCF85063 RTC and prints them to the terminal.
Expected Behavior
-
After compiling and uploading the program, open the serial monitor to see the printed RTC time, as shown below:
04_SD_Card
Example Description
- This example drives the TF card via the SPI interface, mounts it, and reads/writes data to a test.txt file.
Expected Behavior
-
Open the serial monitor to see the TF card read/write test process, as shown below:
05_WIFI_AP
Example Description
- This example can set the development board as a hotspot, allowing phones or other devices in STA mode to connect to the development board.
Expected Behavior
-
After uploading the program, open the serial terminal. When a device successfully connects to the hotspot, the IP address of that device is printed, as shown:

06_WIFI_STA
Example Description
- This example configures the development board as a STA device to connect to a router, thereby accessing the system network.
Expected Behavior
-
After uploading the program, open the serial terminal. When the device successfully connects to the router, it prints the assigned IP address and Wi-Fi information, as shown:

07_ESP-Brookesia
Example Description
- This example ports
LVGLand Espressif'sbrookesiacomponents to implement APP-like functionality.
Expected Behavior
- After flashing the program, swipe left or right to switch screens. The device operation result is as follows:
![]() | ![]() |
|---|
08_LVGL_Demo
Example Description
- This example ports LVGL V9 and runs an LVGL example program.
Expected Behavior
-
After the program is flashed, the device operation result is as follows:





