Skip to content
slaff edited this page Feb 2, 2017 · 45 revisions

Prerequisites:

(You might already have it)

Xcode command line tools
xcode-select --install
Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Eclipse

(Optional)

brew install Caskroom/cask/eclipse-cpp

Install build toolchain

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

https://github.com/SmingHub/Sming.wiki.git

Install prebuilt ESP Alt SDK

cd ~/
curl -L -O https://bintray.com/artifact/download/kireevco/generic/esp-alt-sdk-v1.5.0.258-macos-x86_64.zip
sudo mkdir /opt/esp-open-sdk
sudo tar -zxf esp-alt-sdk-v1.5.0.258-macos-x86_64.zip -C /opt/esp-open-sdk
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 /opt/
sudo git clone https://github.com/SmingHub/Sming.git
# 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 type the command below
git checkout origin/master

sudo make

Configure Environment Variables

(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/Eclipse.app to /Applications/Eclipse/eclipse.app

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

Get Sming Examples

(Currently nor required - it is a part of Core)

mkdir -p ~/dev
cd ~/dev
git clone https://github.com/SmingHub/Sming.git

Build Basic_Blink

  1. Open Eclipse
  2. Import Basic_Blink
  3. Build