docs: fix instructions for building toolchain on macOS

Closes https://github.com/espressif/esp-idf/issues/503
Closes https://github.com/espressif/esp-idf/issues/2607
This commit is contained in:
Ivan Grokhotkov 2018-10-22 13:45:09 +08:00
parent d3f5882ed7
commit c8fe9f696c
5 changed files with 37 additions and 19 deletions

View file

@ -51,12 +51,14 @@ Compile the Toolchain from Source
TODO TODO
Download ``crosstool-NG`` and build it:: Create the working directory and go into it::
mkdir -p ~/esp
cd ~/esp cd ~/esp
git clone -b xtensa-1.22.x https://github.com/espressif/crosstool-NG.git
cd crosstool-NG Download ``crosstool-NG`` and build it:
./bootstrap && ./configure --enable-local && make install
.. include:: /_build/inc/scratch-build-code.inc
Build the toolchain:: Build the toolchain::

View file

@ -14,6 +14,8 @@ MacPorts needs a full XCode installation, while homebrew only needs XCode comman
.. _homebrew: https://brew.sh/ .. _homebrew: https://brew.sh/
.. _MacPorts: https://www.macports.org/install.php .. _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 Install Prerequisites
===================== =====================
@ -58,15 +60,16 @@ Mount it::
Create a symlink to your work directory:: Create a symlink to your work directory::
cd ~/esp mkdir -p ~/esp
ln -s /Volumes/ctng crosstool-NG ln -s /Volumes/ctng ~/esp/ctng-volume
Download ``crosstool-NG`` and build it:: Go into the newly created directory::
cd ~/esp cd ~/esp/ctng-volume
git clone -b xtensa-1.22.x https://github.com/espressif/crosstool-NG.git
cd crosstool-NG Download ``crosstool-NG`` and build it:
./bootstrap && ./configure --enable-local && make install
.. include:: /_build/inc/scratch-build-code.inc
Build the toolchain:: Build the toolchain::
@ -74,7 +77,7 @@ Build the toolchain::
./ct-ng build ./ct-ng build
chmod -R u+w builds/xtensa-esp32-elf 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 Next Steps

View file

@ -2,8 +2,9 @@
Setup Linux Toolchain from Scratch 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 Install Prerequisites
===================== =====================
@ -49,6 +50,11 @@ Compile the Toolchain from Source
TODO TODO
Create the working directory and go into it::
mkdir -p ~/esp
cd ~/esp
Download ``crosstool-NG`` and build it: Download ``crosstool-NG`` and build it:
.. include:: /_build/inc/scratch-build-code.inc .. include:: /_build/inc/scratch-build-code.inc

View file

@ -2,6 +2,10 @@
Setup Toolchain for Mac OS from Scratch 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 Install Prerequisites
===================== =====================
@ -41,8 +45,12 @@ Mount it::
Create a symlink to your work directory:: Create a symlink to your work directory::
cd ~/esp mkdir -p ~/esp
ln -s /Volumes/ctng crosstool-NG 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:
@ -54,7 +62,7 @@ Build the toolchain::
./ct-ng build ./ct-ng build
chmod -R u+w builds/xtensa-esp32-elf 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 Next Steps

View file

@ -43,7 +43,6 @@ def main():
scratch_build_code_linux_macos = """ scratch_build_code_linux_macos = """
:: ::
cd ~/esp
git clone -b xtensa-1.22.x https://github.com/espressif/crosstool-NG.git git clone -b xtensa-1.22.x https://github.com/espressif/crosstool-NG.git
cd crosstool-NG cd crosstool-NG
./bootstrap && ./configure --enable-local && make install ./bootstrap && ./configure --enable-local && make install