@@ -9,17 +9,17 @@ After completing these steps, you will be able to compile and run your Zephyr
9
9
applications on the following Mac OS version:
10
10
11
11
* Mac OS X 10.11 (El Capitan)
12
+ * macOS Sierra 10.12
12
13
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
15
16
target architecture you can use it directly.
16
17
17
18
Using a 3rd Party toolchain
18
19
***************************
19
20
20
21
If 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 `.
23
23
24
24
An example of an available 3rd party toolchain is GCC ARM Embedded for the
25
25
Cortex-M family of cores.
@@ -40,8 +40,8 @@ build for and install tools that the build system requires.
40
40
Before proceeding with the build, ensure your OS is up to date.
41
41
42
42
First, 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
45
45
system.
46
46
47
47
To install :program: `Homebrew `, visit the `Homebrew site `_ and follow the
@@ -53,12 +53,28 @@ missing dependency. If so, follow please follow the instructions provided.
53
53
After Homebrew was successfully installed, install the following tools using
54
54
the brew command line.
55
55
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
+
56
65
.. code-block :: console
57
66
58
- $ brew install gettext qemu help2man mpfr gmp coreutils wget python3 dfu-util
67
+ $ brew install gettext help2man mpfr gmp coreutils wget
59
68
$ brew tap homebrew/dupes
60
69
$ 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
+
62
78
$ brew install crosstool-ng
63
79
64
80
Alternatively you can install the latest version of :program: `crosstool-ng `
@@ -67,9 +83,9 @@ latest version usually supports the latest released compilers.
67
83
68
84
.. code-block :: console
69
85
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 /
73
89
$ ./configure
74
90
$ make
75
91
$ make install
@@ -92,7 +108,8 @@ Alternatively you can use the script below to create the image:
92
108
.. code-block :: bash
93
109
94
110
#! /bin/bash
95
- ImageName=CrossToolNG ImageNameExt=${ImageName} .sparseimage
111
+ ImageName=CrossToolNG
112
+ ImageNameExt=${ImageName} .sparseimage
96
113
diskutil umount force /Volumes/${ImageName} && true
97
114
rm -f ${ImageNameExt} && true
98
115
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
116
133
for building the toolchain.
117
134
The configuration files can be found in :file: `${ ZEPHYR_BASE } /scripts/cross_compiler/ `.
118
135
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
+
119
142
.. code-block :: console
120
143
121
- $ cp ${ZEPHYR_BASE}/scripts/cross_compiler/x86 .config .config
144
+ $ cp ${ZEPHYR_BASE}/scripts/cross_compiler/i586 .config .config
122
145
123
146
You can create a toolchain configuration or customize an existing configuration
124
147
yourself using the configuration menus:
125
148
126
149
.. code-block :: console
127
150
151
+ $ export CT_PREFIX=/Volumes/CrossToolNG
128
152
$ ct-ng menuconfig
129
153
130
154
Verifying the Configuration of the Toolchain
0 commit comments