Skip to content

Commit 9ab39eb

Browse files
authored
Merge pull request adafruit#688 from jepler/atsamd-build-reqs
Better document build requirements and steps
2 parents 286e342 + 3f82fe8 commit 9ab39eb

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

ports/atmel-samd/README.rst

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,43 @@ PB03 **Yes** **Yes** **Yes** **Yes**
115115

116116
Setup
117117
-----
118-
Install required compiler packages:
118+
119+
An ARM compiler is required for the build, along with the associated binary
120+
utilities. On Ubuntu, these can be installed as follows:
119121

120122
.. code-block:: shell
121123
122124
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
123125
sudo apt-get install gcc-arm-embedded
124126
127+
On Arch Linux the compiler is available for via the package
128+
``arm-none-eabi-gcc``.
129+
130+
For other systems, the `GNU Arm Embedded Toolchain <https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads>`_
131+
may be available in binary form.
132+
133+
The latest available package from team-gcc-arm-embedded is used to produce the
134+
binaries shipped by AdaFruit. Other compiler versions, particularly older
135+
ones, may not work properly. In particular, the ``gcc-arm-none-eabi`` package
136+
in Debian Stretch is too old.
137+
138+
The compiler can be changed using the ``CROSS_COMPILE`` variable when invoking
139+
``make``.
140+
125141
Building
126142
--------
127143

144+
Before building the firmware for a given board the MicroPython cross-compiler
145+
must be built; it will be used to pre-compile some of the built-in scripts to
146+
bytecode. The cross-compiler is built and run on the host machine, using:
147+
148+
.. code-block:: shell
149+
150+
make -C mpy-cross
151+
152+
This command should be executed from the root directory of this repository.
153+
All other commands below should be executed from the ports/atmel-samd/ directory.
154+
128155
To build for the Arduino Zero:
129156

130157
.. code-block:: shell

0 commit comments

Comments
 (0)