MacOS Quickstart

IanAber edited this page Feb 27, 2018 · 43 revisions


(You might already have it)

Xcode command line tools
xcode-select --install
ruby -e "$(curl -fsSL"


brew install Caskroom/cask/eclipse-cpp

Install build toolchain

brew install binutils coreutils automake wget gawk libtool gettext gperf grep
export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"

Install gnu-sed and make sure that it is the default sed command line application. For the installation use the commands below:

brew install gnu-sed --with-default-names

If you have already installed gnu-sed but it is not the default one then make sure to uninstall it and install it again with the correct options. This can be done using the commands below:

brew uninstall gnu-sed
brew install gnu-sed --with-default-names

Install prebuilt Open ESP SDK

cd ~/
curl -L -O
sudo mkdir -p /opt/
sudo tar -zxf esp-open-sdk-2.0-macosx.tgz -C /opt/
sudo chmod -R 775 /opt/esp-open-sdk

You can also build it yourself with Homebrew or with MacPorts.

Get And Build Sming Core:

cd <your-favourite-development-folder>/

git clone
# Warning: Do NOT use the --recursive option for the command above. 
#          Our build mechanism will take care to get the third-party sources and patch them, if needed.

cd Sming/Sming

# You will get a copy of our `develop` branch which intended for developers 
# and it is the one where all new cool (unstable) features are landing. 

# If you want to use our stable branch then uncomment the command below
# git checkout origin/master

# And finally set the SMING_HOME environment variable to point to <your-favourite-development-folder>/Sming/Sming

export SMING_HOME=`pwd`


Configure Environment Variables

Open with a text editor the .profile file in your home directory. And add at the end the following lines:

export ESP_HOME=/opt/esp-open-sdk
export SMING_HOME=<your-favourite-development-folder>/Sming/Sming

Make sure to replace <your-favourite-development-folder> in the command above with the actual directory on your local disk.

(Optional step)

(used by Make and Eclipse - make sure to quit Eclipse first)

If you installed Eclipse manually, substitute /opt/homebrew-cask/Caskroom/eclipse-cpp/4.5.1/ to /Applications/Eclipse/

sudo /usr/libexec/PlistBuddy -c "Add :LSEnvironment:ESP_HOME string '/opt/esp-open-sdk'" /opt/homebrew-cask/Caskroom/eclipse-cpp/4.5.1/
sudo /usr/libexec/PlistBuddy -c "Add :LSEnvironment:SMING_HOME string '/opt/sming/Sming'" /opt/homebrew-cask/Caskroom/eclipse-cpp/4.5.1/
sudo /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -v -f /opt/homebrew-cask/Caskroom/eclipse-cpp/4.5.1/

Using Eclipse (Oxygen) on Mac

If you are using Eclipse to build the samples you need to make sure the path is set correctly for the make process.

First make sure the references the correct serial port for your ESP8266. This file is found in SMING_HOME and the entry for Default COM Port should show the device name your ESP8266 gets when it is plugged in.

Next Ensure that you can build the sample Basic_Blink from a terminal window by changing to the sample folder and executing 'make'. If this works without errors then type 'echo $PATH' and copy the resulting path to the clipboard.

Now fire up Eclipse and go to


and add a new variable PATH. Paste in the path saved from the terminal session above. You can also add SMING_HOME and ESP_HOME variables here the same way as you set in the export commands above which will then be set for all the projects.

The standard make files use to provide a serial terminal for debugging the ESP8266. Miniterm does not work inside Eclipse so you should open in the SMING_HOME folder and comment out the line

KILL_TERM ?= pkill -9 -f "$(COM_PORT) $(COM_SPEED_SERIAL)" || exit 0

replacing it with


Next comment out the line


and replace it with


This will prevent Eclipse from trying to launch miniterm and throwing an error about Inappropriate ioctl for device.

You can use the built in terminal in Eclipse Oxygen by adding it using

Window==>Show View==>Terminal

then setting terminal type to Serial and setting the port to the port the ESP8266 is connected to. Remember to disconnect before tying to re-flash the device though.

Compile Sming Examples

You can find all examples coming with Sming under the samples folder.

cd $SMING_HOME/../samples/

If you want to test some of the examples the following sequence of commands can help you:

cd $SMING_HOME/../samples/
cd Basic_Blink
# The command below will upload the sample code to your ESP8266 device
make flash  
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.