TODO
-Download ``crosstool-NG`` and build it::
+Create the working directory and go into it::
- cd ~/esp
- git clone -b xtensa-1.22.x https://github.com/espressif/crosstool-NG.git
- cd crosstool-NG
- ./bootstrap && ./configure --enable-local && make install
+ mkdir -p ~/esp
+ cd ~/esp
+
+Download ``crosstool-NG`` and build it:
+
+.. include:: /_build/inc/scratch-build-code.inc
Build the toolchain::
.. _homebrew: https://brew.sh/
.. _MacPorts: https://www.macports.org/install.php
+See :ref:`Customized Setup of Toolchain <get-started-customized-setup>` section for some of the reasons why installing the toolchain from scratch may be necessary.
+
Install Prerequisites
=====================
Create a symlink to your work directory::
- cd ~/esp
- ln -s /Volumes/ctng crosstool-NG
+ mkdir -p ~/esp
+ ln -s /Volumes/ctng ~/esp/ctng-volume
+
+Go into the newly created directory::
+
+ cd ~/esp/ctng-volume
-Download ``crosstool-NG`` and build it::
+Download ``crosstool-NG`` and build it:
- cd ~/esp
- git clone -b xtensa-1.22.x https://github.com/espressif/crosstool-NG.git
- cd crosstool-NG
- ./bootstrap && ./configure --enable-local && make install
+.. include:: /_build/inc/scratch-build-code.inc
Build the toolchain::
./ct-ng build
chmod -R u+w builds/xtensa-esp32-elf
-Toolchain will be built in ``~/esp/crosstool-NG/builds/xtensa-esp32-elf``. Follow :ref:`instructions for standard setup <setup-macos-toolchain-add-it-to-path-cmake>` to add the toolchain to your ``PATH``.
+Toolchain will be built in ``~/esp/ctng-volume/crosstool-NG/builds/xtensa-esp32-elf``. Follow :ref:`instructions for standard setup <setup-macos-toolchain-add-it-to-path-cmake>` to add the toolchain to your ``PATH``.
Next Steps
Setup Linux Toolchain from Scratch
**********************************
-The following instructions are alternative to downloading binary toolchain from Espressif website. To quickly setup the binary toolchain, instead of compiling it yourself, backup and proceed to section :doc:`linux-setup`.
-
+.. note::
+
+ Standard process for installing the toolchain is described :doc:`here <linux-setup>`. See :ref:`Customized Setup of Toolchain <get-started-customized-setup>` section for some of the reasons why installing the toolchain from scratch may be necessary.
Install Prerequisites
=====================
TODO
+Create the working directory and go into it::
+
+ mkdir -p ~/esp
+ cd ~/esp
+
Download ``crosstool-NG`` and build it:
.. include:: /_build/inc/scratch-build-code.inc
Setup Toolchain for Mac OS from Scratch
***************************************
+.. note::
+
+ Standard process for installing the toolchain is described :doc:`here <macos-setup>`. See :ref:`Customized Setup of Toolchain <get-started-customized-setup>` section for some of the reasons why installing the toolchain from scratch may be necessary.
+
Install Prerequisites
=====================
Create a symlink to your work directory::
- cd ~/esp
- ln -s /Volumes/ctng crosstool-NG
+ mkdir -p ~/esp
+ ln -s /Volumes/ctng ~/esp/ctng-volume
+
+Go into the newly created directory::
+
+ cd ~/esp/ctng-volume
Download ``crosstool-NG`` and build it:
./ct-ng build
chmod -R u+w builds/xtensa-esp32-elf
-Toolchain will be built in ``~/esp/crosstool-NG/builds/xtensa-esp32-elf``. Follow :ref:`instructions for standard setup <setup-macos-toolchain-add-it-to-path>` to add the toolchain to your ``PATH``.
+Toolchain will be built in ``~/esp/ctng-volume/crosstool-NG/builds/xtensa-esp32-elf``. Follow :ref:`instructions for standard setup <setup-macos-toolchain-add-it-to-path>` to add the toolchain to your ``PATH``.
Next Steps
scratch_build_code_linux_macos = """
::
- cd ~/esp
git clone -b xtensa-1.22.x https://github.com/espressif/crosstool-NG.git
cd crosstool-NG
./bootstrap && ./configure --enable-local && make install