fprime/docs/Tutorials/CrossCompilationSetup/CrossCompilationSetupTutorial.md
Josh Soref 9633049549
Upgrade to check-spelling v0.0.22 (#2316)
* drop: @params None

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: anymore

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: baremetal

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: cannot

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: cookiecutter

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: macos

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: neither

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: nonexistent

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: param

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: unix

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* grammar: like

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* Update check-spelling to v0.0.22

- enables sarif reporting
- enables checking dependabot PRs to validate extra_dictionaries in the
    future
- refreshes dictionaries
- refreshes metadata

* Shim for check-spelling v0.0.21

* Comment out false positive

---------

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: Thomas Boyer-Chammard <49786685+thomas-bc@users.noreply.github.com>
2023-10-26 13:32:48 -07:00

2.5 KiB
Raw Blame History

F´ Cross-Compilation Setup Tutorial

Table of Contents

1. Introduction

In this section, we will learn how to install all the dependencies required for cross-compiling for different architectures. This tutorial will use the Raspberry Pi ARM x64 as an example. In order to fully benefit from this tutorial, the user should acquire a Raspberry Pi.

Prerequisites

To run through this tutorial, you must have a computer that meets the following basic requirements.

  1. Computer running Windows 10, Mac OS X, or Ubuntu
  2. Administrator access
  3. 5GB of free disk space, 8 GB of RAM
  4. Knowledge of the command line for your operating system (Bash, Powershell, Zsh, etc).

2. Installing Dependencies

Choose the operating system you are using to install F Prime:

3. Installing the Toolchain

Note: macOS users must run these commands from within the Docker container described in Appendix I or setup a Linux virtual machine.

Installing the cross-compiler will use the pre-built packages provided by ARM. Follow these instructions to install these tools for the target hardware into the /opt/toolchains directory.

sudo mkdir -p /opt/toolchains
sudo chown $USER /opt/toolchains
# For in-person workshops, and users running on 64-bit ARM
curl -Ls https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu.tar.xz | tar -JC /opt/toolchains --strip-components=1 -x
# For users running on 32-bit ARM
curl -Ls https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf.tar.xz | tar -JC /opt/toolchains --strip-components=1 -x

Next, ensure that the ARM toolchains were installed properly. To test, run the following command:

# For  64-bit ARM hardware
/opt/toolchains/bin/aarch64-none-linux-gnu-gcc -v 
# For 32-bit ARM hardware
/opt/toolchains/bin/arm-linux-gnueabi-gcc -v

Any output other than "file/command not found" is good.

Next: Compiling for ARM