Skip to content

Commit cd05a63

Browse files
carlescufiAnas Nashif
authored andcommitted
doc: getting_started: Modernize macOS instructions
Modernize macOS instructions to fit the latest packages offered by Homebrew and macOS High Sierra. Signed-off-by: Carles Cufi <[email protected]>
1 parent 77bbc42 commit cd05a63

File tree

1 file changed

+25
-23
lines changed

1 file changed

+25
-23
lines changed

doc/getting_started/installation_mac.rst

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -50,24 +50,40 @@ installation instructions on the site.
5050
To complete the Homebrew installation, you might be prompted to install some
5151
missing dependency. If so, follow please follow the instructions provided.
5252

53-
After Homebrew was successfully installed, install the following tools using
53+
After Homebrew is successfully installed, install the following tools using
5454
the brew command line.
5555

56+
.. note::
57+
Zephyr requires Python 3 in order to be built. Since macOS comes bundled
58+
only with Python 2, we will need to install Python 3 with Homebrew. After
59+
installing it you should have the macOS-bundled Python 2 in ``/usr/bin/``
60+
and the Homebrew-provided Python 3 in ``/usr/local/bin``.
61+
5662
Install tools to build Zephyr binaries:
5763

5864
.. code-block:: console
5965
6066
brew install cmake ninja dfu-util doxygen qemu dtc python3 gperf
61-
curl -O 'https://bootstrap.pypa.io/get-pip.py'
62-
./get-pip.py
63-
rm get-pip.py
6467
cd ~/zephyr # or to the folder where you cloned the zephyr repo
6568
pip3 install --user -r scripts/requirements.txt
6669
67-
If you require pyocd, an open source python2 library for programming and
68-
debugging ARM Cortex-M microcontrollers, use this command::
70+
.. note::
71+
If ``pip3`` does not seem to have been installed correctly use
72+
``brew reinstall python3`` in order to reinstall it.
73+
74+
If you require pyocd, an open source Python 2 library for programming and
75+
debugging ARM Cortex-M microcontrollers, use this command to install it using
76+
the macOS-bundled Python 2:
6977

70-
pip2 install --user -r scripts/py2-requirements.txt
78+
.. code-block:: console
79+
80+
pip install --user -r scripts/py2-requirements.txt
81+
82+
If pip for the macOS-bundled Python 2 is not installed, you can install it with:
83+
84+
.. code-block:: console
85+
86+
sudo python -m ensurepip
7187
7288
Source :file:`zephyr-env.sh` wherever you have cloned the Zephyr Git repository:
7389

@@ -116,27 +132,13 @@ Install tools needed for building the toolchain (if needed):
116132
brew install grep --with-default-names
117133
118134
119-
To build the toolchain, you will need the latest version of crosstool-ng (1.23).
120-
This version was not available via brew when writing this documentation, you can
121-
however try and see if you get 1.23 installed:
135+
To build the toolchain, you will need crosstool-ng version 1.23 or higher.
136+
Install it by using Homebrew:
122137

123138
.. code-block:: console
124139
125140
brew install crosstool-ng
126141
127-
Alternatively you can install the latest version of :program:`crosstool-ng`
128-
from source. Download the latest version from the `crosstool-ng site`_. The
129-
latest version usually supports the latest released compilers.
130-
131-
.. code-block:: console
132-
133-
wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.23.0.tar.bz2
134-
tar xvf crosstool-ng-1.23.0.tar.bz2
135-
cd crosstool-ng-1.23.0/
136-
./configure
137-
make
138-
make install
139-
140142
Creating a Case-sensitive File System
141143
=====================================
142144

0 commit comments

Comments
 (0)