@@ -0,0 +1,167 | |||||
|
1 | # - try to find cppcheck tool | |||
|
2 | # | |||
|
3 | # Cache Variables: | |||
|
4 | # CPPCHECK_EXECUTABLE | |||
|
5 | # | |||
|
6 | # Non-cache variables you might use in your CMakeLists.txt: | |||
|
7 | # CPPCHECK_FOUND | |||
|
8 | # CPPCHECK_POSSIBLEERROR_ARG | |||
|
9 | # CPPCHECK_UNUSEDFUNC_ARG | |||
|
10 | # CPPCHECK_STYLE_ARG | |||
|
11 | # CPPCHECK_QUIET_ARG | |||
|
12 | # CPPCHECK_INCLUDEPATH_ARG | |||
|
13 | # CPPCHECK_FAIL_REGULAR_EXPRESSION | |||
|
14 | # CPPCHECK_WARN_REGULAR_EXPRESSION | |||
|
15 | # CPPCHECK_MARK_AS_ADVANCED - whether to mark our vars as advanced even | |||
|
16 | # if we don't find this program. | |||
|
17 | # | |||
|
18 | # Requires these CMake modules: | |||
|
19 | # FindPackageHandleStandardArgs (known included with CMake >=2.6.2) | |||
|
20 | # | |||
|
21 | # Original Author: | |||
|
22 | # 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> | |||
|
23 | # http://academic.cleardefinition.com | |||
|
24 | # Iowa State University HCI Graduate Program/VRAC | |||
|
25 | # | |||
|
26 | # Copyright Iowa State University 2009-2010. | |||
|
27 | # Distributed under the Boost Software License, Version 1.0. | |||
|
28 | # (See accompanying file LICENSE_1_0.txt or copy at | |||
|
29 | # http://www.boost.org/LICENSE_1_0.txt) | |||
|
30 | ||||
|
31 | file(TO_CMAKE_PATH "${CPPCHECK_ROOT_DIR}" CPPCHECK_ROOT_DIR) | |||
|
32 | set(CPPCHECK_ROOT_DIR | |||
|
33 | "${CPPCHECK_ROOT_DIR}" | |||
|
34 | CACHE | |||
|
35 | PATH | |||
|
36 | "Path to search for cppcheck") | |||
|
37 | ||||
|
38 | # cppcheck app bundles on Mac OS X are GUI, we want command line only | |||
|
39 | set(_oldappbundlesetting ${CMAKE_FIND_APPBUNDLE}) | |||
|
40 | set(CMAKE_FIND_APPBUNDLE NEVER) | |||
|
41 | ||||
|
42 | if(CPPCHECK_EXECUTABLE AND NOT EXISTS "${CPPCHECK_EXECUTABLE}") | |||
|
43 | set(CPPCHECK_EXECUTABLE "notfound" CACHE PATH FORCE "") | |||
|
44 | endif() | |||
|
45 | ||||
|
46 | # If we have a custom path, look there first. | |||
|
47 | if(CPPCHECK_ROOT_DIR) | |||
|
48 | find_program(CPPCHECK_EXECUTABLE | |||
|
49 | NAMES | |||
|
50 | cppcheck | |||
|
51 | cli | |||
|
52 | PATHS | |||
|
53 | "${CPPCHECK_ROOT_DIR}" | |||
|
54 | PATH_SUFFIXES | |||
|
55 | cli | |||
|
56 | NO_DEFAULT_PATH) | |||
|
57 | endif() | |||
|
58 | ||||
|
59 | find_program(CPPCHECK_EXECUTABLE NAMES cppcheck) | |||
|
60 | ||||
|
61 | # Restore original setting for appbundle finding | |||
|
62 | set(CMAKE_FIND_APPBUNDLE ${_oldappbundlesetting}) | |||
|
63 | ||||
|
64 | # Find out where our test file is | |||
|
65 | get_filename_component(_cppcheckmoddir ${CMAKE_CURRENT_LIST_FILE} PATH) | |||
|
66 | set(_cppcheckdummyfile "${_cppcheckmoddir}/Findcppcheck.cpp") | |||
|
67 | if(NOT EXISTS "${_cppcheckdummyfile}") | |||
|
68 | message(FATAL_ERROR | |||
|
69 | "Missing file ${_cppcheckdummyfile} - should be alongside Findcppcheck.cmake, can be found at https://github.com/rpavlik/cmake-modules") | |||
|
70 | endif() | |||
|
71 | ||||
|
72 | function(_cppcheck_test_arg _resultvar _arg) | |||
|
73 | if(NOT CPPCHECK_EXECUTABLE) | |||
|
74 | set(${_resultvar} NO) | |||
|
75 | return() | |||
|
76 | endif() | |||
|
77 | execute_process(COMMAND | |||
|
78 | "${CPPCHECK_EXECUTABLE}" | |||
|
79 | "${_arg}" | |||
|
80 | "--quiet" | |||
|
81 | "${_cppcheckdummyfile}" | |||
|
82 | RESULT_VARIABLE | |||
|
83 | _cppcheck_result | |||
|
84 | OUTPUT_QUIET | |||
|
85 | ERROR_QUIET) | |||
|
86 | if("${_cppcheck_result}" EQUAL 0) | |||
|
87 | set(${_resultvar} YES PARENT_SCOPE) | |||
|
88 | else() | |||
|
89 | set(${_resultvar} NO PARENT_SCOPE) | |||
|
90 | endif() | |||
|
91 | endfunction() | |||
|
92 | ||||
|
93 | function(_cppcheck_set_arg_var _argvar _arg) | |||
|
94 | if("${${_argvar}}" STREQUAL "") | |||
|
95 | _cppcheck_test_arg(_cppcheck_arg "${_arg}") | |||
|
96 | if(_cppcheck_arg) | |||
|
97 | set(${_argvar} "${_arg}" PARENT_SCOPE) | |||
|
98 | endif() | |||
|
99 | endif() | |||
|
100 | endfunction() | |||
|
101 | ||||
|
102 | if(CPPCHECK_EXECUTABLE) | |||
|
103 | ||||
|
104 | # Check for the two types of command line arguments by just trying them | |||
|
105 | _cppcheck_set_arg_var(CPPCHECK_STYLE_ARG "--enable=style") | |||
|
106 | _cppcheck_set_arg_var(CPPCHECK_STYLE_ARG "--style") | |||
|
107 | if("${CPPCHECK_STYLE_ARG}" STREQUAL "--enable=style") | |||
|
108 | ||||
|
109 | _cppcheck_set_arg_var(CPPCHECK_UNUSEDFUNC_ARG | |||
|
110 | "--enable=unusedFunction") | |||
|
111 | _cppcheck_set_arg_var(CPPCHECK_INFORMATION_ARG "--enable=information") | |||
|
112 | _cppcheck_set_arg_var(CPPCHECK_MISSINGINCLUDE_ARG | |||
|
113 | "--enable=missingInclude") | |||
|
114 | _cppcheck_set_arg_var(CPPCHECK_POSIX_ARG "--enable=posix") | |||
|
115 | _cppcheck_set_arg_var(CPPCHECK_POSSIBLEERROR_ARG | |||
|
116 | "--enable=possibleError") | |||
|
117 | _cppcheck_set_arg_var(CPPCHECK_POSSIBLEERROR_ARG "--enable=all") | |||
|
118 | ||||
|
119 | if(MSVC) | |||
|
120 | set(CPPCHECK_TEMPLATE_ARG --template vs) | |||
|
121 | set(CPPCHECK_FAIL_REGULAR_EXPRESSION "[(]error[)]") | |||
|
122 | set(CPPCHECK_WARN_REGULAR_EXPRESSION "[(]style[)]") | |||
|
123 | elseif(CMAKE_COMPILER_IS_GNUCXX) | |||
|
124 | set(CPPCHECK_TEMPLATE_ARG --template gcc) | |||
|
125 | set(CPPCHECK_FAIL_REGULAR_EXPRESSION " error: ") | |||
|
126 | set(CPPCHECK_WARN_REGULAR_EXPRESSION " style: ") | |||
|
127 | else() | |||
|
128 | set(CPPCHECK_TEMPLATE_ARG --template gcc) | |||
|
129 | set(CPPCHECK_FAIL_REGULAR_EXPRESSION " error: ") | |||
|
130 | set(CPPCHECK_WARN_REGULAR_EXPRESSION " style: ") | |||
|
131 | endif() | |||
|
132 | elseif("${CPPCHECK_STYLE_ARG}" STREQUAL "--style") | |||
|
133 | # Old arguments | |||
|
134 | _cppcheck_set_arg_var(CPPCHECK_UNUSEDFUNC_ARG "--unused-functions") | |||
|
135 | _cppcheck_set_arg_var(CPPCHECK_POSSIBLEERROR_ARG "--all") | |||
|
136 | set(CPPCHECK_FAIL_REGULAR_EXPRESSION "error:") | |||
|
137 | set(CPPCHECK_WARN_REGULAR_EXPRESSION "[(]style[)]") | |||
|
138 | else() | |||
|
139 | # No idea - some other issue must be getting in the way | |||
|
140 | message(STATUS | |||
|
141 | "WARNING: Can't detect whether CPPCHECK wants new or old-style arguments!") | |||
|
142 | endif() | |||
|
143 | ||||
|
144 | set(CPPCHECK_QUIET_ARG "--quiet") | |||
|
145 | set(CPPCHECK_INCLUDEPATH_ARG "-I") | |||
|
146 | ||||
|
147 | endif() | |||
|
148 | ||||
|
149 | set(CPPCHECK_ALL | |||
|
150 | "${CPPCHECK_EXECUTABLE} ${CPPCHECK_POSSIBLEERROR_ARG} ${CPPCHECK_UNUSEDFUNC_ARG} ${CPPCHECK_STYLE_ARG} ${CPPCHECK_QUIET_ARG} ${CPPCHECK_INCLUDEPATH_ARG} some/include/path") | |||
|
151 | ||||
|
152 | include(FindPackageHandleStandardArgs) | |||
|
153 | find_package_handle_standard_args(cppcheck | |||
|
154 | DEFAULT_MSG | |||
|
155 | CPPCHECK_ALL | |||
|
156 | CPPCHECK_EXECUTABLE | |||
|
157 | CPPCHECK_POSSIBLEERROR_ARG | |||
|
158 | CPPCHECK_UNUSEDFUNC_ARG | |||
|
159 | CPPCHECK_STYLE_ARG | |||
|
160 | CPPCHECK_INCLUDEPATH_ARG | |||
|
161 | CPPCHECK_QUIET_ARG) | |||
|
162 | ||||
|
163 | if(CPPCHECK_FOUND OR CPPCHECK_MARK_AS_ADVANCED) | |||
|
164 | mark_as_advanced(CPPCHECK_ROOT_DIR) | |||
|
165 | endif() | |||
|
166 | ||||
|
167 | mark_as_advanced(CPPCHECK_EXECUTABLE) |
@@ -0,0 +1,16 | |||||
|
1 | /** | |||
|
2 | * \file Findcppcheck.cpp | |||
|
3 | * \brief Dummy C++ source file used by CMake module Findcppcheck.cmake | |||
|
4 | * | |||
|
5 | * \author | |||
|
6 | * Ryan Pavlik, 2009-2010 | |||
|
7 | * <rpavlik@iastate.edu> | |||
|
8 | * http://academic.cleardefinition.com/ | |||
|
9 | * | |||
|
10 | */ | |||
|
11 | ||||
|
12 | ||||
|
13 | ||||
|
14 | int main(int argc, char* argv[]) { | |||
|
15 | return 0; | |||
|
16 | } |
@@ -0,0 +1,116 | |||||
|
1 | # - Run cppcheck on c++ source files as a custom target and a test | |||
|
2 | # | |||
|
3 | # add_test_cppcheck(<target-name> [UNUSED_FUNCTIONS] [STYLE] [POSSIBLE_ERROR] [FAIL_ON_WARNINGS]) - | |||
|
4 | # Create a target to check a target's sources with cppcheck and the indicated options | |||
|
5 | # | |||
|
6 | # Requires these CMake modules: | |||
|
7 | # Findcppcheck | |||
|
8 | # | |||
|
9 | # Requires CMake 2.8 or newer | |||
|
10 | # | |||
|
11 | # Original Author: | |||
|
12 | # 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> | |||
|
13 | # http://academic.cleardefinition.com | |||
|
14 | # Iowa State University HCI Graduate Program/VRAC | |||
|
15 | # | |||
|
16 | # Copyright Iowa State University 2009-2010. | |||
|
17 | # Distributed under the Boost Software License, Version 1.0. | |||
|
18 | # (See accompanying file LICENSE_1_0.txt or copy at | |||
|
19 | # http://www.boost.org/LICENSE_1_0.txt) | |||
|
20 | ||||
|
21 | IF(__add_cppcheck) | |||
|
22 | RETURN() | |||
|
23 | ENDIF() | |||
|
24 | SET(__add_cppcheck YES) | |||
|
25 | ||||
|
26 | FIND_PACKAGE(cppcheck) | |||
|
27 | ||||
|
28 | ||||
|
29 | ||||
|
30 | IF(NOT TARGET all_cppcheck) | |||
|
31 | ADD_CUSTOM_TARGET(all_cppcheck) | |||
|
32 | ENDIF() | |||
|
33 | ||||
|
34 | FUNCTION(add_test_cppcheck _target_name) | |||
|
35 | IF(NOT TARGET ${_target_name}) | |||
|
36 | MESSAGE(FATAL_ERROR "add_test_cppcheck given a target name that does not exist: '${_target_name}' !") | |||
|
37 | ENDIF() | |||
|
38 | ||||
|
39 | ||||
|
40 | SET(cppcheck_args) | |||
|
41 | ||||
|
42 | LIST(FIND ARGN UNUSED_FUNCTIONS index) | |||
|
43 | IF("${index}" GREATER "-1") | |||
|
44 | LIST(APPEND cppcheck_args ${CPPCHECK_UNUSEDFUNC_ARG}) | |||
|
45 | ENDIF() | |||
|
46 | ||||
|
47 | LIST(FIND ARGN STYLE index) | |||
|
48 | IF("${index}" GREATER "-1") | |||
|
49 | LIST(APPEND cppcheck_args ${CPPCHECK_STYLE_ARG}) | |||
|
50 | ENDIF() | |||
|
51 | ||||
|
52 | LIST(FIND ARGN POSSIBLE_ERROR index) | |||
|
53 | IF("${index}" GREATER "-1") | |||
|
54 | LIST(APPEND cppcheck_args ${CPPCHECK_POSSIBLEERROR_ARG}) | |||
|
55 | ENDIF() | |||
|
56 | ||||
|
57 | LIST(FIND ARGN MISSING_INCLUDE index) | |||
|
58 | IF("${index}" GREATER "-1") | |||
|
59 | LIST(APPEND cppcheck_args ${CPPCHECK_MISSINGINCLUDE_ARG}) | |||
|
60 | ENDIF() | |||
|
61 | ||||
|
62 | LIST(FIND _input FAIL_ON_WARNINGS index) | |||
|
63 | IF("${index}" GREATER "-1") | |||
|
64 | LIST(APPEND CPPCHECK_FAIL_REGULAR_EXPRESSION ${CPPCHECK_WARN_REGULAR_EXPRESSION}) | |||
|
65 | LIST(REMOVE_AT _input ${_unused_func}) | |||
|
66 | ENDIF() | |||
|
67 | ||||
|
68 | GET_TARGET_PROPERTY(target_sources "${_target_name}" SOURCES) | |||
|
69 | SET(cppcheck_sources) | |||
|
70 | FOREACH(source ${target_sources}) | |||
|
71 | GET_SOURCE_FILE_PROPERTY(path "${source}" LOCATION) | |||
|
72 | GET_SOURCE_FILE_PROPERTY(lang "${source}" LANGUAGE) | |||
|
73 | IF("${lang}" MATCHES "CXX") | |||
|
74 | LIST(APPEND cppcheck_sources "${path}") | |||
|
75 | ENDIF() | |||
|
76 | IF("${lang}" MATCHES "C") | |||
|
77 | LIST(APPEND cppcheck_sources "${path}") | |||
|
78 | ENDIF() | |||
|
79 | ENDFOREACH() | |||
|
80 | ||||
|
81 | GET_TARGET_PROPERTY(target_definitions "${_target_name}" SOURCES) | |||
|
82 | GET_TARGET_PROPERTY(target_source_location "${_target_name}" SOURCES) | |||
|
83 | ||||
|
84 | SET(test_target_name "${_target_name}_cppcheck_test") | |||
|
85 | ||||
|
86 | GET_TARGET_PROPERTY(include_folders "${_target_name}" INCLUDE_DIRECTORIES) | |||
|
87 | ||||
|
88 | SET(include_args) | |||
|
89 | FOREACH(folder ${include_folders}) | |||
|
90 | LIST(APPEND include_args "-I${folder}") | |||
|
91 | ENDFOREACH() | |||
|
92 | ||||
|
93 | ADD_TEST(NAME "${test_target_name}" | |||
|
94 | COMMAND "${CPPCHECK_EXECUTABLE}" | |||
|
95 | ${CPPCHECK_TEMPLATE_ARG} | |||
|
96 | ${cppcheck_args} | |||
|
97 | ${include_args} | |||
|
98 | ${cppcheck_sources}) | |||
|
99 | ||||
|
100 | SET_TESTS_PROPERTIES("${test_target_name}" | |||
|
101 | PROPERTIES | |||
|
102 | FAIL_REGULAR_EXPRESSION "${CPPCHECK_FAIL_REGULAR_EXPRESSION}") | |||
|
103 | ||||
|
104 | ADD_CUSTOM_COMMAND(TARGET all_cppcheck | |||
|
105 | PRE_BUILD | |||
|
106 | COMMAND "${CPPCHECK_EXECUTABLE}" | |||
|
107 | ${CPPCHECK_QUIET_ARG} | |||
|
108 | ${CPPCHECK_TEMPLATE_ARG} | |||
|
109 | ${cppcheck_args} | |||
|
110 | ${include_args} | |||
|
111 | ${cppcheck_sources} | |||
|
112 | WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" | |||
|
113 | COMMENT "${test_target_name}: Running cppcheck on target ${_target_name}..." | |||
|
114 | VERBATIM) | |||
|
115 | ||||
|
116 | ENDFUNCTION() |
@@ -1,14 +1,14 | |||||
1 | cmake_minimum_required (VERSION 2.6) |
|
1 | cmake_minimum_required (VERSION 2.6) | |
2 | project (LFR_FSW) |
|
2 | project (LFR_FSW) | |
3 |
|
3 | |||
4 | if(NOT CMAKE_BUILD_TYPE) |
|
4 | if(NOT CMAKE_BUILD_TYPE) | |
5 | set(CMAKE_BUILD_TYPE "Release" CACHE STRING |
|
5 | set(CMAKE_BUILD_TYPE "Release" CACHE STRING | |
6 | "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE) |
|
6 | "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE) | |
7 | endif(NOT CMAKE_BUILD_TYPE) |
|
7 | endif(NOT CMAKE_BUILD_TYPE) | |
8 |
|
8 | |||
9 | set(LFR_BP_SRC ${CMAKE_CURRENT_SOURCE_DIR}/LFR_basic-parameters/basic_parameters.c) |
|
9 | set(LFR_BP_SRC ${CMAKE_CURRENT_SOURCE_DIR}/LFR_basic-parameters/basic_parameters.c) | |
10 |
|
10 | |||
11 |
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_ |
|
11 | SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/sparc") | |
12 |
|
12 | |||
13 | add_subdirectory(src) |
|
13 | add_subdirectory(src) | |
14 | #add_subdirectory(timegen) |
|
14 | #add_subdirectory(timegen) |
@@ -1,105 +1,106 | |||||
1 | cmake_minimum_required (VERSION 2.6) |
|
1 | cmake_minimum_required (VERSION 2.6) | |
2 | project (fsw) |
|
2 | project (fsw) | |
3 |
|
3 | |||
4 | include(sparc-rtems) |
|
4 | include(sparc-rtems) | |
|
5 | include(cppcheck) | |||
5 |
|
6 | |||
6 | include_directories("../header" |
|
7 | include_directories("../header" | |
7 | "../header/lfr_common_headers" |
|
8 | "../header/lfr_common_headers" | |
8 | "../header/processing" |
|
9 | "../header/processing" | |
9 | "../LFR_basic-parameters" |
|
10 | "../LFR_basic-parameters" | |
10 | "../src") |
|
11 | "../src") | |
11 |
|
12 | |||
12 | set(SOURCES wf_handler.c |
|
13 | set(SOURCES wf_handler.c | |
13 | tc_handler.c |
|
14 | tc_handler.c | |
14 | fsw_misc.c |
|
15 | fsw_misc.c | |
15 | fsw_init.c |
|
16 | fsw_init.c | |
16 | fsw_globals.c |
|
17 | fsw_globals.c | |
17 | fsw_spacewire.c |
|
18 | fsw_spacewire.c | |
18 | tc_load_dump_parameters.c |
|
19 | tc_load_dump_parameters.c | |
19 | tm_lfr_tc_exe.c |
|
20 | tm_lfr_tc_exe.c | |
20 | tc_acceptance.c |
|
21 | tc_acceptance.c | |
21 | processing/fsw_processing.c |
|
22 | processing/fsw_processing.c | |
22 | processing/avf0_prc0.c |
|
23 | processing/avf0_prc0.c | |
23 | processing/avf1_prc1.c |
|
24 | processing/avf1_prc1.c | |
24 | processing/avf2_prc2.c |
|
25 | processing/avf2_prc2.c | |
25 | lfr_cpu_usage_report.c |
|
26 | lfr_cpu_usage_report.c | |
26 | ${LFR_BP_SRC} |
|
27 | ${LFR_BP_SRC} | |
27 | ../header/wf_handler.h |
|
28 | ../header/wf_handler.h | |
28 | ../header/tc_handler.h |
|
29 | ../header/tc_handler.h | |
29 | ../header/grlib_regs.h |
|
30 | ../header/grlib_regs.h | |
30 | ../header/fsw_misc.h |
|
31 | ../header/fsw_misc.h | |
31 | ../header/fsw_init.h |
|
32 | ../header/fsw_init.h | |
32 | ../header/fsw_spacewire.h |
|
33 | ../header/fsw_spacewire.h | |
33 | ../header/tc_load_dump_parameters.h |
|
34 | ../header/tc_load_dump_parameters.h | |
34 | ../header/tm_lfr_tc_exe.h |
|
35 | ../header/tm_lfr_tc_exe.h | |
35 | ../header/tc_acceptance.h |
|
36 | ../header/tc_acceptance.h | |
36 | ../header/processing/fsw_processing.h |
|
37 | ../header/processing/fsw_processing.h | |
37 | ../header/processing/avf0_prc0.h |
|
38 | ../header/processing/avf0_prc0.h | |
38 | ../header/processing/avf1_prc1.h |
|
39 | ../header/processing/avf1_prc1.h | |
39 | ../header/processing/avf2_prc2.h |
|
40 | ../header/processing/avf2_prc2.h | |
40 | ../header/fsw_params_wf_handler.h |
|
41 | ../header/fsw_params_wf_handler.h | |
41 | ../header/lfr_cpu_usage_report.h |
|
42 | ../header/lfr_cpu_usage_report.h | |
42 | ../header/lfr_common_headers/ccsds_types.h |
|
43 | ../header/lfr_common_headers/ccsds_types.h | |
43 | ../header/lfr_common_headers/fsw_params.h |
|
44 | ../header/lfr_common_headers/fsw_params.h | |
44 | ../header/lfr_common_headers/fsw_params_nb_bytes.h |
|
45 | ../header/lfr_common_headers/fsw_params_nb_bytes.h | |
45 | ../header/lfr_common_headers/fsw_params_processing.h |
|
46 | ../header/lfr_common_headers/fsw_params_processing.h | |
46 | ../header/lfr_common_headers/tm_byte_positions.h |
|
47 | ../header/lfr_common_headers/tm_byte_positions.h | |
47 | ../LFR_basic-parameters/basic_parameters.h |
|
48 | ../LFR_basic-parameters/basic_parameters.h | |
48 | ../LFR_basic-parameters/basic_parameters_params.h |
|
49 | ../LFR_basic-parameters/basic_parameters_params.h | |
49 | ../header/GscMemoryLPP.hpp |
|
50 | ../header/GscMemoryLPP.hpp | |
50 | ) |
|
51 | ) | |
51 |
|
52 | |||
52 |
|
53 | |||
53 | option(FSW_verbose "Enable verbose LFR" ON) |
|
54 | option(FSW_verbose "Enable verbose LFR" ON) | |
54 | option(FSW_boot_messages "Enable LFR boot messages" ON) |
|
55 | option(FSW_boot_messages "Enable LFR boot messages" ON) | |
55 | option(FSW_debug_messages "Enable LFR debug messages" ON) |
|
56 | option(FSW_debug_messages "Enable LFR debug messages" ON) | |
56 | option(FSW_cpu_usage_report "Enable LFR cpu usage report" OFF) |
|
57 | option(FSW_cpu_usage_report "Enable LFR cpu usage report" OFF) | |
57 | option(FSW_stack_report "Enable LFR stack report" OFF) |
|
58 | option(FSW_stack_report "Enable LFR stack report" OFF) | |
58 | option(FSW_vhdl_dev "?" OFF) |
|
59 | option(FSW_vhdl_dev "?" OFF) | |
59 | option(FSW_lpp_dpu_destid "Set to debug at LPP" ON) |
|
60 | option(FSW_lpp_dpu_destid "Set to debug at LPP" ON) | |
60 | option(FSW_debug_watchdog "Enable debug watchdog" OFF) |
|
61 | option(FSW_debug_watchdog "Enable debug watchdog" OFF) | |
61 | option(FSW_debug_tch "?" OFF) |
|
62 | option(FSW_debug_tch "?" OFF) | |
62 |
|
63 | |||
63 | set(SW_VERSION_N1 "3" CACHE STRING "Choose N1 FSW Version." FORCE) |
|
64 | set(SW_VERSION_N1 "3" CACHE STRING "Choose N1 FSW Version." FORCE) | |
64 | set(SW_VERSION_N2 "1" CACHE STRING "Choose N2 FSW Version." FORCE) |
|
65 | set(SW_VERSION_N2 "1" CACHE STRING "Choose N2 FSW Version." FORCE) | |
65 | set(SW_VERSION_N3 "0" CACHE STRING "Choose N3 FSW Version." FORCE) |
|
66 | set(SW_VERSION_N3 "0" CACHE STRING "Choose N3 FSW Version." FORCE) | |
66 | set(SW_VERSION_N4 "4" CACHE STRING "Choose N4 FSW Version." FORCE) |
|
67 | set(SW_VERSION_N4 "4" CACHE STRING "Choose N4 FSW Version." FORCE) | |
67 |
|
68 | |||
68 |
|
69 | |||
69 | if(FSW_verbose) |
|
70 | if(FSW_verbose) | |
70 | add_definitions(-DPRINT_MESSAGES_ON_CONSOLE) |
|
71 | add_definitions(-DPRINT_MESSAGES_ON_CONSOLE) | |
71 | endif() |
|
72 | endif() | |
72 | if(FSW_boot_messages) |
|
73 | if(FSW_boot_messages) | |
73 | add_definitions(-DBOOT_MESSAGES) |
|
74 | add_definitions(-DBOOT_MESSAGES) | |
74 | endif() |
|
75 | endif() | |
75 | if(FSW_debug_messages) |
|
76 | if(FSW_debug_messages) | |
76 | add_definitions(-DDEBUG_MESSAGES) |
|
77 | add_definitions(-DDEBUG_MESSAGES) | |
77 | endif() |
|
78 | endif() | |
78 | if(FSW_cpu_usage_report) |
|
79 | if(FSW_cpu_usage_report) | |
79 | add_definitions(-DPRINT_TASK_STATISTICS) |
|
80 | add_definitions(-DPRINT_TASK_STATISTICS) | |
80 | endif() |
|
81 | endif() | |
81 | if(FSW_stack_report) |
|
82 | if(FSW_stack_report) | |
82 | add_definitions(-DPRINT_STACK_REPORT) |
|
83 | add_definitions(-DPRINT_STACK_REPORT) | |
83 | endif() |
|
84 | endif() | |
84 | if(FSW_vhdl_dev) |
|
85 | if(FSW_vhdl_dev) | |
85 | add_definitions(-DVHDL_DEV) |
|
86 | add_definitions(-DVHDL_DEV) | |
86 | endif() |
|
87 | endif() | |
87 | if(FSW_lpp_dpu_destid) |
|
88 | if(FSW_lpp_dpu_destid) | |
88 | add_definitions(-DLPP_DPU_DESTID) |
|
89 | add_definitions(-DLPP_DPU_DESTID) | |
89 | endif() |
|
90 | endif() | |
90 | if(FSW_debug_watchdog) |
|
91 | if(FSW_debug_watchdog) | |
91 | add_definitions(-DDEBUG_WATCHDOG) |
|
92 | add_definitions(-DDEBUG_WATCHDOG) | |
92 | endif() |
|
93 | endif() | |
93 | if(FSW_debug_tch) |
|
94 | if(FSW_debug_tch) | |
94 | add_definitions(-DDEBUG_TCH) |
|
95 | add_definitions(-DDEBUG_TCH) | |
95 | endif() |
|
96 | endif() | |
96 |
|
97 | |||
97 | add_definitions(-DMSB_FIRST_TCH) |
|
98 | add_definitions(-DMSB_FIRST_TCH) | |
98 |
|
99 | |||
99 | add_definitions(-DSWVERSION=-1-0) |
|
100 | add_definitions(-DSWVERSION=-1-0) | |
100 | add_definitions(-DSW_VERSION_N1=${SW_VERSION_N1}) |
|
101 | add_definitions(-DSW_VERSION_N1=${SW_VERSION_N1}) | |
101 | add_definitions(-DSW_VERSION_N2=${SW_VERSION_N2}) |
|
102 | add_definitions(-DSW_VERSION_N2=${SW_VERSION_N2}) | |
102 | add_definitions(-DSW_VERSION_N3=${SW_VERSION_N3}) |
|
103 | add_definitions(-DSW_VERSION_N3=${SW_VERSION_N3}) | |
103 | add_definitions(-DSW_VERSION_N4=${SW_VERSION_N4}) |
|
104 | add_definitions(-DSW_VERSION_N4=${SW_VERSION_N4}) | |
104 |
|
105 | |||
105 |
add_executable( |
|
106 | add_executable(FSW ${SOURCES}) |
General Comments 0
You need to be logged in to leave comments.
Login now