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.

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 git@github.com:pfalcon/esp-open-sdk.git
cd esp-open-sdk
make toolchain esptool libhal STANDALONE=n
make

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

Refresh the ENV variables in current terminal.

source $HOME/.bashrc

7. Compile and flash example project

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

Leave a Comment