Please note that this ESP32 toolchain setup article is now obsolete. We highly recommend that you consult our Getting Started with ESP32 tutorial articles for complete information on how to setup the toolchain and compile example programs for the ESP32:
Download Ubuntu 14.04 ISO image
The ESP32 development environment can be configured and built on Ubuntu 14.04 LTS. The reason for this being demonstrated on Ubuntu is that the OS is extremely popular among electronics enthusiasts and therefore it is familiar to many developers who are used to embedded design and development. Read on to find a step-by-step approach to ESP32 toolchain setup and installation.
Download Ubuntu 14.04 from http://releases.ubuntu.com/14.04/
Once downloaded, setup Ubuntu to run on VirtualBox in any host machine of your choice. In this article, the demo was run on a Windows 10 host machine.
The steps for setting up the Virtual Machine is not covered, however, you may find that online elsewhere.
Note that if possible, allocate the following resources (minimum) to the Ubuntu OS:
Graphics acceleration: Enabled
Disk space: 50GB
You may install Ubuntu with minimum system resources but that is not recommended, otherwise ESP32 toolchain setup and build process may take hours to finish.
ESP32 toolchain setup
sudo apt-get install git
sudo apt-get install autoconf
sudo apt-get install build-essential
sudo apt-get install gperf
sudo apt-get install bison
sudo apt-get install flex
sudo apt-get install texinfo
sudo apt-get install libtool
sudo apt-get install libncurses5-dev
sudo apt-get install wget
sudo apt-get install gawk
sudo apt-get install libc6
sudo apt-get install python-serial
sudo apt-get install libexpat-devMake sure that all of the above packages are installed without errors or exceptions. The packages were last verified to download and install in August, 2016. Create a directory to store the toolchain (we highly recommend not changing the directory names mentioned in the installation steps here as it may lead to build failure later):
sudo mkdir /opt/EspressifChange ownership:
sudo chown $USER /opt/Espressif/
cd /opt/Espressif/ git clone -b esp108-1.21.0 https://github.com/jcmvbkbc/crosstool-NG.gitThe download should complete without errors.
Build the toolchain
Go to the crosstool folder:
You are now about to install (build) the toolchain. Note that this will take a very long time (sometimes even an hour!), so make sure you have time to let it run uninterrupted. Make the toolchain using the following commands:
./bootstrap ./configure make make install ./ct-ng xtensa-esp108-elf ./ct-ng build
ESP32 toolchain setup is completed!
The toolchain installation (download + build) is now complete and you should be ready to compile and generate BIN files for the ESP32.