Project owner: lichnak, PeterBay
License: Creative Commons Attribution-ShareAlike; CC BY-SA

Installation and configuratin guide of required toolchain for successful compilation of nodeMCU firmware with make tool.

Original guide at ESP8266 Wiki

Linux build environemnt for nodeMCU firmware is based on Ubuntu Server.

Mini iso version will be enough for firmware compilation purpose. 64-bit Ubuntu (mini.iso)

In Ubuntu Installer select options “Basic Ubuntu Server” and “openSSH Server”

After reboot install software required by toolchain

sudo apt-get install build-essential zip gdb vim make unrar autoconf automake bison texinfo libtool mc gcc g++ gperf libc-dbg ncurses-dev expat lua5.1 lua5.1-doc luarocks gperf bison flex texinfo git help2man gawk python python-pip unzip screen python2.7 python-serial

for m in lua-bitlib luafilesystem md5 luaposix luasocket; do sudo luarocks install $m; done

sudo pip install mkdocs

Download ESP Open SDK from GitHub and run make

git clone --recursive

cd esp-open-sdk

make STANDALONE=y |& tee make0.log

If running make STANDALONE=y |& tee make0.log makes error (missing application, etc.), then install missinf application and run make STANDALONE=y |& tee make0.log again.

Open file ~/.bashrc for editing and add two lines at the end.

export PATH="$HOME/esp-open-sdk/xtensa-lx106-elf/bin/:$PATH"
alias xgcc="xtensa-lx106-elf-gcc"

Find the firmware version you want to compile on page with firmware

Download and extract firmware source code

cd ~
unzip -d nodemcu-firmware


unzip -d nodemcu-firmware

Navigate to firmware folder

cd ~/nodemcu-firmware/nodemcu-firmware-

In file user_modules.h can enable or disable firmware modules with which will be compiled

mcedit app/include/user_modules.h

Run firmware compilation


Compiled bootloader and firmware is stored in folder bin, e.g.

-rw-rw-r--  1 node node  27872 Oct 26 11:21 0x00000.bin
-rw-rw-r--  1 node node 357683 Oct 26 11:21 0x10000.bin