Architecture Overview
The Core Flight System (cFS) is not a monolithic application but a flexible and modular framework built from a collection of distinct components. The main nasa/cFS
repository acts as a bundle, integrating these components, which are included as Git submodules.
This modular design is a key architectural principle, allowing missions to select and customize the components they need.
Core Framework Components
These three submodules form the essential core of the cFS framework.
-
cfe
(core Flight Executive): This is the heart of cFS. It provides the foundational services required for a flight software system, including:- Software Bus (SB) for message-based communication.
- Executive Services (ES) for application and task management.
- Event Services (EVS) for logging and event messaging.
- Table Services (TBL) for managing onboard tables.
- Time Services (TIME) for timekeeping.
- File Services (FS) for file system access.
-
osal
(Operating System Abstraction Layer): This component provides a consistent API for operating system services like tasks, mutexes, queues, and file systems. By writing applications against the OSAL API instead of a specific OS (like Linux or RTEMS), cFS applications become highly portable across different target platforms. -
psp
(Platform Support Package): This package contains the hardware- and OS-specific implementations required to port cFS to a new target. It handles the low-level details of the board support package (BSP), such as hardware initialization, interrupt handling, and timer configuration.
Lab Applications
This cFS bundle includes a set of "lab" applications that serve as examples and provide basic functionality to make the system executable out-of-the-box.
apps/ci_lab
: Command Ingest Lab application, responsible for receiving commands from the ground system and publishing them to the Software Bus.apps/to_lab
: Telemetry Output Lab application, which subscribes to telemetry messages on the Software Bus and sends them to the ground system.apps/sch_lab
: Scheduler Lab application, a simple scheduler that sends periodic "wakeup" messages to other applications, enabling them to run at predefined intervals.apps/sample_app
: A template or example application demonstrating the basic structure of a cFS app.
Libraries
Shared libraries can be used by multiple applications.
libs/sample_lib
: An example of a shared library within the cFS build system.
Tools
The ecosystem includes several host-side tools to support development and operations.
tools/cFS-GroundSystem
: A Python-based ground system for sending commands to and receiving telemetry from a running cFS instance.tools/elf2cfetbl
: A tool to convert ELF file data into a cFS-compatible table file format.tools/tblCRCTool
: A utility for calculating CRCs for cFS table files.