After successful installation of development tools on Windows with Eclipse IDE for ESP8266 and have pretty interesting time with the MQTT project (esp_mqtt), I tried looking for someone who develop ESP8266 applications for Mac, discovered a lot of people do this, but there is no specific guidance. So I was tinkering, and record the steps in a specific way for those who are in need.

First, prepare the necessary tools
Download and install macports, then:

sudo port install git gsed gawk binutils gperf grep gettext py-serial wget libtool autoconf automake

Create a case-sensitive filesystem image and mount it somewhere before cloning and compile esp-sdk

hdiutil create -size 5g -fs "Case-sensitive HFS+" -volname ESPTools ESPTools.sparsebundle
hdiutil attach ESPTools.sparsebundle
sudo ln -s /Volumes/ESPTools/ /esptools
cd /esptools
git clone --recursive
cd esp-open-sdk
sed -i.bak '1s/^/gettext=\'$'\n/' crosstool-NG/kconfig/Makefile
sed -i.bak -e 's/[[:<:]]sed[[:>:]]/gsed/' Makefile
sed -i.bak -e 's/[[:<:]]awk[[:>:]]/\$(AWK)/' lx106-hal/src/
sed -i.bak 's/AM_PROG_AS/AM_PROG_AS\'$'\nAM_PROG_AR/' lx106-hal/


nano $HOME/.bash_profile

add this line and save:

export PATH=$PATH:/esptools/esp-open-sdk/xtensa-lx106-elf/bin

after that:

source $HOME/.bash_profile

You need a tool to creation and handling of firmware files suitable for the ESP8266 chip. I am clone here: but it was an error exists on the Mac, not compiled, the pull request to resolve the error had not been interested. And I have to fork, edit, to be compile

cd /esptools
git clone
cd esptool-ck
chmod +x esptool

Install PySerial:

tar xfvz pyserial-2.7.tar.gz
cd pyserial-2.7
sudo python install

UPDATE (23-March-2015)

You can use for program and extract firmware (Thanks Fredrik Ahlberg, i’ve used for all of esp8266 projects)

At this point, you should be able to compile it, but how to check. Just:

cd /esptools
git clone
cd esp_mqtt

Compile NodeMcu

cd /esptools
git clone

Next we will install Eclipse IDE, and configure it.

Download Install java 7:

Download Eclipse for Mac OS:

Eclipse->File->New->Makefile project exist with code

Project properties->Build command: make

Add Make Target all, clean, flash

Please make sure you have add PATH environment variables for eclipse:
– Eclipse menu: Preferences → C/C++ → Build→ Environment
– select Append variables to native environment
– click the Add button
– enter PATH in the Name field
– enter the new path, starting with the actual path where the toolchain binaries are (/esptools/esp-open-sdk/xtensa-lx106-elf/bin)
– click the OK button
– click the OK button

Thanks Stephane Schmuck help me complete this article.

ESP8266 Development Kit on Mac OSX with Eclipse IDE

Xin chào!

Website sẽ được chuyển hướng sang Các nội dung sẽ được di chuyển và đóng khi hoàn thành. Cám ơn bạn đã quan tâm