ESP32-S3 development environment setup (arduino version)

Please add image description

Click image to buy

foreword

Not long ago, I noticed that Espressif's official github has updated the branch on arduino IDEthe development ESP32-S3part of the medium, so I will record the difficult process of adding a development board under the arduino IDE in this article. Without further ESP32-S3ado, let's start developing and building directly.

installation method

Please add image description

method 1

We first provide the easiest way to open the installed arduino → 文件 → 首选项
insert image description here
one 附加开发板管理器and add one of the following two links to the URL

  • Stable release link:

https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

  • Development release link:

https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json

insert image description here
After adding it, remember to click it and then make sure not to click it directly. Turn it ×off , it will not be saved.
After saving, click工具 → 开发板 → 打开开发板管理器

insert image description here

Enter in the search box of the pop-up interface ESP32, as shown in the figure below (if the old version has been installed before, it will be displayed as an update, and if it has not been installed, it will be displayed as installed)

insert image description here

Select the version number as 2.0.0-alpha1, click install

insert image description here

Problems encountered:
1. Failed to install
2. Failed to install
3. Failed to install

Reason:
It is difficult to access github without scientific Internet access. If you are scientifically online, you can install it normally. Here, you can use Baidu scientific Internet access by yourself.
For most people, scientific Internet access is not so simple, so we also provide another method later.

Method 2

Download related documents

Click to enter Espressif github , click the arrow of the masterlocation to find the branch named ESP32-s3-support , open it, as shown in the figure below

insert image description here
If you don't have a list like me below, then just click to View all branchesjump over and open the branch of ESP32-s3-support.
insert image description here
After opening it, click on the upper right corner, Codeand click Download ZIPDownload .

insert image description here
If you still can't download it, you can leave a message below and I will send the downloaded one.

Compile toolchain download

After downloading the compressed package and extracting it, we noticed two folders packageandtools

insert image description here

getDownload and install compilation tools

Open and toolsfind get.exethe application under the folder, double-click it, it will start to download and install the compilation toolchain in the package we unzipped

insert image description here
Next, after the download is complete, several new folders toolswill be added under the folder. We can compare toolsthe files under the folder before and after the download to know whether the download and installation are successful (because this download method is unsuccessful, the interface will be closed, and the download is successful. will also close the interface)

Before downloading and installing

insert image description here

After downloading and installing

insert image description here

Problems encountered:
1. Failed to download
2. Failed to download
3. Failed to download

Reason:
It is still difficult to access github without scientific Internet access. If you are scientifically Internet access, you can install it normally. Here, you can use Baidu scientific Internet access by yourself.
For most people, scientific Internet access is not so simple, so we will provide another method later.

Download and install manually

We analyze the installation steps when arduino is installed or get downloaded and installed. The first two methods are also to download the corresponding package on github, and download the compilation tool chain and extract it into the corresponding folder.

Then we will manually download and place it in the corresponding location, will it have the same effect?

packageWe found a jsonfile in this folder. After we open it, we can see that a total of 7 files that need to be downloaded will be downloaded to the tools.

          "toolsDependencies": [
            {
    
    
              "packager": "esp32",
              "name": "riscv32-esp-elf-gcc",
              "version": "gcc8_4_0-esp-2021r2"
            },
            {
    
    
              "packager": "esp32",
              "name": "xtensa-esp32-elf-gcc",
              "version": "gcc8_4_0-esp-2021r2"
            },
            {
    
    
              "packager": "esp32",
              "name": "xtensa-esp32s2-elf-gcc",
              "version": "gcc8_4_0-esp-2021r2"
            },
            {
    
    
              "packager": "esp32",
              "name": "xtensa-esp32s3-elf-gcc",
              "version": "gcc8_4_0-esp-2021r2"
            },
            {
    
    
              "packager": "esp32",
              "name": "esptool_py",
              "version": "3.2.0"
            },
            {
    
    
              "packager": "esp32",
              "name": "mkspiffs",
              "version": "0.2.3"
            },
            {
    
    
              "packager": "esp32",
              "name": "mklittlefs",
              "version": "3.0.0-gnu12-dc7f933"
            }
          ]

The corresponding link is in the below tools, and the corresponding "host": "i686-mingw32"below urlis the file link we downloadedwindows belowarduino

insert image description here
The seven links are as follows

  1. https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2/riscv32-esp-elf-gcc8_4_0-esp-2021r2-macos.tar.gz

  2. https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2/xtensa-esp32-elf-gcc8_4_0-esp-2021r2-patch2-win32.zip

  3. https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2/xtensa-esp32s2-elf-gcc8_4_0-esp-2021r2-patch2-win32.zip

  4. https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2/xtensa-esp32s3-elf-gcc8_4_0-esp-2021r2-patch2-win64.zip

  5. https://github.com/espressif/arduino-esp32/releases/download/2.0.2/esptool-3.2-windows.zip

  6. https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/x86_64-w64-mingw32.mklittlefs-c41e51a.200706.zip

  7. https://github.com/igrr/mkspiffs/releases/download/0.2.3/mkspiffs-0.2.3-arduino-esp32-win32.zip

Put the link in the browser, download it, unzip it, and get the following seven folders. If you can't download it, you can leave a message below. I will pack all the files and send them over.

insert image description here
Copy these seven folders and the files in them and put them under the toolsfolder

Development board added

Then we do this step, no matter whether you use the previous get method to directly download the toolchain or manually download and decompress it, we will get a complete chip package containing the compilation toolchain, and I will put all the above The files used are packaged and placed in the style shown in the figure below

insert image description here

Then we will find the installation path of arduino. There will be hardwarea folder under the installation path. After opening, create a new espressiffolder
named in it. Copy the package we downloaded with the toolchain (this time the name is arduino-esp32-esp32-s3-support) to the newly created folder. Under the espressif folder, it is worth noting that do not open the arduino at this time to avoid problems, copy the past as shown below
insert image description here

Finally, modify the arduino-esp32-esp32-s3-supportname as esp32, otherwise a warning will be reported when compiling

insert image description here

We open the arduino, at this time we can see the new development board in ESP32-S3the development board
insert image description here

Select the development board and write a program that outputs Hello World!

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

void loop() {
    
    
  // put your main code here, to run repeatedly:
  Serial.println("Hello World!");
  delay(1000);
}

Successfully compiled and downloaded to run!

Summarize

This article on building the development environment itself has a lot of details. When this article was written in March 2022, it is very fast for users to directly build the development environment according to the downloaded files provided by us. However, Espressif official itself will definitely have a new version, which may fix many existing bugs. I hope users can use a more stable version, and I hope Youxin can accompany everyone to learn and make progress together. Welcome to one-click three-link, Thanks guys!

Past articles:

Building ESP32-S2 and C3 development environment in arduino

Ubuntu - 20.04 system to install Espressif ESP-IDF toolchain

Guess you like

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