Merge pull request #688 from jepler/atsamd-build-reqs

Better document build requirements and steps
This commit is contained in:
Scott Shawcroft 2018-03-20 10:03:01 -07:00 committed by GitHub
commit 9ab39eb2d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 28 additions and 1 deletions

View File

@ -115,16 +115,43 @@ PB03 **Yes** **Yes** **Yes** **Yes**
Setup
-----
Install required compiler packages:
An ARM compiler is required for the build, along with the associated binary
utilities. On Ubuntu, these can be installed as follows:
.. code-block:: shell
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
sudo apt-get install gcc-arm-embedded
On Arch Linux the compiler is available for via the package
``arm-none-eabi-gcc``.
For other systems, the `GNU Arm Embedded Toolchain <https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads>`_
may be available in binary form.
The latest available package from team-gcc-arm-embedded is used to produce the
binaries shipped by AdaFruit. Other compiler versions, particularly older
ones, may not work properly. In particular, the ``gcc-arm-none-eabi`` package
in Debian Stretch is too old.
The compiler can be changed using the ``CROSS_COMPILE`` variable when invoking
``make``.
Building
--------
Before building the firmware for a given board the MicroPython cross-compiler
must be built; it will be used to pre-compile some of the built-in scripts to
bytecode. The cross-compiler is built and run on the host machine, using:
.. code-block:: shell
make -C mpy-cross
This command should be executed from the root directory of this repository.
All other commands below should be executed from the ports/atmel-samd/ directory.
To build for the Arduino Zero:
.. code-block:: shell