@@ -9,17 +9,17 @@ After completing these steps, you will be able to compile and run your Zephyr
99applications on the following Mac OS version:
1010
1111* Mac OS X 10.11 (El Capitan)
12+ * macOS Sierra 10.12
1213
13- Developing for Zephyr on OS X generally requires you to build the
14- toolchain yourself. However, if there is already an OS X toolchain for your
14+ Developing for Zephyr on macOS generally requires you to build the
15+ toolchain yourself. However, if there is already an macOS toolchain for your
1516target architecture you can use it directly.
1617
1718Using a 3rd Party toolchain
1819***************************
1920
2021If a toolchain is available for the architecture you plan to build for, then
21- you can use it as explained in:
22- :ref: `third_party_x_compilers `.
22+ you can use it as explained in: :ref: `third_party_x_compilers `.
2323
2424An example of an available 3rd party toolchain is GCC ARM Embedded for the
2525Cortex-M family of cores.
@@ -40,8 +40,8 @@ build for and install tools that the build system requires.
4040Before proceeding with the build, ensure your OS is up to date.
4141
4242First, install the :program: `Homebrew ` (The missing package manager for
43- OS X ). Homebrew is a free and open-source software package management system
44- that simplifies the installation of software on Apple's OS X operating
43+ macOS ). Homebrew is a free and open-source software package management system
44+ that simplifies the installation of software on Apple's macOS operating
4545system.
4646
4747To install :program: `Homebrew `, visit the `Homebrew site `_ and follow the
@@ -53,12 +53,28 @@ missing dependency. If so, follow please follow the instructions provided.
5353After Homebrew was successfully installed, install the following tools using
5454the brew command line.
5555
56+ Install tools to build Zephyr binaries:
57+
58+ .. code-block :: console
59+
60+ $ brew install dfu-util qemu dtc python3
61+ $ pip3 install ply pyyaml
62+
63+ Install tools needed for building the toolchain (if needed):
64+
5665.. code-block :: console
5766
58- $ brew install gettext qemu help2man mpfr gmp coreutils wget python3 dfu-util
67+ $ brew install gettext help2man mpfr gmp coreutils wget
5968 $ brew tap homebrew/dupes
6069 $ brew install grep --with-default-names
61- $ pip3 install ply
70+
71+
72+ To build the toolchain, you will need the latest version of crosstool-ng (1.23).
73+ This version was not available via brew when writing this documentation, you can
74+ however try and see if you get 1.23 installed:
75+
76+ .. code-block :: console
77+
6278 $ brew install crosstool-ng
6379
6480 Alternatively you can install the latest version of :program: `crosstool-ng `
@@ -67,9 +83,9 @@ latest version usually supports the latest released compilers.
6783
6884.. code-block :: console
6985
70- $ wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.22 .0.tar.bz2
71- $ tar xvf crosstool-ng-1.22 .0.tar.bz2
72- $ cd crosstool-ng/
86+ $ wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.23 .0.tar.bz2
87+ $ tar xvf crosstool-ng-1.23 .0.tar.bz2
88+ $ cd crosstool-ng-1.23.0 /
7389 $ ./configure
7490 $ make
7591 $ make install
@@ -92,7 +108,8 @@ Alternatively you can use the script below to create the image:
92108.. code-block :: bash
93109
94110 #! /bin/bash
95- ImageName=CrossToolNG ImageNameExt=${ImageName} .sparseimage
111+ ImageName=CrossToolNG
112+ ImageNameExt=${ImageName} .sparseimage
96113 diskutil umount force /Volumes/${ImageName} && true
97114 rm -f ${ImageNameExt} && true
98115 hdiutil create ${ImageName} -volname ${ImageName} -type SPARSE -size 8g -fs HFSX
@@ -116,15 +133,22 @@ both ARM and X86 that can be used to pre-select the options needed
116133for building the toolchain.
117134The configuration files can be found in :file: `${ ZEPHYR_BASE } /scripts/cross_compiler/ `.
118135
136+ Currently the following configurations are provided:
137+
138+ * i586.config: for standard ABI, for example for Galileo and qemu_x86
139+ * iamcu.config: for IAMCU ABI, for example for the Arduino 101
140+ * nios2.config: for Nios II boards
141+
119142.. code-block :: console
120143
121- $ cp ${ZEPHYR_BASE}/scripts/cross_compiler/x86 .config .config
144+ $ cp ${ZEPHYR_BASE}/scripts/cross_compiler/i586 .config .config
122145
123146 You can create a toolchain configuration or customize an existing configuration
124147yourself using the configuration menus:
125148
126149.. code-block :: console
127150
151+ $ export CT_PREFIX=/Volumes/CrossToolNG
128152 $ ct-ng menuconfig
129153
130154 Verifying the Configuration of the Toolchain
0 commit comments