1764 views|4 replies

155

Posts

1

Resources
The OP
 

2. ESP32-S2-Kaluga-1 development environment ESP-IDF construction [Copy link]

 

This article introduces the process of building the ESP-IDF environment for ESP32-S2-Kaluga-1.

1. Review of previous pitfalls

I have done ESP32 development with Arduino and MicroPython, and have also tried the Platform IO IDE method. I really want to experience the official IDF, so I purchased an ESP32-LyraT-Mini development board at the beginning of the year.

However, I made a mistake here (let's call it "IDE dependence"): I used VS Code + Espressif IDF plug-in, and relied entirely on the plug-in to download and deploy IDF. In order to adapt to the development board, I also tried to deploy ADF.

The result is predictable. I was extremely anxious due to the poor internet speed on GitHub. I finally managed to download IDF, but failed to download ADF. I fiddled with the console and successfully killed IDF. Finally, I decided to let the LyraT-Mini board gather dust.

2. The IDF process

This time, I participated in the 2022 Digi-Key Innovation Design Competition and applied for the Kaluga kit, so I decided to redeploy IDF and finally successfully achieved build + flash.

1) Select the official download site of Espressif

Because the experience of using GitHub has always been poor, this time I decided to bypass the official download from Espressif. The ESP-IDF document (https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32/get-started/windows-setup.html) has an introduction to manual installation and a link to download Windows Installer Download (https://dl.espressif.cn/dl/esp-idf/?idf=4.4).

Figure 2-1 ESP-IDF official website download

2) Installation

Here my IDE dependency syndrome struck again. I downloaded the Espressif-IDE version and installed the IDE (based on Eclipse) and IDF v4.4 at the same time.

After customizing and completely installing all components, three shortcuts are generated on the desktop:

Espressif-IDE: Point to ..\espressif\tools\espressif-ide\2.5.0\espressif-ide.exe to open the IDE.

ESP-IDF 4.4 CMD: Open a CMD window and set the path environment variable. In the opened console, add a temporary variable to the path to point to the IDF build related tools. Also set the Python virtual machine, Git and temporarily create the environment variable IDF_PATH.

ESP-IDF 4.4 PowerShell: Open a PowerShell window in the same way as above.

Figure 2-2 Complete installation and shortcut creation

Figure 2-3 Initial results of ESP-IDF 4.4 CMD operation

3) IDE usage failure

The IDE installed here always prompts to install tools when creating a project, but does not prompt what tools to install, and the installation progress is always stuck at 20% (personally guess it is still a problem with GitHub)

Figure 2-4 Espressif-IDE failed to create an IDF project

4) Console operation is successful

So I just used the console to operate, followed the command instructions step by step, and finally successfully compiled the hello_world project.

First, copy the hello_world project in IDF to your own workspace.

Again, IDF CMD changes to the copied project directory.

Next, execute the command "idf.py set-target esp32s2" to set the device selection. Here, "idf.py menuconfig" is skipped, which is the component configuration step.

Then, execute the command "idf.py build".

Finally, plug in the development board (two micro ports, one for power supply and one for USB-TTL), and execute the command "idf.py -p COMn flash". Note that COMn should be replaced with the number recognized by your PC.

Figure 2-5 IDF CMD compilation process

Figure 2-6 IDF CMD programming process

Figure 2-7 Operation phenomenon

This post is from DigiKey Technology Zone

Latest reply

The boss has already taken a step ahead, I am still learning ST's GUI software   Details Published on 2022-7-14 21:28
 
 

2w

Posts

74

Resources
2
 

Summarize the experience and fight, come on :)

This post is from DigiKey Technology Zone
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle
Personal signature

加油!在电子行业默默贡献自己的力量!:)

 
 
 

6747

Posts

2

Resources
3
 

Let me share an experience. When compiling ESP32 with vscode, you must turn off the antivirus software, otherwise it will be very slow.

This post is from DigiKey Technology Zone
 
 
 

1237

Posts

66

Resources
4
 

This thing is really hard to install. I installed it offline on two computers, one succeeded, but the other failed.

This post is from DigiKey Technology Zone
 
 
 

6027

Posts

6

Resources
5
 

The boss has already taken a step ahead, I am still learning ST's GUI software

This post is from DigiKey Technology Zone
Personal signature

在爱好的道路上不断前进,在生活的迷雾中播撒光引

 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list