This guide will walk through the installation of the arduino-cli
and arduino-cli-cmake-wrapper
tools used to bridge F Prime and the Arduino build system. This assumes a virtual environment has been setup for your project.
Activate the project virtual environment now.
This command downloads arduino-cli
and installs the binary into the existing (and activated) virtual environment.
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=$VIRTUAL_ENV/bin sh
Install all required pip
packages using the requirements.txt
file
pip install -r fprime-arduino/requirements.txt
Required Arduino library dependencies:
arduino-cli lib install Time
If you will be using the Arduino.TcpClient
component, install:
arduino-cli lib install WiFi
The following list shows all the boards that successfully ran an F Prime deployment.
Initialize the arduino-cli configuration file.
arduino-cli config init
Below are board manager URLs for tested Arduino boards. You are not required to add all of these boards, but you are free to do so. You can view the list of addtional boards here if you wish to test F Prime on boards that were not tested above.
arduino-cli config add board_manager.additional_urls https://www.pjrc.com/teensy/package_teensy_index.json
arduino-cli config add board_manager.additional_urls https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
arduino-cli config add board_manager.additional_urls https://espressif.github.io/arduino-esp32/package_esp32_index.json
arduino-cli config add board_manager.additional_urls https://arduino.esp8266.com/stable/package_esp8266com_index.json
arduino-cli config add board_manager.additional_urls https://mcudude.github.io/MegaCore/package_MCUdude_MegaCore_index.json
arduino-cli config add board_manager.additional_urls https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
arduino-cli config add board_manager.additional_urls https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
Install the new board packages. Only install the ones you have added to your board manager in the previous step.
arduino-cli core update-index
arduino-cli core install arduino:avr
arduino-cli core install teensy:avr
arduino-cli core install adafruit:samd
arduino-cli core install adafruit:nrf52
arduino-cli core install esp32:[email protected]
arduino-cli core install esp8266:esp8266
arduino-cli core install MegaCore:avr
arduino-cli core install rp2040:rp2040
arduino-cli core install STMicroelectronics:stm32
ESP32: As of 10/27/2024, versions newer than
esp32:[email protected]
will not work.
If you are building the Adafruit NRF52 boards and are on Linux, you must also install:
pip install adafruit-nrfutil
Add udev rules. Download/save the .rules
files located here for your selected board(s) into /etc/udev/rules.d/
.
Upon successful build of an F Prime deployment, it is time to upload it to your board. The steps differ between boards. Refer to the board list's Upload Guide
column READMEs for guidance.