Fprime—— F‘ - A flight software and embedded systems framework

程皓轩
2023-12-01

F´ Installation Guide

F´:经过飞行验证的多平台开放源代码飞行软件框架

F´(F Prime)是一个组件驱动的框架,可以快速开发和部署太空飞行及其他嵌入式软件应用程序。

F´最初是在喷气推进实验室开发的,现已成功部署在多种太空应用中。它是量身定制的,但不仅限于小规模的航天系统,例如立方卫星,小卫星和仪器。

F´包含几个元素:

一种架构,可将飞行软件分解为具有明确接口的离散组件

一个提供诸如消息队列和线程之类的核心功能的C ++框架

用于指定组件和连接并自动生成代码的建模工具

越来越多的现成组件集合

用于在单元和集成级别测试飞行软件的测试工具。

F´ Source Tree F´ Out of the Box Items

The rest of this page will cover various items provided by F´ out-of-the-box. Most of these items have more complete documentation linked above.
Framework and Service Components

F´ ships with a core framework and service code enabling the construction of F´ applications using standards. Specifically, the service (Svc) components provide most of the basic functionality to command, and communicate with an embedded system such as a spacecraft.
Autocoder

Autocoder automatically adds ports for registering commands, receiving commands and reporting an execution status. F′ defines an Extensible Markup Language (XML) schema that users can use to specify a model of a FSW application. The model describes the application at a high level in terms of the components, ports, and topologies of the F′ architecture. The F′ autocoder translates the model into the C++ classes to greatly reduce the boiler plate code required to build an embedded system.
Operating System Abstraction Layer

An operating system abstraction layer (OSAL) provides implementations of an application programming interface (API) for real-time operating systems (RTOS) and non-real-time operating systems in a generic way such that the code using the OSAL layer can easily swap to another OS without modification.

The F′ framework OSAL includes C++ classes that provide abstractions of common operating systems features. These features include threads, mutual exclusion locks, message queues, files, timers, and clocks.

The open-source framework provides implementations of the operating systems layer for Linux and Mac OS. The Linux implementation works in Windows using WSL. Some other Os are provided in extension libraries.
Ground Data System (GDS)

See: F´ GDS

The F′ user experience is intended to be an out-of-box ready to use ground data system (GDS) solution than can easily run on Linux, Mas OSX, or Windows platforms without any mission specific tailoring. The GDS provides an end-user graphical user interface (GUI) tool and an integration test application programming interface (API) to enable integration testing and quick-look telemetry monitoring.

Initially, the user defines the mission specific components with commands and telemetry, and then the dictionaries are automatically generated from this design. These dictionaries are read into the GDS to provide the user experience.
F′ Utility Build Helper and CMake System

F´ ships with a buoild system configured to build the F´ code. This build system is implemented using CMake and handles the dependencies needed to run the Autocoder and assemble it with user written code. In order to support more standard development patterns with F´, the fprime-util was built. This tool maps simple commands into the make system in order to allow developer to follow set patterns easily.
Linux Drivers

F´ ships with some basic driver implementations for Linux systems. These act as example driver components and allow users choosing the Linux OS to run standard hardware like UART, I2C, SPI, etc.

Requirements

F´ depends on several items before the user should attempt to install it. These requirements are listed below, and should be on any system the user wishes to use. Should these items not be available on the user's Operating System, then a Virtual Machine should be used. One option is VirtualBox Oracle VM VirtualBox.

Requirements:

  1. Linux or Mac OS X operating system (or Windows Subsystem for Linux on Windows)
  2. CMake 3.5 or newer Download | CMake. CLI tool must be available on system path. CMake的 介绍 CMake是一个跨平台的开源构建系统生成器
  3. Bash or Bash compatible shell
  4. CLang or GCC compiler
  5. Python 3.5+ and PIP Download Python | Python.org
  6. Python Virtual Environment * (pip install venv or pip install virtualenv)

Note: it is possible to install and run F´ without a virtual environment, however; for individuals and researchers, this is the recommended approach.

报error: invalid command 'bdist_wheel’的错
解决方法:使用命令行pip3 install wheel,再去安装pyinstaller模块就行了

Create and Activate a new Python Environment

This will create a new virtual environment for F´ to be installed into. The following commands will create a new virtual environment called fprime-venv and ensure that virtual environment is activated.

Python 3.5+:

python3 -m venv ./fprime-venv
. ./fprime-venv/bin/activate

Any time the user wishes to use F´, this virtual environment should be activated. This should be done in each new shell the user uses. This is all that is required to activate F´ for use.

Note: file system for VirtualEnvironment should support symbolic links, or use the --always-copy flag to pip.

Activate the Virtual Environment

. ./fprime-venv/bin/activate

Cloning the F´ Repository

Installation of F´ requires cloning of the F´ core repository. This uses Git. This will bring down the core framework and C++ files.

Clone F´

git clone https://github.com/nasa/fprime

Installing F´ Python Requirements

F´ python support packages have certain requirements on various Python packages available on PYPI. These requirements are broken out in two files one for the Autocoder tools and one for the GDS tools package. This is to enable users to choose which tools they'd like to use.

Installing F´ Python Packages

pip install --upgrade wheel setuptools pip
cd <path to fprime checkout>
pip install ./Fw/Python
pip install ./Gds

from werkzeug.datastructures import FileStorage

from werkzeug.utils import secure_filename

 类似资料: