added spdlog

This commit is contained in:
Robin Müller 2021-05-12 19:16:38 +02:00
parent 804f2f2448
commit f62f5abf89
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
4 changed files with 18 additions and 0 deletions

3
.gitmodules vendored
View File

@ -13,3 +13,6 @@
[submodule "fsfw"] [submodule "fsfw"]
path = fsfw path = fsfw
url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw.git url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw.git
[submodule "spdlog"]
path = spdlog
url = https://github.com/gabime/spdlog.git

View File

@ -55,6 +55,7 @@ set(MISSION_PATH mission)
set(COMMON_PATH common) set(COMMON_PATH common)
set(TEST_PATH test) set(TEST_PATH test)
set(LWIP_PATH lwip) set(LWIP_PATH lwip)
set(SPDLOG_PATH spdlog)
set(LIB_FSFW_HAL_PATH fsfw_hal) set(LIB_FSFW_HAL_PATH fsfw_hal)
# Analyse different OS and architecture/target options, determine BSP_PATH, # Analyse different OS and architecture/target options, determine BSP_PATH,
@ -117,11 +118,15 @@ add_subdirectory(${LIB_FSFW_HAL_PATH})
# Post-Sources preparation # Post-Sources preparation
################################################################################ ################################################################################
# set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} sbdlog)
add_subdirectory(spdlog)
# Add libraries for all sources. # Add libraries for all sources.
target_link_libraries(${TARGET_NAME} PRIVATE target_link_libraries(${TARGET_NAME} PRIVATE
${LIB_FSFW_NAME} ${LIB_FSFW_NAME}
${LIB_OS_NAME} ${LIB_OS_NAME}
${LIB_FSFW_HAL_NAME} ${LIB_FSFW_HAL_NAME}
spdlog
) )
# Add include paths for all sources. # Add include paths for all sources.

1
spdlog Submodule

@ -0,0 +1 @@
Subproject commit 87133ef6b7e36913abfaaddf89af309f5f142650

View File

@ -3,6 +3,12 @@
#include <fsfw/objectmanager/ObjectManagerIF.h> #include <fsfw/objectmanager/ObjectManagerIF.h>
#include <fsfw/serviceinterface/ServiceInterface.h> #include <fsfw/serviceinterface/ServiceInterface.h>
#define TEST_SPDLOG 1
#if TEST_SPDLOG == 1
#include "spdlog/spdlog.h"
#endif
bool TestTask::oneShotAction = true; bool TestTask::oneShotAction = true;
MutexIF* TestTask::testLock = nullptr; MutexIF* TestTask::testLock = nullptr;
@ -45,6 +51,9 @@ ReturnValue_t TestTask::performOperation(uint8_t operationCode) {
ReturnValue_t TestTask::performOneShotAction() { ReturnValue_t TestTask::performOneShotAction() {
/* Everything here will only be performed once. */ /* Everything here will only be performed once. */
#if TEST_SPDLOG == 1
spdlog::info("Welcome to spdlog!");
#endif
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }