Skip to content

Commit

Permalink
Update getting-started docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikee47 committed Jun 24, 2024
1 parent 35b1928 commit 7b7dfa2
Showing 1 changed file with 32 additions and 54 deletions.
86 changes: 32 additions & 54 deletions docs/source/getting-started/macos/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,98 +3,76 @@ Mac-OS Installation

.. highlight:: bash

Pre-requisites
--------------

*(You might already have it)*
Quick Install
-------------

Xcode command line tools
~~~~~~~~~~~~~~~~~~~~~~~~

::
1. Install command-line development tools::

xcode-select --install

Homebrew
~~~~~~~~
2. Check if ``homebrew`` is installed::

::
brew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
If not, install it::

Eclipse
~~~~~~~
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

*(Optional)*::
Check https://brew.sh/ if there's any issues here.

brew install Caskroom/cask/eclipse-cpp
3. Prepare installation directory

Build tools
-----------
Let's use /opt as the main directory for tools and Sming.

Required for the makefile build system::
Regular users may not have access to */opt*, so do this::

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

Install gnu-sed and make sure that it is the default ``sed`` command line application::
(alternatively, use a different directory).

brew install gnu-sed --with-default-names
4. Fetch the Sming repository::

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::
git clone https://github.com/SmingHub/Sming /opt/sming

brew uninstall gnu-sed
brew install gnu-sed --with-default-names
If using a directory other than ``/opt`` then you'll need to edit ``sming/Tools/export.sh`` before proceeding.

ESP8266 Toolchain
-----------------
5. Run the installer::

We pull this in from the `SmingTools <https://github.com/SmingHub/SmingTools/releases>`__ repository::
source /opt/sming/Tools/install.sh all

cd ~/
export ESP_HOME=/opt/esp-quick-toolchain
curl -LO https://github.com/SmingHub/SmingTools/releases/download/1.0/x86_64-apple-darwin14.xtensa-lx106-elf-e6a192b.201211.tar.gz
sudo mkdir -p $ESP_HOME
sudo tar -zxf x86_64-apple-darwin14.xtensa-lx106-elf-e6a192b.201211.tar.gz -C $ESP_HOME
sudo chmod -R 775 $ESP_HOME
If you want to save disk space then you can select which tools to install.
Get a list of available options like this::

You can also build it yourself
`with Homebrew <https://github.com/pfalcon/esp-open-sdk#macos>`__ or
`with MacPorts <http://www.esp8266.com/wiki/doku.php?id=setup-osx-compiler-esp8266>`__.
/opt/sming/Tools/install.sh

Get Sming Core
--------------

Clone from the `Sming <https://github.com/SmingHub/Sming>`__ repository::
Vscode
------

cd <your-favourite-development-folder>/
git clone https://github.com/SmingHub/Sming.git
cd Sming
See https://code.visualstudio.com/.

.. 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.
Eclipse
-------

*(Optional)*::

You will get a copy of our `develop` branch which is intended for developers.
It is the one where all new cool (unstable) features are landing.
brew install Caskroom/cask/eclipse-cpp

If you want to use our stable branch then use the master branch::

git checkout origin/master
.. note::

Finally, set the :envvar:`SMING_HOME` environment variable to point to <your-favourite-development-folder>/Sming/Sming::
The following information may be out of date.

export SMING_HOME=`pwd`

Environment Variables
---------------------

Open with a text editor the ``.profile`` file in your home directory, and add these lines::

export ESP_HOME=/opt/esp-quick-toolchain
export SMING_HOME=<your-favourite-development-folder>/Sming/Sming
export SMING_HOME=opt/Sming/Sming

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

0 comments on commit 7b7dfa2

Please sign in to comment.