@@ -50,24 +50,40 @@ installation instructions on the site.
50
50
To complete the Homebrew installation, you might be prompted to install some
51
51
missing dependency. If so, follow please follow the instructions provided.
52
52
53
- After Homebrew was successfully installed, install the following tools using
53
+ After Homebrew is successfully installed, install the following tools using
54
54
the brew command line.
55
55
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
+
56
62
Install tools to build Zephyr binaries:
57
63
58
64
.. code-block :: console
59
65
60
66
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
64
67
cd ~/zephyr # or to the folder where you cloned the zephyr repo
65
68
pip3 install --user -r scripts/requirements.txt
66
69
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:
69
77
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
71
87
72
88
Source :file: `zephyr-env.sh ` wherever you have cloned the Zephyr Git repository:
73
89
@@ -116,27 +132,13 @@ Install tools needed for building the toolchain (if needed):
116
132
brew install grep --with-default-names
117
133
118
134
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:
122
137
123
138
.. code-block :: console
124
139
125
140
brew install crosstool-ng
126
141
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
-
140
142
Creating a Case-sensitive File System
141
143
=====================================
142
144
0 commit comments