Install ESP_IDF for Linux

less than 1 minute read

Youtube Link

Setup

sudo apt-get install git wget flex bison gperf python3 python3-pip python3-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0


Download

mkdir -p ~/esp
cd ~/esp
git clone --recursive https://github.com/espressif/esp-idf.git


–recursive : 하위 서브모듈까지 모두 clone 한다.

esp32

cd ~/esp/esp-idf
./install.sh esp32


or

cd ~/esp/esp-idf
./install.fish esp32

Run manually

Go to esp-idf
And, write down

. export.sh

.profile (Run automatically)

. $HOME/(esp-idf path)/export.sh

In my case,

. $HOME/Documents/ESP/esp-idf/export.sh

Use usb port

For me, I don’t need this code because my os is Ubuntu 20.04.
But, if you use virtual machine, you have to use the code.

sudo usermod -a -G dialout,tty $USER


And, reboot please.

Example

cd ~/esp
cp -r $IDF_PATH/examples/get-started/hello_world .
cd ~/esp/hello_world
idf.py set-target esp32
idf.py menuconfig   <-(if you need)


idf.py build
idf.py -p PORT [-b BAUD] flash  [example-> idf.py -p /dev/ttyUSB0 flash]


Tags:

Categories:

Updated:

Leave a comment