2. ESP32 development environment construction

Insert picture description here

arduino compiler download

Here we start to learn to use ESP32 and arduino IDE to write ESP32 programs. This article mainly starts to build the development environment of ESP32 in the arduino compiler. Personally think about arduino IDE as a very mature compiler, although it is also used in many places. It’s not as convenient as KEIL, IAR and other software. The software installation package can be installed and downloaded in the arduino community. Click to enter , and then click the software icon below to download, or you can leave a message in the mailbox below, and pack the files
Insert picture description here
into it. Then you can see the download link below, click to download the latest version or the old version by yourself
Insert picture description here

arduino compiler installation

Find the downloaded installation package and double-click to install it (there is no difference from ordinary software installation). For driver installation, please refer to the driver installation method at the bottom of the arduino website.
Insert picture description here
About the download and installation part of the arduino compiler, you can refer to the installation method on the arduino official website. Next, we come to the arduino interface opened after the installation is complete
Insert picture description here
. Students who have not contacted arduino may find that there is no main function when they see the above interface. Here we will not talk about the programming of ESP32 for the time being (leave it for later learning), this issue mainly builds ESP32 Development environment, there will be learning articles about wifi and network client server networking in the later stage

Add ESP32 development environment

After opening, we see the upper left column, click on the file to find the preferences below to open. After
Insert picture description here
opening the preferences, find the URL of the additional development board manager in the interface, and enter the URL of the Arduino core for esp32: https://dl.espressif.com/dl/package_esp32_index.json
Insert picture description here
click on the button below, and then it will Back to the initial interface, once click on the tool as shown in the figure below-development board options (may be different for everyone, but all are development boards: xxxx)-development board manager
Insert picture description here

Search for ESP32 in the open development board manager, find the searched ESP32 by Espressif Systems, click install, I have installed it here, and all that is displayed is delete

Insert picture description here
After installation, open the same tool-development board: xxxx-in the development board on the right, you can scroll down to find the ESP32 board.
Insert picture description here
At this step, our ESP32 development environment is installed.

Editor interface

After opening the editor, you see the file editing column
Insert picture description here
above. The main items we use above are the loading library under the project, which is used to add
Insert picture description here
the serial monitor, development board selection, port and parameter settings under the tool for managing library files. It is more commonly used. The
serial port monitor can open the port to view the data returned by the serial port
. There are many development boards in the development board selection. Choose our corresponding development board model to use.
Port select the COM port where the development board is located for debugging and downloading
and other options. Later, I will come into contact with here slowly and understand first.
Insert picture description here
There is also a column of icon functions in the middle green area. Just put the mouse on it and it will display in Chinese. You can also refer to the figure below.

Insert picture description here

Program burning

Here we introduce the two programming methods of the burning program

arduino compiler burning

The arduino compiler selects the development board in the tool. We are using Node32s here. If you select the Node32s
Insert picture description here
port, you can view the
Insert picture description here
driver chip in the device manager port . If you don’t find it, an unknown device appears. You can get the driver driver of CP2102 by the message mailbox below, or you can install it on Baidu. My view here is COM7,
then we return to the arduino IDE interface, and select the port in the tool as COM7. After
Insert picture description here
selecting the development board and port, you can click the upload button above. The download process is in progress. The
Insert picture description here
Insert picture description here
above arduino upload is a relatively simple upload method.

flash_download_tool download

Below we use Espressif's official tool to upload, the download tool can also be found on the Internet to download or send the data package to you in the message mailbox below

To download here, we need to find 4
files under the path of the arduino compiler 1. The first file is in the pathC:\Users\用户目录\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\tools\partitions\boot_app0.bin

  1. The path in the Usercomputer usually displays the Chinese name 用户, so if you go to find the Userfolder, it is easy to find it
  2. The user directory is the name of the first few digits of the account logged in on the current computer. Everyone’s computer will be different
  3. Open Userlater still can not find the AppDatafolder because this folder is hidden in the system folder, this time look at it is invisible, above the path bar at the back of the directory user input \will be many paths which can be found after AppDataClick to open
    Insert picture description here
  4. Then follow the order of the path above and keep looking down. The esp32\1.0.4later 1.0.4versions may be different. Don’t worry.

Here we directly copy this file and put it in the data package

2. The second file is in the C:\Users\18748\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\tools\sdk\bin\bootloader_dio_40m.binpath, and there are many in it. Here, our board selects bootloader_dio_40m.binthis file.
We copy it here and put it in the data package and put it together with the first file.

3. The third file is through our arduino IDE exported file, in arduino IDE, click Project has a bar option to export the compiled binary file , and then click Export compilation we can find a BIN file suffix in the location where you saved the project, We also put this together in the data package and put the previous two files together.
Insert picture description here
4. The fourth file can be found in the path C:\Users\18748\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\tools\partitions\default.bin, just like the first file found before, put it in the data package together.

5. After we find these four files, download and open the download tool in the data package or Baidu.flash_download_tool
Insert picture description here

Next, load the four files saved above into the download software at a time as shown in the figure below.

Insert picture description here
Click START to start the download. The IDLE above waits to become FINISH to indicate that the download is complete. There is a serial output program in the data. You can open the serial monitor and press the reset button to view the output!

The serial port test code is as follows:

void setup() {
    
    
  // put your setup code here, to run once:
  Serial.begin(115200);
  Serial.println("Holle World!");
  }

void loop() {
    
    
  // put your main code here, to run repeatedly:
  
}

to sum up

This issue of the article mainly covers several parts from the installation of the ESP32 development environment to the download of the program and the location of the downloaded file. The content is not much hoped to be helpful to ESP32 beginners. Long-term release of ESP32 learning articles, welcome to pay attention, this issue is here Yes, please feel free to leave a message, you can leave a message below if you need article data files!

Guess you like

Origin blog.csdn.net/qq_42250136/article/details/108346307