Installing ESP8266 RTOS SDK on Linux

This is a short how-to guide about installing ESP8266_RTOS_SDK on Ubuntu Linux. The new version of ESP8266_RTOS_SDK (v3.0) shares the same framework with esp-idf (official development framework for ESP32). The toolchain programs access ESP8266_RTOS_SDK using IDF_PATH environment variable which can be set in ~/.bashrc file. If you’re working with both ESP8266 and ESP32 then note that toolchains are using the same variable name (IDF_PATH) but require different paths.

Install tools

sudo apt-get install git make python

Create base directory

mkdir $HOME/esp8266

Download toolchain

cd $HOME/esp8266
git clone

Set environment variable

Make toolchain available on your PATH.

cat << EOF >> $HOME/.bashrc
export IDF_PATH=$HOME/esp8266/ESP8266_RTOS_SDK

Refresh your terminal environment variables.

source $HOME/.bashrc

Compile & flash your first example

cd $HOME/esp8266/ESP8266_RTOS_SDK/examples/peripherals/gpio
make flash

One thought on “Installing ESP8266 RTOS SDK on Linux

  1. Hi there

    i have installed from scratch successfully however i get this error when i ‘make’

    /include/esp_spi_flash.h:28:35: error: ‘ESP_ERR_FLASH_BASE’ undeclared (first use in this function); did you mean ‘ESP_ERR_MESH_BASE’?

    I cannot understand this part very well. And i couldn’t find any reference as well. Can you help me on this?

Leave a Comment