2538 views|6 replies

288

Posts

0

Resources
The OP
 

【ESP32-Korvo Review】+ 02 Software Construction [Copy link]

 This post was last edited by yangjiaxu on 2021-1-24 00:59

Hi, today I want to share with you how to build the software environment for ESP32. Building the software for ESP32 is not very troublesome, but it is a lot more troublesome because of the network. There are two ways to build this environment. One is the one-click installation tool provided by the official . The other is to use the script installation. The official has a step-by-step tutorial, which is very detailed and worth referring to .

This time I will talk about the first method.

First, download the ESP-IDF tool installer, https://dl.espressif.com/dl/esp-idf-tools-setup-2.3.exe . This installer will install three software, one is git, python3.7 and ESP-IDF.

Open the software and select "Agree".

Install Git2.21.0. If your computer has it, you can choose the original one and specify the path.

Install python 3.7. If you have it on your computer, you can choose the original one and specify the path.

Download ESP-IDF. Pay attention to this. The next step is to select the version of ESP-IDF. Since the ESP32-Korvo developed this time, the official recommendation is to use 3.3.1. So you must be obedient. Because I was not obedient, I am already familiar with the process of installing IDF. Hahahaha.

You can take a look at the download speed, 0KB/S. Why is it like this? Because you need to download it from GitHub , so it is like this. And basically, it is because of the two softwares git and python that cause the download speed to be extremely slow, so it is recommended to download these two softwares separately.

If you see the above interface, it means that you are lucky and the installation is successful.

Here is a small suggestion, that is, download git and python yourself, otherwise it is very easy to encounter the following situation.

After the installation is successful, you need to test whether the environment can be used normally.

Open the ESP-IDF Command Prompt (cmd.exe), which is usually on the desktop.

Enter cd and add the official demo example, which is in esp-idf\examples\get-started\hello_world.

After entering this folder, enter the following command.

idf.py set-target esp32

(Note: After opening a new project, you should first set the "target" chip)

idf.py menuconfig
(Description: Run the configuration program. This is to explain the functions of the above statements. You do not need to type them into the command line)
idf.py build
(Description: Compile and build. This is to explain the functions of the above statements. You do not need to type them into the command line)

When configuring the program functions, garbled characters may appear for the first time , as shown in the figure below.

The reason is: Python does not support Chinese encoding format.

Solution: You can enter os.system("chcp 437") after starting cmd.exe to switch to English encoding format. You can also modify idf.py to automatically change the encoding. The idf.py file is in esp-idf\tools. (PS. It is worth noting that Python has very strict requirements on the indentation format, and spaces are required here for indentation).

if __name__ == "__main__":
    try:
        # On MSYS2 we need to run idf.py with "winpty" in order to be able to cancel the subprocesses properly on
        # keyboard interrupt (CTRL+C).
        # Using an own global variable for indicating that we are running with "winpty" seems to be the most suitable
        # option as os.environment['_'] contains "winpty" only when it is run manually from console.
        WINPTY_VAR = "WINPTY"
        WINPTY_EXE = "winpty"
        os.system("chcp 437")
        if ("MSYSTEM" in os.environ) and (
            not os.environ.get("_", "").endswith(WINPTY_EXE) and WINPTY_VAR not in os.environ
        ):

The interface after the solution.

Since we are using the hello_world routine this time, there is no need to configure it here, just save and exit.

After exiting, run idf.py build. If there is no problem with the code, a bin file can be generated.

The generated bin file can be burned into the development board. There are many ways to burn it. I use a relatively simple one, which is to use the flash_download_tool_v3.8.5_1 software to burn it.

Just click and start downloading. After downloading, reset the development board, open the serial port, and connect the development board. You can see the interface display hello world! At this point, it means that the software environment has been successfully built, and you can play further.

Chapter Summary:

1. Make sure to choose the officially recommended version of ESP-IDF, otherwise you will suffer a lot.

2 It is best to download and install git and python software first, which will save a lot of time.

3 It is best to have the installation path in English, which will eliminate errors caused by the Chinese path.

This post is from Domestic Chip Exchange

Latest reply

I guess it's just opened up for everyone to play with, and it probably won't be used like this in products.   Details Published on 2021-1-28 22:35
 
 

1366

Posts

6

Resources
2
 

For speech boards, it is recommended to use ADF, which is more comprehensive. ADF is just a branch version of IDF for speech recognition, etc.

This post is from Domestic Chip Exchange
Personal signature

1084534438 欢迎交流  [加油,一切皆有可能]

 
 
 

7462

Posts

2

Resources
3
 

It looks troublesome.

This post is from Domestic Chip Exchange

Comments

If the network is good, it's actually OK. The official installer is very easy to use.  Details Published on 2021-1-26 00:06
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 
 

288

Posts

0

Resources
4
 
freebsder posted on 2021-1-25 22:29 It looks quite troublesome

If the network is good, it's actually OK. The official installer is very easy to use.

This post is from Domestic Chip Exchange

Comments

For things that are too troublesome, it depends on the overall environment. It is hard to say what pit you may run into and cannot get out of.  Details Published on 2021-1-26 22:34
 
 
 

7462

Posts

2

Resources
5
 
yangjiaxu posted on 2021-1-26 00:06 If the network is good, it is actually OK. The official installer is very easy to use.

For things that are too troublesome, it depends on the overall environment. It is hard to say what pit you may run into and cannot get out of.

This post is from Domestic Chip Exchange

Comments

Hahaha, I just encountered this. When I was working on TTS, I felt that I didn't understand something correctly. I kept resetting and restarting it, but I couldn't find any technical support to consult. It's sad.  Details Published on 2021-1-28 09:22
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 
 

288

Posts

0

Resources
6
 
freebsder posted on 2021-1-26 22:34 For things that are too complicated, it depends on the overall environment. It is hard to say what pit you will encounter and you will not be able to get out.

Hahaha, I just encountered this. When I was working on TTS, I felt that I didn't understand something correctly. I kept resetting and restarting it, but I couldn't find technical support to consult. Sad.

This post is from Domestic Chip Exchange

Comments

I guess it's just opened up for everyone to play with, and it probably won't be used like this in products.  Details Published on 2021-1-28 22:35
 
 
 

7462

Posts

2

Resources
7
 
yangjiaxu posted on 2021-1-28 09:22 Hahaha, I've encountered this now. When I was working on TTS, I felt that I didn't understand something correctly. I kept resetting and restarting, and I couldn't find technical support for consultation. Difficult...

I guess it's just opened up for everyone to play with, and it probably won't be used like this in products.

This post is from Domestic Chip Exchange
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

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