Skip to content
Jelmer Tiete edited this page Jan 31, 2016 · 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
cd Sming/Sming
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