This project follows the LED Blinker tutorial. During the 2024 CubeSat Developer Workshop we built this tutorial and then deployed to an Arm based ODRIOD. The existing cross-complilation tutorial for F Prime describes how to compile an Arm binary for x86 Windows, Linux, and MacOS machines but does not yet describe a process for "Apple Silicon" (arm64) based MacOS users.
This repository contains a Dockerfile that can build linux arm and arm64 binaries. The Dockerfile will build on any Windows, Mac, or Linux host machine with either an x86 or arm (Apple Silicon) processor.
- Clone the repo
- Pull the fprime submodule
git submodule update --init --recursive
- Create a python venv
python3 -m venv fprime-venv
- Activate the venv
. fprime-venv/bin/activate
- Install required packages
pip install -r fprime/requirements.txt
- Run
docker build --platform=linux/arm64 --output=build-artifacts-docker .
You can now SCP the binary over to your linux/arm machine and run it:
$ scp -r build-artifacts-docker/Linux/LedBlinker/bin/LedBlinker ngay@arm-testbed.local:~
$ ssh ngay@arm-testbed.local
ngay@arm-testbed:~# sudo ./LedBlinker
...
EVENT: (1280) (2:1722300778,53836) DIAGNOSTIC: (cmdDisp) OpCodeRegistered : Opcode 0x500 registered to port 0 slot 0
...
- Run
fprime-generate
- Run
fprime-build
You can now run the GDS:
$ fprime-gds -n --dictionary build-artifacts/Darwin/LedBlinker/dict/LedBlinkerTopologyAppDictionary.xml --ip-client --ip-address 100.79.223.82
...
[INFO] Ensuring TCP Server is stable for at least 5 seconds
...
- Copy the
Dockerfile
and.dockerignore
files from this repo to the root of your F' project - Run
docker build --platform=linux/arm64 --output=build-artifacts-docker .