Column introduction
1. Preparation
- Install the ESP-IDF environment on the computer
- This article refers to Jetbrains official video tutorial: Develop ESP32 with CLion on Windows | CLion Tutorial | Embedded Development | IDE
2. Open the project
Copy a new helloworld project.
Open the project with CLion.
Choose to trust the project.
After CLion is opened, it automatically opens the README.md file and performs Cmake automatic configuration.
3. Configuration project
1. Configure Cmake environment variables
The environment variables that ESP-IDF needs to be temporarily configured are as follows:
Open the Cmake configuration page in CLion:
Add the IDF_PATH environment variable:
2. Configure the tool path
CLion reported an error and could not find the Python tool:
Check the value of the Path environment variable on the ESP-IDF command line (copy the selected content in the white box):
Open the Path in the CMake environment configuration page again, and add the copied content:
3. Clear Cmake cache
Cmake error:
solution:
4. The configuration is successful
After the configuration is successful, automatic prompts and code jumps can be used casually, a batch of fragrant ones!
4. Compile the project
1. Select the compilation target
2. Compile the target
3. The compilation is complete
5. Programming ESP32
1. Select a build target
Select Build Target as Flash:
2. Build (burn)
6. Serial port terminal
1. Select a build target
2. Open a serial terminal (build)
Error: ESPPORT and ESPBAUD environment variables are not set.
Add Cmake environment variables.
After the serial port terminal is opened.