ESP8266 – building the toolchain for Linux (Ubuntu)

This is a quick tutorial that shows how to build a complete development environment (including FreeRTOS support) for the ESP8266 processors on Linux. These instructions have been tested successfully on Ubuntu 17.04.

UPDATES

  1. [28.10.2019] Take a look at docker version of ESP8266 Toolchain
  2. [05.03.2019] If you want to use FreeRTOS in your project I recommend to install a new version of ESP8266_RTOS_SDK (esp-idf style)

Building Toolchain Step-by-Step

All these steps are based on “Quick Start” from  ESP-OPEN-RTOS.

1. Collect and install tools

sudo apt-get install git make python python-pip

2. Create base directory

mkdir -p $HOME/esp8266

3. Download and install SDK for ESP8266

This step will take a while so be patient!

cd $HOME/esp8266
git clone --recursive https://github.com/pfalcon/esp-open-sdk
cd esp-open-sdk
make STANDALONE=y

4. Install esptool.py

pip install esptool

5.  Download Open RTOS for ESP8266

cd $HOME/esp8266
git clone --recursive https://github.com/Superhouse/esp-open-rtos.git

6. Update ENV variables

Make all tools available on your PATH.

cat << EOF >> $HOME/.bashrc
export PATH=$PATH:$HOME/esp8266/esp-open-sdk/xtensa-lx106-elf/bin
export ESP_OPEN_RTOS_PATH=$HOME/esp8266/esp-open-rtos
EOF

Optionally. Refresh your terminal ENV variables.

source $HOME/.bashrc

7. Compile and flash example project

cd $HOME/esp8266/esp-open-rtos/examples/blink
make
make flash

8. Pulling updates

This is additional, post-installation step to pull updates for latest versions. It can take some time – be patient!

cd $HOME/esp8266/esp-open-sdk
make clean
git pull
git submodule sync
git submodule update --init
make STANDALONE=y
cd $HOME/esp8266/esp-open-rtos
git pull

Useful Resources

3 thoughts on “ESP8266 – building the toolchain for Linux (Ubuntu)

    • Your’e right. This line should not force the user to have a github account. Changed.
      /LP

  1. Cannot seem to get this to work:

    john@john-Latitude-D630:~/esp8266$ git clone git@github.com:pfalcon/esp-open-sdk.git
    Cloning into ‘esp-open-sdk’…
    Permission denied (publickey).
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.
    john@john-Latitude-D630:~/esp8266$

Leave a Comment