Chapter 4 Ubuntu builds ESP32 development environment (vscode)

With the update of Espressif SDK, this article is useless.

Direct reference to Espressif official website information

https://docs.espressif.com/projects/esp-idf/en_US/stable/esp32/get-started/linux-setup.html

 

Vscode installation

The installation package of vscode comes with the ubuntu software, which can be completed with one click, no nonsense, and find a way to solve it.

compile chain operations

download

Official latest address

There are system differences, download the corresponding compression to the computer

  • for 64-bit Linux:

https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz

  • for 32-bit Linux:

https://dl.espressif.com/dl/xtensa-esp32-elf-linux32-1.22.0-80-g6c4433a-5.2.0.tar.gz

 

 

decompress

Create a new directory to store the decompressed package of the compilation chain -> enter the directory -> decompress. Modify according to your own path .

1

2

3

mkdir -p ~/esp

cd ~/esp

tar -xzf ~/Downloads/xtensa-esp32-elf-linux32-1.22.0-80-g6c4433a-5.2.0.tar.gz

 

ESP-IDF operation

Go to directory -> git.

1

2

cd ~/esp

git clone --recursive https://github.com/espressif/esp-idf.git

 

Environment variable configuration

Open the configuration file.

1

gedit ~/.profile

Add the compile chain path and ESP-IDF path, and modify it according to your own path .

1

2

export PATH="$HOME/esp/xtensa-esp32-elf/bin:$PATH"

export IDF_PATH=~/esp/esp-idf

 

 

Test whether the above operation is normal and perfect

  1. Copy the project in ESP-IDF to the esp directory,

1

2

cd ~/esp

cp -r $IDF_PATH/examples/get-started/hello_world .

 

Compile, make all, no errors indicate that the environment is normal.

 

Download, before make flash, you need to make menuconfig to configure the download serial number

 

 

 

Vscode operation

  • Open the vscode software and open the helloworld folder just now.

  • Ctrl+` to open the terminal, input make all to compile and make flash to download. too easy

  • Serial monitoring, running normally

 

Ubuntu builds ESP32 environment (vscode) summary

  • It is very simple to build an environment under ubuntu.
  • Comparing ubuntu and windows speed

instruction

ubuntu

Windows (not optimized)

make all

56 seconds

5 minutes

make flash

13 seconds

24 seconds

Speed ​​description:

  1. There is no comparison with other instructions of make
  2. Different computers have different compilation speeds
  • The comparison can be concluded that:
  1. Develop products using ubuntu to build ESP32 development environment
  2. Use ubuntu to build ESP32 development environment with ubuntu system
  3. Experience using windows to build ESP32 development environment, convenient

 

Click me -> more ESP32 development guide series catalog

Tags: Chapter 4 Ubuntu builds ESP32 development environment (vscode)

ESP32 development ESP32 Development Guide

Related: Chapter 4 Ubuntu builds ESP32 development environment (vscode)