##// END OF EJS Templates
3.2.0.15...
paul -
r368:9a3997f73422 R3++ draft
parent child
Show More
@@ -1,10 +1,25
1 set(rtems_dir /opt/rtems-4.10/)
2
1 set(CMAKE_SYSTEM_NAME rtems)
3 set(CMAKE_SYSTEM_NAME rtems)
4 set(CMAKE_C_COMPILER ${rtems_dir}/bin/sparc-rtems-gcc)
5 set(CMAKE_CXX_COMPILER ${rtems_dir}/bin/sparc-rtems-g++)
6 set(CMAKE_LINKER ${rtems_dir}/bin/sparc-rtems-g++)
7 SET(CMAKE_EXE_LINKER_FLAGS "-static")
8 option(fix-b2bst "Activate -mfix-b2bst switch to mitigate \"LEON3FT Stale Cache Entry After Store with Data Tag Parity Error\" errata, GRLIB-TN-0009" ON)
2
9
3 set(CMAKE_C_COMPILER /opt/rtems-4.10/bin/sparc-rtems-gcc)
10 if(fix-b2bst)
4 set(CMAKE_CXX_COMPILER /opt/rtems-4.10/bin/sparc-rtems-g++)
11 set(CMAKE_C_FLAGS_RELEASE "-O3 -mfix-b2bst")
5 set(CMAKE_LINKER /opt/rtems-4.10/bin/sparc-rtems-g++)
12 else()
6 SET(CMAKE_EXE_LINKER_FLAGS "-static")
13 set(CMAKE_C_FLAGS_RELEASE "-O3")
7 set(CMAKE_C_FLAGS_RELEASE "-O3 -mfix-b2bst")
14 endif()
8 #set(CMAKE_C_FLAGS_RELEASE "-O3")
15
9 set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_LINKER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
16 set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_LINKER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
10 include_directories("/opt/rtems-4.10/sparc-rtems/leon3/lib/include")
17
18 include_directories("${rtems_dir}/sparc-rtems/leon3/lib/include")
19
20 function (check_b2bst target bin)
21 add_custom_command(TARGET ${target}
22 POST_BUILD
23 COMMAND ${rtems_dir}/bin/sparc-rtems-objdump -d ${bin}/${target} | ${CMAKE_SOURCE_DIR}/sparc/leon3ft-b2bst-scan.tcl
24 )
25 endfunction()
@@ -64,7 +64,7 option(FSW_debug_tch "?" OFF)
64 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)
65 set(SW_VERSION_N2 "2" CACHE STRING "Choose N2 FSW Version." FORCE)
65 set(SW_VERSION_N2 "2" CACHE STRING "Choose N2 FSW Version." FORCE)
66 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)
67 set(SW_VERSION_N4 "14" CACHE STRING "Choose N4 FSW Version." FORCE)
67 set(SW_VERSION_N4 "15" CACHE STRING "Choose N4 FSW Version." FORCE)
68
68
69 if(FSW_verbose)
69 if(FSW_verbose)
70 add_definitions(-DPRINT_MESSAGES_ON_CONSOLE)
70 add_definitions(-DPRINT_MESSAGES_ON_CONSOLE)
@@ -103,5 +103,10 add_definitions(-DSW_VERSION_N3=${SW_VER
103 add_definitions(-DSW_VERSION_N4=${SW_VERSION_N4})
103 add_definitions(-DSW_VERSION_N4=${SW_VERSION_N4})
104
104
105 add_executable(fsw ${SOURCES})
105 add_executable(fsw ${SOURCES})
106
107 if(fix-b2bst)
108 check_b2bst(fsw ${CMAKE_CURRENT_BINARY_DIR})
109 endif()
110
106 add_test_cppcheck(fsw STYLE UNUSED_FUNCTIONS POSSIBLE_ERROR MISSING_INCLUDE)
111 add_test_cppcheck(fsw STYLE UNUSED_FUNCTIONS POSSIBLE_ERROR MISSING_INCLUDE)
107
112
General Comments 0
You need to be logged in to leave comments. Login now