ESP8266 Development Kit on Mac Os Yosemite

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 https://github.com/pfalcon/esp-open-sdk.git --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/Makefile.am
sed -i.bak 's/AM_PROG_AS/AM_PROG_AS\'$'\nAM_PROG_AR/' lx106-hal/configure.ac
make STANDALONE=n

Then:

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

You need a tool to creation and handling of firmware files suitable for the ESP8266 chip. I am clone here: https://github.com/tommie/esptool-ck 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

git clone https://github.com/tuanpmt/esptool-ck.gitcd esptool-ck
make
chmod +x esptool

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

cd /esptools
git clone https://github.com/tuanpmt/esp_mqttcd esp_mqtt
make -f Makefile.mac

Compile NodeMcu

git clone https://github.com/nodemcu/nodemcu-firmwaremake

Next we will install Eclipse IDE, and configure it.

Download Install java 7: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

Download Eclipse for Mac OS: https://www.eclipse.org/downloads/?osType=macosx

Install PySerial: http://sourceforge.net/projects/pyserial/

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

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

Project properties->Build command: make -f Makefile.mac

Add Make Target all, clean, flash

Reference:

https://github.com/pfalcon/esp-open-sdk/issues/11

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值