This demo has been tested for Windows and Linux. It uses
the host abstraction layer of the FSFW.
## General Information
This demo provides the opportunity to to test functionality of the
FSFW on a host computer without the need of setting up external embedded hardware.
## Prerequisites
1. Makefile build: make installed (bundled with MSYS2 on Windows or via [xPacks Windows Build Tools](https://xpack.github.io/windows-build-tools/install/)). Natively installed on Linux.
2. Recommended for application code development: [Eclipse for C/C++](https://www.eclipse.org/downloads/packages/) .
Project files and launch configuration are provided for Eclipse to ease development.
Visual Studio support might follow soon following CMake implementation.
3. CMake Build: Correct CMake installation.
### Windows - MinGW64 build
1. [MSYS2 and MinGW64](https://www.msys2.org/) installed
2. Update MSYS2 by opening it and running
```sh
pacman -Syuuu
```
After that, the gcc toolchain, git, make and CMake should be installed with
The build configuration can also be performed with the shell scripts located inside `cmake/scripts/Host` or the Python helper script `cmake_build_config.py` inside `cmake/scripts`.
The configured build options can now be shown with `cmake -L`.
4. Call the build system (Make)
```
cmake --build . -j
```
5. Like already mentioned, it is recommended to run the binary directly as an executable by
double-clicking it or in the Windows Terminal.
### Setting up Eclipse for CMake projects
The separate [Eclipse README](README-eclipse#top) specifies how to set up Eclipse to build CMake projects.
Separate project files and launch configurations for the MinGW build were provided.
## Building the Software with Makefiles
The Makefile is able to determine the OS and supply additonal required libraries,
but this has only been tested for Windows 10 and Linux (Ubuntu 20.04)
3. Copy the `Makefile-Hosted` file in the `make` folder into the cloned folder root
and rename it to `Makefile`
4. Once all the prerequisites have been met. the binary can be built with the following command.
Replace `debug` with `release` to build the optimized binary.
```sh
make debug -j
```
### Setting up Eclipse for CMake projects
The separate [Eclipse README](README-eclipse#top) specifies how to set up Eclipse to build CMake projects. Separate project files and launch configurations for the MinGW build were provided. The debug output is colored by default. It is recommended to install the
`ANSI Escape in Console` plugin in Eclipse so the coloring works in the Eclipse console.
## Running or Debugging the Software - Makefile
### Linux
The Makefile binary will be generated in the `_bin` folder and can be run in Linux directly from the console.
### Windows
On Windows, it is recommended to run the binary in the command line or as a regular executable (double-click)
to get the full debug outpu because there seem to be issues with the MinGW output.
The Windows Terminal can be opened in Eclipse by right clicking on the `_bin` folder in the project explorer and clicking
Show in Local Terminal
## Setting up Eclipse - Makefile
The separate [Eclipse README](README-eclipse#top) specifies how to set up Eclipse. Separate project files and launch