# How to Get Started with F Prime: A Complete Beginner's Guide

> Get started with F Prime flight software using NASA's framework. Install fprime-bootstrap, create a project, and run the HelloWorld tutorial. Begin building today.

- Repository: [NASA/fprime](https://github.com/nasa/fprime)
- Tags: getting-started
- Published: 2026-07-13

---

**Install the `fprime-bootstrap` tool, create a new project, activate the virtual environment, and run the HelloWorld tutorial to begin building flight software with NASA's F Prime framework.**

F Prime (pronounced "F-Prime") is a component-driven flight software framework developed by NASA for rapid development of embedded space applications. According to the `nasa/fprime` source code, this modular architecture separates software into reusable **components** connected by **ports** and orchestrated through **topologies**. Understanding how to get started with F Prime requires setting up the Python-based bootstrapping tools, generating your first project skeleton, and learning the CMake-based build workflow.

## Understanding F Prime Core Concepts

Before writing code, you must understand the three fundamental abstractions that define every F Prime application.

### Components

**Components** are the basic building blocks that encapsulate state and behavior. Written in C++ and generated from a high-level model (FPP), components expose typed interfaces for communication. The framework generates component skeletons from `.fpp` files, allowing you to focus on implementation logic rather than boilerplate.

### Ports

**Ports** provide typed interfaces that components use to send or receive data. Declared in the FPP model, ports generate type-safe C++ code that ensures compile-time correctness for inter-component communication. Each port has a specific direction (input or output) and data type defined in the model.

### Topologies

A **topology** is a declarative description of how components wire together via ports. The F Prime autocoder generates the glue code that instantiates components and connects them at runtime based on your topology definitions. This separation of structure from implementation enables easy reconfiguration without code changes.

## Installation and Project Setup

The official installation guide in [`docs/getting-started/installing-fprime.md`](https://github.com/nasa/fprime/blob/main/docs/getting-started/installing-fprime.md) (lines 45-48) outlines the standard procedure for creating a new development environment.

### Install the Bootstrap Tool

Begin by installing the Python package that creates project skeletons:

```bash
pip install fprime-bootstrap

```

This tool manages virtual environment creation and dependency installation automatically.

### Create a New Project

Generate a new project repository using the interactive bootstrap command:

```bash
fprime-bootstrap project

```

The script prompts for a repository name and top-level namespace, with default values shown in the repository README (lines 60-64). Typical responses include a project name like `my-fprime` and namespace `MyFprime`.

### Activate the Virtual Environment

Navigate into your project directory and activate the isolated Python environment:

```bash
cd my-project
. fprime-venv/bin/activate

```

All subsequent F Prime commands—including `fprime-util` and `fprime-gen`—require this activated environment (see [`docs/getting-started/installing-fprime.md`](https://github.com/nasa/fprime/blob/main/docs/getting-started/installing-fprime.md), lines 71-78).

## Building Your First Application

The HelloWorld tutorial provides the recommended first hands-on experience for understanding the F Prime workflow.

### Write Component Definitions

Create component models using the F Prime Prime (FPP) language. For example, a minimal component definition in `MyComponent.fpp` looks like:

```cpp
component MyComponent {
    async input port pingIn: Ping;
    async output port pingOut: Ping;
}

```

### Define the Topology

Connect component instances in a topology file such as `MyTopology.fpp`:

```cpp
topology MyTopology {
    instance comp1: MyComponent base id 0x100;
    instance comp2: MyComponent base id 0x101;
    connections {
        comp1.pingOut -> comp2.pingIn;
        comp2.pingOut -> comp1.pingIn;
    }
}

```

The autocoder processes these `.fpp` files to generate corresponding C++ headers and implementation stubs.

### Build and Execute

The `fprime-util` command serves as a thin wrapper around CMake. From your project root with the virtual environment activated:

```bash
fprime-util build
./Binary/MyComponent

```

The top-level [`CMakeLists.txt`](https://github.com/nasa/fprime/blob/main/CMakeLists.txt) defines the build pipeline, pulls in the autocoder, and sets platform-specific flags. The `fprime-util` implementation resides in `fprime/cmake/fprime-util.cmake`, invoking CMake with framework-specific options for autocode generation and dependency management.

## Exploring the Architecture

Deepen your understanding by reviewing the architecture documentation in [`docs/user-manual/overview/02-fprime-architecture.md`](https://github.com/nasa/fprime/blob/main/docs/user-manual/overview/02-fprime-architecture.md). This file explains how the **Ground Data System (GDS)** provides optional telemetry, command, and visualization capabilities for running F Prime instances.

For implementation details, examine [`docs/user-manual/overview/03-port-comp-top.md`](https://github.com/nasa/fprime/blob/main/docs/user-manual/overview/03-port-comp-top.md), which covers the core constructs of ports, components, and topologies in depth. The design pattern guides under `docs/user-manual/design-patterns/*` provide advanced architectural guidance for production systems.

## Summary

To get started with F Prime, follow these essential steps:

- Install the **fprime-bootstrap** tool via pip to create isolated project environments
- Generate a new project skeleton and activate the **fprime-venv** virtual environment
- Understand the three core concepts: **components**, **ports**, and **topologies**
- Write **FPP model files** that define your component interfaces and system topology
- Use **fprime-util** to drive the CMake build system and generate executable binaries
- Complete the **HelloWorld tutorial** for hands-on experience with the full development cycle

## Frequently Asked Questions

### What is the Ground Data System (GDS) in F Prime?

The **Ground Data System (GDS)** is optional tooling that provides telemetry monitoring, command injection, and visualization capabilities for a running F Prime instance. It communicates with your flight software over a network connection, allowing you to view port traffic and state variables during development and testing without modifying the embedded code.

### Do I need to know CMake to use F Prime?

While F Prime uses **CMake** as its underlying build system, you rarely interact with it directly. The `fprime-util` script (implemented in `fprime/cmake/fprime-util.cmake`) provides a simplified interface that handles autocoder invocation, dependency resolution, and platform-specific flags automatically. However, understanding CMake basics helps when configuring cross-compilation for bare-metal targets.

### Can I run F Prime on platforms other than Linux?

Yes. F Prime supports **multi-platform deployment** ranging from Linux workstations to bare-metal microcontrollers. The architecture abstracts platform-specific details through the CMake build system, allowing the same component models and topologies to compile for different targets by changing toolchain configurations in the build commands.

### What programming languages does F Prime use?

F Prime uses a **model-driven approach** combining multiple languages. You write component interfaces and topologies in **FPP** (F Prime Prime), a domain-specific modeling language. The autocoder generates **C++** implementation skeletons from these models. Build automation and tooling use **Python** (including the `fprime-bootstrap` and `fprime-util` utilities).