This repository provides scripts to build a complete standalone SDK (with toolchain) for software development with the Espressif ESP8266 and ESP8266EX chips. And consists of:
To build the standalone SDK and toolchain, you need a GNU/POSIX system with the standard GNU development tools installed: bash, gcc, binutils, flex, bison, etc.
Debian/Ubuntu 14.04:
sudo apt-get install make unrar-free autoconf automake libtool gcc g++ gperf sudo apt-get install flex bison texinfo gawk ncurses-dev libexpat-dev sudo apt-get install python-dev python python-serial sudo apt-get install sed git unzip bash help2man wget bzip2
Later Debian/Ubuntu versions may require:
sudo apt-get install libtool-bin
The project can be built in two modes:
mkdir esp8266; cd esp8266 git clone --recursive https://github.com/pfalcon/esp-open-sdk.git cd esp-open-sdk make STANDALONE=y
After make, the following sub directories are of interest:
Add xtensa-lx106-elf/bin/ subdirectory to your PATH environment variable to execute xtensa-lx106-elf-gcc and other tools. Edit .profile to add the path to the bin directories, by adding:
PATH=$PATH:/home/oscar/esp8266/esp-open-sdk/xtensa-lx106-elf/bin ESP8266_SDK_ROOT=/home/oscar/esp8266/esp-open-sdk/sdk export ESP8266_SDK_ROOT #Logout/login for the .profile to take effect
If you chose the non-standalone SDK, run the compiler with the corresponding include and lib dir flags. The extra -I and -L flags are not needed when using the standalone SDK.
xtensa-lx106-elf-gcc -I$(THISDIR)/sdk/include -L$(THISDIR)/sdk/lib
The project is updated from time to time, to get updates and prepare to build a new SDK, run:
$ make clean $ git pull $ git submodule sync $ git submodule update --init
If you don't issue make clean (which causes toolchain and SDK to be rebuilt from scratch on next make), you risk getting broken/inconsistent results.