Skip to content

HANDS ON

Program Preparation

Find some programs for testing, here, I use the following repository:

git clone --recursive https://gitee.com/vi-iot/esp32-board.git

Hardware Preparation

Connect the ESP32 development board to the computer

Select a Program

Enter the repository esp32-board we just downloaded, find a program, such as helloworld, enter the directory:

cd esp32-board
cd helloworld

Set the Development Board Type

If it is a general ESP32 development board, you can ignore this step, but if it is another development board, it is better to specify the development board type, such as esp32-s3:

idf.py set-target esp32s3

Compile the Program

idf.py build

Flash the Program

idf.py flash

Note that you can view the USB port where the device is located:

ls /dev/tty*

By comparing the linked/non-linked, find the port where the device is located, such as /dev/ttyACM1, and then flash the program:

idf.py -p /dev/ttyACM1 flash

Monitor the Program Running

idf.py monitor

or you can use a specific port

idf.py -p /dev/ttyACM1 monitor

Exit Monitoring

Press Ctrl + ] to exit monitoring