Install
1. Preparation before compilation
sudo apt-get install git wget flex bison gperf python3 python3-venv python3-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0
2.Download
mkdir -p ~/esp
cd ~/esp
git clone --recursive https://github.com/espressif/esp-idf.git
3. Setup tools
cd ~/esp/esp-idf
export IDF_GITHUB_ASSETS="dl.espressif.com/github_assets"
./install.sh esp32,esp32s3
4. Set environment variables
Single setup
. $HOME/esp/esp-idf/export.sh
To facilitate repeated use, give the script an alias to facilitate command line calls. Copy
and paste the following commands into the shell configuration file (.profile, .bashrc, .zprofile, etc.)
alias get_idf='. $HOME/esp/esp-idf/export.sh'
It is not recommended to add export.sh directly to the shell's configuration file. Doing so causes the IDF virtual environment to be activated in every terminal session (including sessions that do not require the use of IDF). This defeats the purpose of using a virtual environment and may also affect the use of other software.
5. Burn firmware
Set esp32 model before DFU
cd ~/esp32
idf.py set-target esp32s3
test
1. Load environment variables
Environment variables need to be loaded before each test
2. Check the device number
View the newly added device number by plugging and unplugging twice
ls /dev/tty*