extended README

This commit is contained in:
Robin Müller 2021-03-23 17:46:39 +01:00
parent 2c40d67dc3
commit 9dbe7021a5
2 changed files with 18 additions and 0 deletions

View File

@ -1,5 +1,8 @@
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.13)
# Can also be changed by upper CMakeLists.txt file
find_library(LIB_FSFW_NAME fsfw REQUIRED)
option(FSFW_HAL_ADD_LINUX "Add the Linux HAL to the sources. Required gpiod library" OFF) option(FSFW_HAL_ADD_LINUX "Add the Linux HAL to the sources. Required gpiod library" OFF)
option(FSFW_HAL_ADD_RASPBERRY_PI "Add Raspberry Pi specific code to the sources" OFF) option(FSFW_HAL_ADD_RASPBERRY_PI "Add Raspberry Pi specific code to the sources" OFF)
@ -15,6 +18,7 @@ if(NOT LIB_FSFW_NAME)
message(ERROR "LIB_FSFW_NAME needs to be set as a linkable target") message(ERROR "LIB_FSFW_NAME needs to be set as a linkable target")
endif() endif()
add_subdirectory(common) add_subdirectory(common)
if(FSFW_HAL_ADD_LINUX) if(FSFW_HAL_ADD_LINUX)

View File

@ -3,3 +3,17 @@ FSFW Hardware Abstraction Layer
This repository contains hardware abstraction components for This repository contains hardware abstraction components for
common hardware like `Raspberry Pi`s or the STM32H743ZIT6 board. common hardware like `Raspberry Pi`s or the STM32H743ZIT6 board.
# Prerequisites
This library needs to be linked against the [Flight Software Framework](https://egit.irs.uni-stuttgart.de/fsfw/fsfw.git). Make sure that the library `fsfw` was added and linked against in your main application.
# Configuring the library with CMake options
There is a set of options available to compile the HAL.
These should be set by the upper level CMakeLists.txt, with
`set(<Option> ON)`.
1. `FSFW_HAL_ADD_LINUX`: Add linux HAL. Required `gpiod` library.
2. `FSFW_HAL_ADD_RASPBERRY_PI`: Add Raspberry Pi specific components.
3. `FSFW_HAL_ADD_STM32H7`: Add STM32H7 specific components.