-
-
Notifications
You must be signed in to change notification settings - Fork 348
MacOS Quickstart
(You might already have it)
xcode-select --install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
(Optional)
brew install Caskroom/cask/eclipse-cpp
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
cd ~/
curl -L -O https://dl.bintray.com/sminghub/toolchain/esp-open-sdk-2.0-macosx.tgz
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.
cd <your-favourite-development-folder>/
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
# And finally set the SMING_HOME environment variable to point to <your-favourite-development-folder>/Sming/Sming
export SMING_HOME=`pwd`
make
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 in the command above with the actual directory on your local disk.
(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
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
make
# The command below will upload the sample code to your ESP8266 device
make flash