Skip to content
Snippets Groups Projects
Unverified Commit 642d28ea authored by kongr45gpen's avatar kongr45gpen
Browse files

Add an ECSS configuration file that implements platform-specific options

parent c6ad64f1
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,12 @@ add_custom_target(check ...@@ -14,6 +14,12 @@ add_custom_target(check
COMMAND ./cppcheck-misra.sh COMMAND ./cppcheck-misra.sh
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/ci") WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/ci")
# Allow the user to set the ECSS Configuration directory using the -DECSS_CONFIGURATION=... command line argument
set(ECSS_CONFIGURATION "${PROJECT_SOURCE_DIR}/inc/Platform/x86" CACHE PATH
"The include directory for the platform-specific ECSS configuration headers"
)
include_directories(${ECSS_CONFIGURATION})
# Specify the .cpp files common across all targets # Specify the .cpp files common across all targets
add_library(common OBJECT add_library(common OBJECT
src/Service.cpp src/Service.cpp
...@@ -43,8 +49,6 @@ add_executable(ecss_services ...@@ -43,8 +49,6 @@ add_executable(ecss_services
$<TARGET_OBJECTS:common> $<TARGET_OBJECTS:common>
${x86_main_SRC} ${x86_main_SRC}
) )
set_target_properties(ecss_services
PROPERTIES COMPILE_DEFINITIONS LOGLEVEL_TRACE)
IF (EXISTS "${PROJECT_SOURCE_DIR}/lib/Catch2/CMakeLists.txt") IF (EXISTS "${PROJECT_SOURCE_DIR}/lib/Catch2/CMakeLists.txt")
# Gather all the .cpp files corresponding to tests # Gather all the .cpp files corresponding to tests
......
...@@ -13,7 +13,7 @@ cd "$(dirname "$0")" ...@@ -13,7 +13,7 @@ cd "$(dirname "$0")"
GCCVERSION=`g++ -dumpversion` GCCVERSION=`g++ -dumpversion`
clang-tidy `find ../src/ -type f -regextype posix-egrep -regex '.*\.(cpp|hpp|c|h)'` \ clang-tidy `find ../src/ -type f -regextype posix-egrep -regex '.*\.(cpp|hpp|c|h)'` \
-extra-arg=-fcolor-diagnostics -- -std=c++17 -I../inc -I../lib/etl/include \ -extra-arg=-fcolor-diagnostics -- -std=c++17 -I../inc -I../lib/etl/include -I../inc/Platform/x86 \
-I/usr/include/c++/$GCCVERSION -I/usr/include/x86_64-linux-gnu/c++/$GCCVERSION \ -I/usr/include/c++/$GCCVERSION -I/usr/include/x86_64-linux-gnu/c++/$GCCVERSION \
-I/usr/include/c++/$GCCVERSION/$MACHTYPE -I/usr/include/c++/$GCCVERSION/$MACHTYPE
#ifndef ECSS_SERVICES_ECSS_CONFIGURATION_HPP
#define ECSS_SERVICES_ECSS_CONFIGURATION_HPP
/**
* @file
* The configuration file for this ECSS Services platform.
*
* @see GlobalLogLevels Define the minimum level for logged messages
* @see ServiceDefinitions Define the service types that will be compiled
*/
// Log all levels of messages
#define LOGLEVEL_TRACE
/**
* @defgroup ServiceDefinitions Service compilation switches
* These preprocessor defines control whether the compilation of each ECSS service is enabled. By not defining one of
* those, the service will not be compiled, and no RAM or ROM will be spent storing it.
*
* Define these in the `ECSS_Configuration.hpp` file of your platform.
* @{
*/
#define SERVICE_ALL ///< Enables compilation of all the ECSS services
#ifdef SERVICE_ALL
#define SERVICE_EVENTACTION ///< Compile ST[19] event-action
#define SERVICE_EVENTREPORT ///< Compile ST[05] event reporting
#define SERVICE_FUNCTION ///< Compile ST[08] function management
#define SERVICE_LARGEPACKET ///< Compile ST[13] large packet transfer
#define SERVICE_MEMORY ///< Compile ST[06] memory management
#define SERVICE_PARAMETER ///< Compile ST[20] parameter management
#define SERVICE_REQUESTVERIFICATION ///< Compile ST[01] request verification
#define SERVICE_TEST ///< Compile ST[17] test
#define SERVICE_TIME ///< Compile ST[09] time management
#define SERVICE_TIMESCHEDULING ///< Compile ST[11] time-based scheduling
#endif
/** @} */
#endif //ECSS_SERVICES_ECSS_CONFIGURATION_HPP
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment