Setup Toolchain(Ubuntu)
sudo apt-get install gcc git wget make libncurses-dev flex bison gperf python python-serial
download: https://dl.espressif.com/dl/xtensa-lx106-elf-linux64-1.22.0-92-g8facf4c-5.2.0.tar.gz
1.Download this file, then extract it in ~/esp directory:
mkdir -p ~/esp
cd ~/esp
tar -xzf ~/Downloads/xtensa-lx106-elf-linux64-1.22.0-92-g8facf4c-5.2.0.tar.gz
2.The toolchain will be extracted into ~/esp/xtensa-lx106-elf/ directory.
To use it, you will need to update your PATH environment variable in ~/.profile file. To make xtensa-lx106-elf available for all terminal sessions, add the following line to your ~/.profile file:
export PATH="$PATH:$HOME/esp/xtensa-lx106-elf/bin