fprime/docs/getting-started/installing-fprime.md
Thomas Boyer-Chammard 728a022e9c
Add support for CCSDS TC/TM and SpacePacket protocols (#3684)
* First pass at Svc + TcpClient implementation

* Tmp work

* Revert FileUplink changes

* Add copy (with allocation/deallocation) to FprimeRouter to simplify buffer management

* Update FprimeRouter UTs

* Update FprimeDeframer UTs

* Update FrameAccumulator UTs

* Update ComStub UTs

* Update missing Drv and UTs

* Update ComInterface to use ComDataWithContext on output

* Update Ref/RPI topology

* Fix spelling

* Fix test typo

* Update Udp component and UTs

* Rename data ports and standardize "Return" naming pattern

* Fix variable name

* Adapt UTs

* Update Communication Adapter Interface docs

* Full SDD updates

* Spelling &  nits and details

* Put formatting back to original

* Added SpacePacket, TC and TM framers/deframers + Ref topology. Working with GDS wohooo

* TODOs and code cleanup

* Add APID enum to ComCfg.fpp and route based on received APID

* Increment counts per frame/apid

* Remove duplicate files

* Document and implement services/functions provided by the TCDeframer

* Add events, todos and notes

* fill TM frame with idle packet

* Add ApidMapper component and map APID - FwPacketDescriptor

* Refactor to new CMake API

* Update Types and Add TCDeframer tests

* Update type usage namespacing

* Finish TCDeframer UTs

* Add TMFramer tests and refine VcId handling

* Tests and code cleanup

* Define ComPacketType in FPP

* Map FW_PACKET_FILE to downlink specific APID

* Remove sequence number check

* Add packet loss notification to space packet

* Tests WIP

* WIP

* Use SpacePacket header type in TMFramer idle packet

* SpacePacketDeframer tests and untracked APID detection

* Add APID (=PacketDescriptor) extraction to FprimeDeframer

* Use ApidManager on uplink to validate seq count (is central authority for APID - SeqCount)

* Code cleanup

* Much cleaner ApidManager as a service, not in the middle of framing

* Even better ApidManager

* Add SpacePacketFramer UTs

* Set up rule based testing for ApidManager

* Code cleanup and fix TMFramer UT

* First pass at SDDs and stuff

* SDD fixes

* ApidManager Rule-based testing

* Improve TMFramer code coverage, docs and comments

* Types cleanup

* Add CRC check to CcsdsTCFrameDetector

* Add unit tests for CcsdsTCFrameDetector

* Fix Ref topology

* Fix old PacketType usage

* Fix ComQueue UTs

* Fix CI warnings

* Add test for CRC corruption in frame detector

* Spelling

* Remove ApidDemo component from topology

* Fix more static analysis

* Clean up ApidManager tests and fix static analysis warnings

* Fix UTs on RHEL8

* Fix SDD links

* Fix more static analysis on UTs

* More spelling fixes

* Improve SDDs and comments

* Update metadata

check-spelling run (pull_request_target) for ccsds-protocols

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
on-behalf-of: @check-spelling <check-spelling-bot@check-spelling.dev>

* More SDD updates

* Attempt UT fixes

* First pass of review comments

* Fix length token is minus 1 inconsistency

* Review recs: static assert frame size, docs, TM buffer asserts

* Add fprime-gds.yml to Ref for GDS with framing selection

* Update requirements.txt for GDS 4.0.0a3 (CCSDS protocols)

* Update UTs to reflect last update

* Drop Python 3.8 support

* Update FprimeRouter UTs for new APID routing

* Fix spelling and RHEL8 cast warnings

* Fix spelling again...

* Deserialize APID in FprimeDeframer only if it is valid

* Fix googletest warning??

* static casting that u8 yall

* Use width FPP constants

* Add SDD links

* Switch TMFramer/TCDeframer capitalization to TmFramer/TcDeframer

* Use git mv to rename files and directory

* oops forgot rename a test file

* review changes: add annotations on all FPP ports

---------

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
Co-authored-by: Thomas Boyer-Chammard <thomas-bc@users.noreply.github.com>
2025-06-11 11:04:38 -07:00

6.9 KiB
Raw Blame History

Installing F´

Overview

This installation guide is specifically designed to enable individuals and researchers to get up and running with F´ quickly. Larger projects with specific requirements may need to extend this process.

Note

See the troubleshooting section at the bottom for help resolving common issues found during F´ installs.

Sections:

System Requirements

F´ depends on several items before the user should attempt to install it. These requirements are listed below and the user should ensure they are installed before proceeding with this guide.

Requirements:

  1. Linux, macOS, or WSL on Windows
  2. git
  3. CLang or GNU C and C++ compilers (e.g. gcc and g++)
  4. Python 3.9+, virtual environments, and PIP

Note

Latest versions of PIP are strongly recommended. See Recommended PIP Versions

For build host architectures other than x86_64 or aarch64, and systems with older PIP versions, Java is required

Ubuntu and Debian users should see notes on Python installation

Other OS-specific notes are in the Troubleshooting section below.

Creating a new F´ Project

The ecosystem of tools supporting F´ is installed as Python packages available via PIP. These packages are installed in a virtual environment by the F´ Bootstrap tool. It is recommended to have one virtual environment per project.

1. Install the F´ Bootstrap tool

The F´ Bootstrap tool is responsible for creating a new F´ project and installing the Python dependencies within the project's virtual environment. Install the fprime-bootstrap tool with:

pip install fprime-bootstrap

Tip

Some macOS users see an SSL error. Correct the SSL error and rerun the above command.

2. Create a new project

The entrypoint to developing with F´ is creating a new project. This will clone the F´ repository and install the full tool suite of the specified version for working with the selected version of F´. To create a new project, run:

fprime-bootstrap project

This command will ask for some input. Sample responses are below:

  [1/1] Project name (MyProject): MyProject
  1. This commands perform the following actions:
    • Create a new git repository with the standard F´ project structure
    • Create a new virtual environment within the project and install dependencies

3. Activate the virtual environment

Once the project is created, activate the virtual environment to use the F´ tool suite.

cd MyProject
. fprime-venv/bin/activate

Warning

Always remember to activate the virtual environment whenever you work with this F´  project.

Next steps: HelloWorld Tutorial{ .md-button .md-button--primary }

Working With An Existing Project

Sometimes users wish to work with existing F´ projects. Once the project has been acquired, users should install the tools associated with that project. This is done with:

  1. Ensure a virtual environment for this project has been created and activated

  2. Download the project

Note

When using git and submodules, remember to run git submodule update --init --recursive

  1. Install the required F´ tools version pip install -r <project>/fprime/requirements.txt

Note

Some projects ship their own requirements.txt. Install using that file if it exists.

Troubleshooting

This section will add some known hints to trouble-shooting with the installation of F´. This will hopefully help users install things more effectively.

General

Linux

macOS

Some of the F´ Python packages are built in a way that it is recommended to install them with modern versions of PIP. Systems not recommended or pip versions less than recommended will require Java and run slower versions of FPP tools. The recommended versions are described below:

System Recommended pip version
macOS (10.9+) >= 21.0.1
x86_64 >= 19.3
aarch64 >= 20.3

fprime-util: command not found

If the user is using a virtual environment and receives the command not found, the problem is likely caused by the environment not being sourced in a new terminal. Make sure to source the environment before running:

. <path/to/project>/fprime-venv/bin/activate

If installing without a virtual environment, PIP occasionally uses $HOME/.local/bin as a place to install user tools. Users running without virtual environments should add this directory to the path.

Helper script fpp-redirect-helper exited with reason: Permission denied

This error can occur when the helper-script, (fprime/cmake/autocoder/fpp-wrapper/fpp-redirect-helper) loses its execution permission.

To verify that this is the case, change to the directory containing fpp-redirect-helper and verify that it is executable.

cd fprime/cmake/autocoder/fpp-wrapper/
ls -l

If it is not executable, add the permission back.

chmod 700 fpp-redirect-helper

Ubuntu, Debian, Java and Python PIP

Ubuntu and possibly other Debian variants dont include the pip packages in the default Python 3 installation. To get fully functional, use these commands on Ubuntu and Debian based systems:

sudo apt install git cmake default-jre python3 python3-pip python3-venv

Now you should be able to run the installation without trouble.

SSL Error with Python 3.8+ on macOS

This fix will not work for Python installed via Homebrew. Try installing Python published at python.org. The version of openSSL bundled with Python 3.8+ requires access to macOSs root certificates. If the following error is encountered while installing fprime:

Failed find expected download: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get  local issuer certificate

Then run the following command in a macOS terminal to install necessary certificates:

cd /Applications/Python\ 3.X/
./Install\ Certificates.command

After running above command, re-try installing fprime-bootstrap.