2022-09-02 10:00:13 +02:00
|
|
|
FSFW From Zero Workshop
|
|
|
|
=======
|
|
|
|
|
|
|
|
This workshop gives an introduction to the Flight Software Framework,
|
|
|
|
starting from a simple hello world program in C++. As such, it it also suitable
|
2022-09-28 20:08:00 +02:00
|
|
|
for people with basic C++ skills who want to learn how the FSFW works and how to build
|
2022-09-28 20:23:15 +02:00
|
|
|
On-Board Software (OBSW) in general. This workshop does not rely on external hardware
|
|
|
|
and can be done on a host machine (e.g. laptop).
|
2022-09-28 20:08:00 +02:00
|
|
|
|
2022-09-28 21:39:13 +02:00
|
|
|
# Requirements
|
|
|
|
|
2022-10-04 11:42:14 +02:00
|
|
|
I really recommend doing this in an Unix environment. If you do not have
|
2022-09-28 21:41:54 +02:00
|
|
|
or do not want to use a VM, consider using [Ubuntu WSL](https://ubuntu.com/wsl) on Windows.
|
|
|
|
|
2022-09-28 21:39:13 +02:00
|
|
|
1. [`git`](https://git-scm.com/) installed
|
|
|
|
2. [`cmake`](https://cmake.org/) installed as the build system generator
|
|
|
|
3. C++ compiler installed. On Windows, you can use [MinGW64](https://www.msys2.org/) or
|
|
|
|
[clang](https://releases.llvm.org/download.html). On Unix, you can use the pre-installed GCC
|
2022-10-05 10:14:23 +02:00
|
|
|
but you might have to install `g++` or `build-essentials` explicitely.
|
2022-09-28 21:39:13 +02:00
|
|
|
4. Build system for C/C++ installed. For Windows, it is recommended to use [ninja](https://ninja-build.org/).
|
|
|
|
On Unix, you can use the pre-installed `make` tool.
|
|
|
|
|
2022-09-28 20:08:00 +02:00
|
|
|
# Getting started
|
2022-09-28 14:35:09 +02:00
|
|
|
|
|
|
|
Start by cloning this repository and updating the submodules to also clone
|
|
|
|
the [Flight Software Framework](https://egit.irs.uni-stuttgart.de/fsfw):
|
|
|
|
|
|
|
|
```sh
|
|
|
|
git clone https://egit.irs.uni-stuttgart.de/fsfw/fsfw-from-zero.git
|
2022-10-05 09:54:46 +02:00
|
|
|
cd fsfw-from-zero
|
2022-09-28 14:35:09 +02:00
|
|
|
git submodule init
|
|
|
|
git submodule update
|
|
|
|
```
|
|
|
|
|
2022-09-28 20:08:00 +02:00
|
|
|
This workshop uses CMake like the framework to build the application.
|
2022-09-28 20:03:08 +02:00
|
|
|
This command sequence will build the software
|
|
|
|
|
|
|
|
```sh
|
|
|
|
mkdir build
|
|
|
|
cd build && cmake ..
|
|
|
|
cmake --build . -j
|
|
|
|
```
|
|
|
|
|
|
|
|
This will generate the `fsfw-from-zero` executable inside the build folder.
|
|
|
|
It is recommended to use an IDE like VS Code or CLion. Those generally have good
|
|
|
|
CMake support.
|
|
|
|
|
2022-09-28 14:35:09 +02:00
|
|
|
# Overview
|
|
|
|
|
2022-09-28 20:03:08 +02:00
|
|
|
This workshop is organised in chapters which have multiple tasks. For each task, solution source
|
|
|
|
files will be provided but you are encouraged to work to the solution on your own.
|
2022-09-28 14:35:09 +02:00
|
|
|
|
2022-09-28 18:35:15 +02:00
|
|
|
It is recommended to have a basic understanding of C++ basics and object-oriented programming
|
|
|
|
in general before doing this workshop. There are various books and online resources available to
|
|
|
|
learn this.
|
2022-09-28 19:55:16 +02:00
|
|
|
|
2022-10-05 11:03:55 +02:00
|
|
|
All tasks are done in the `main.cpp` of this project and are located in subfolders.
|
2022-10-04 11:42:14 +02:00
|
|
|
In general, it is recommended to start with the `ws-tasks` workshop and then move to the
|
|
|
|
`ws-objects` workshop.
|
|
|
|
|
2022-09-28 20:03:08 +02:00
|
|
|
## Tasks workshop
|
2022-09-28 19:55:16 +02:00
|
|
|
|
2022-09-28 20:03:08 +02:00
|
|
|
This chapter provides an introduction into the thread/tasks abstractions provided by the framework.
|
2022-10-04 11:44:37 +02:00
|
|
|
The chapter descriptions and solutions are located inside
|
|
|
|
[`ws-tasks`](https://egit.irs.uni-stuttgart.de/fsfw/fsfw-from-zero/src/branch/main/ws-tasks).
|
2022-09-28 19:55:16 +02:00
|
|
|
|
2022-10-04 11:42:59 +02:00
|
|
|
## Objects and Object Manager workshop
|
2022-10-04 11:42:14 +02:00
|
|
|
|
|
|
|
This chapter will introduce the object manager and expand the knowledge of the tasks workshop
|
|
|
|
by showing how to conveniently create global addressable objects. The chapter description and
|
2022-10-04 11:45:10 +02:00
|
|
|
solutions are located inside [`ws-objects`](https://egit.irs.uni-stuttgart.de/fsfw/fsfw-from-zero/src/branch/main/ws-objects).
|
2022-10-04 11:42:14 +02:00
|
|
|
|
2022-10-04 12:00:46 +02:00
|
|
|
## WIP: IPC workshop
|
|
|
|
|
|
|
|
Usually, objects have to interact with other objects or software internal entities like
|
|
|
|
threads of OS services in some shape or form. This workshop introduced methods to perform
|
|
|
|
this Inter-Process communication (IPC) in a thread-safe way. The chapter description
|
2022-10-04 12:01:36 +02:00
|
|
|
and solutions are located inside [`ws-ipc`](https://egit.irs.uni-stuttgart.de/fsfw/fsfw-from-zero/src/branch/main/ws-ipc).
|
2022-10-04 12:00:46 +02:00
|
|
|
|
2022-10-04 11:42:14 +02:00
|
|
|
## WIP: TMTC workshop
|
|
|
|
|
|
|
|
Provides an introduction into TMTC handling, as virtually all space systems are remote systems
|
|
|
|
where telemetry and telecommands are the primary data interface available to communicate with the
|
|
|
|
satellite.
|
|
|
|
|
|
|
|
## WIP: Structuring your project and managing third-party dependencies with CMake
|
2022-09-28 20:13:16 +02:00
|
|
|
|
|
|
|
OBSW usually becomes very complex as more and more features and functionality is added.
|
|
|
|
We need to split the software into smaller dedicated modules as this happens to keep complexity
|
|
|
|
in check. This workshop shows how this is done with CMake. Another common
|
|
|
|
task is the integration of third-party libraries. In general, this is a painful process
|
|
|
|
in C/C++ with no built-in package management and an archaic header system. This workshop
|
|
|
|
will attempt to alleviate some of the pain by showing how to integrate a CMake compatible library
|
2022-09-28 20:14:59 +02:00
|
|
|
by example and how to intgerate a library without CMake support.
|
2022-09-28 20:13:16 +02:00
|
|
|
|
2022-09-28 20:03:08 +02:00
|
|
|
|
2022-10-04 11:42:14 +02:00
|
|
|
## WIP: Controller workshop
|
2022-09-28 20:03:08 +02:00
|
|
|
|
|
|
|
This chapter will introduce the `ControllerBase` and `ExtendedControllerBase` class
|
|
|
|
and the various helper interfaces they expose.
|