Free and open (as much as possible) integrated SDK for ESP8266 chips
Go to file
Steffen Vogel d72d9ed66d added gitignore file 2015-05-15 17:32:15 +02:00
crosstool-NG@7c6bc14de3 Update crosstool-NG (gdb fixes for qemu). 2014-11-18 22:01:41 +02:00
esptool@12debb7bfe Update esptool submodule. 2015-04-02 15:04:13 +03:00
lx106-hal@ecdc98953f lx106-hal: Upstream update, licensing clarification and line-endings fixes. 2015-04-26 13:53:58 +03:00
.gitignore added gitignore file 2015-05-15 17:32:15 +02:00
.gitmodules Add esptool submodule. 2014-11-18 01:24:38 +02:00
Makefile added patch for sdk 1.0.1 2015-05-15 17:32:03 +02:00
README.md README: Minor stylistic fix. 2015-04-02 15:06:49 +03:00
c_types-c99.patch Add patch to make vendor headers compatible with C99. 2015-01-17 19:54:51 +02:00
crosstool-config-overrides Disable building static toolchain - causes problems at least on Arch Linux. 2014-12-03 00:18:02 +02:00

README.md

esp-open-sdk

This repository provides the integration scripts to build a complete standalone SDK (with toolchain) for software development with the Espressif ESP8266 and ESP8266EX chips.

The complete SDK consists of:

  1. Xtensa lx106 architecture toolchain (100% OpenSource), based on following projects:

The source code above originates from work done directly by Tensilica Inc., Cadence Design Systems, Inc, and/or their contractors.

  1. ESP8266 IoT SDK from Espressif Systems. This component is only partially open source, (some libraries are provided as binary blobs).

OpenSource components of the SDK are based on:

Building

To build the standalone SDK and toolchain, you need a GNU/POSIX system (Linux, BSD, MacOSX, Windows with Cygwin) with the standard GNU development tools installed: gcc, binutils, flex, bison, etc.

Ubuntu 14.04

$ sudo apt-get install make unrar autoconf automake libtool gcc g++ gperf \
    flex bison texinfo gawk ncurses-dev libexpat-dev python sed

MacOS:

$ brew tap homebrew/dupes
$ brew install binutils coreutils automake wget gawk libtool gperf gnu-sed --with-default-names grep
$ export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"

In addition to the development tools MacOS needs a case-sensitive filesystem. You might need to create a virtual disk and build esp-open-sdk on it:

$ sudo hdiutil create ~/Documents/case-sensitive.dmg -volname "case-sensitive" -size 10g -fs "Case-sensitive HFS+"
$ sudo hdiutil mount ~/Documents/case-sensitive.dmg
$ cd /Volumes/case-sensitive

For other Debian/Ubuntu versions, dependencies may be somewhat different. E.g. you may need to install libtool-bin, etc.

The project can be built in two modes:

  1. Where the toolchain and tools are kept separate from the vendor IoT SDK which contains binary blobs. This makes licensing more clear, and helps facilitate upgrades to vendor SDK releases.

  2. A completely standalone ESP8266 SDK with the vendor SDK files merged into the toolchain. This mode makes it easier to build software (no additinal -I and -L flags are needed), but redistributability of this build is unclear and upgrades to newer vendor IoT SDK releases are complicated. This mode is default for local builds. Note that if you want to redistribute the binary toolchain built with this mode, you should:

    1. Make it clear to your users that the release is bound to a particular vendor IoT SDK and provide instructions how to upgrade to a newer vendor IoT SDK releases.
    2. Abide by licensing terms of the vendor IoT SDK.

To build the separated SDK:

$ make STANDALONE=n

To build the standalone SDK:

$ make STANDALONE=y

This will download all necessary components and compile them. Once done, the toolchain (with the Xtensa HAL library) will be available in the xtensa-lx106-elf/ directory. Add its bin/ subdirectory to your $PATH to execute xtensa-lx106-elf-gcc and other tools.

ESP8266 SDK will be installed in sdk/. If you chose the non-standalone SDK, run the compiler with the corresponding include and lib dir flags:

$ xtensa-lx106-elf-gcc -I$(THISDIR)/sdk/include -L$(THISDIR)/sdk/lib

The extra -I and -L flags are not needed when using the standalone SDK.

Pulling updates

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 update

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.

Additional configuration

You can build a statically linked toolchain by uncommenting CT_STATIC_TOOLCHAIN=y in the file crosstool-config-overrides. More fine-tunable options may be available in that file and/or Makefile.