Skip to content

Commit c6eac8c

Browse files
committed
NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
Batch update of latest cFS software release Reflects commit 9b33182e234d5f3f5365236713636691cc1a8c2d from NASA internal development repo
1 parent 42a000a commit c6eac8c

416 files changed

Lines changed: 11852 additions & 741 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitignore‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Ignore macOS generated files types
2+
.DS_Store
3+
.DS_Store?
4+
._*
5+
.Spotlight-V100
6+
.Trashes
7+
ehthumbs.db
8+
Thumbs.db
9+
.fuse_hidden*

‎CMakeLists.txt‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,34 @@ endif()
1313
set(CFE_PSP_TARGETNAME "${CFE_SYSTEM_PSPNAME}")
1414
add_definitions(-D_CFE_PSP_) # macro to indicate PSP scope
1515

16+
# Read the default compile-time configuration, and update with
17+
# any mission/project specific options in the PSP_CONFIGURATION_FILE
18+
include("${CFEPSP_SOURCE_DIR}/default_config.cmake")
19+
20+
# The user-specified file is optional, but in case the value is defined but the
21+
# file does not exist, this should be treated as an error.
22+
foreach(CONFIG ${PSP_CONFIGURATION_FILE})
23+
include(${CONFIG})
24+
endforeach(CONFIG PSP_CONFIGURATION_FILE)
25+
26+
# Use the supplied configuration to generate the pspconfig.h file
27+
# which can be referenced by the code. This will be stored in the top level
28+
# "inc" directory of the binary output directory
29+
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/inc")
30+
configure_file(
31+
"${CFEPSP_SOURCE_DIR}/pspconfig.h.in"
32+
"${CMAKE_CURRENT_BINARY_DIR}/pspconfig.gen"
33+
@ONLY
34+
)
35+
36+
# Only copy the pspconfig.h into place if different from the existing file
37+
# This avoids unnecessarily rebuilding all code in case cmake was re-run
38+
# and but generated the same file.
39+
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
40+
"${CMAKE_CURRENT_BINARY_DIR}/pspconfig.gen"
41+
"${CMAKE_CURRENT_BINARY_DIR}/inc/pspconfig.h"
42+
)
43+
1644
# The "psp_module_api" defines the interface between internal PSP components
1745
add_library(psp_module_api INTERFACE)
1846
target_compile_definitions(psp_module_api INTERFACE
@@ -23,9 +51,17 @@ target_include_directories(psp_module_api INTERFACE
2351
fsw/shared/inc # all PSP shared headers
2452
fsw/${CFE_PSP_TARGETNAME}/inc # all impl headers
2553
${CFE_SOURCE_DIR}/cmake/target/inc # for sysconfig
54+
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/inc> # for pspconfig.h
2655
$<TARGET_PROPERTY:osal,INTERFACE_INCLUDE_DIRECTORIES> # use headers from OSAL
2756
)
2857

58+
# Include definition of cfe_psp_backtrace.h referenced by cfe_psp_config.h for QNX PSP
59+
if (QNX_SDP_VERSION EQUAL 800)
60+
target_include_directories(psp_module_api INTERFACE $<TARGET_PROPERTY:backtrace_libunwind,INTERFACE_INCLUDE_DIRECTORIES>)
61+
elseif (QNX_SDP_VERSION EQUAL 710)
62+
target_include_directories(psp_module_api INTERFACE $<TARGET_PROPERTY:backtrace_qnx,INTERFACE_INCLUDE_DIRECTORIES>)
63+
endif()
64+
2965
# Translate the CFE_PSP_TARGETNAME to a set of additional modules to build
3066
file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/fsw/${CFE_PSP_TARGETNAME}/psp_module_list.cmake" PSP_TARGET_MODULE_LIST REGEX "^[a-zA-Z]")
3167
include("${CMAKE_CURRENT_LIST_DIR}/fsw/${CFE_PSP_TARGETNAME}/psp_conditional_modules.cmake" OPTIONAL)
@@ -66,6 +102,7 @@ target_link_libraries(psp-${CFE_PSP_TARGETNAME} PRIVATE
66102

67103
target_include_directories(psp-${CFE_PSP_TARGETNAME} INTERFACE
68104
fsw/inc
105+
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/inc> # for pspconfig.h
69106
)
70107

71108

‎cmake/Modules/Platform/VxWorks-CFE.cmake‎

Lines changed: 43 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,66 @@
33
#
44
# The cmake distribution by default may contain a module for VxWorks,
55
# but different link rules are needed in order to build loadable CFE apps.
6+
#
7+
# This supports VxWorks Downloadable Kernel Module (DKM) and
8+
# VxWorks Real Time Process (RTP) builds.
9+
#
10+
# For RTP builds, use set(VXWORKS_RTP TRUE), otherwise
11+
# this file will default to the DKM rules
612
# -----------------------------------------------------------------
7-
8-
# Note - this is not building "shared libs" in the traditional sense,
9-
# This property is set true which allows one to use the CMake shared library logic
10-
# But the code is otherwise built as static -- no PIC flags
1113
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
12-
set(CMAKE_EXECUTABLE_SUFFIX ".exe")
13-
set(CMAKE_SHARED_LIBRARY_SUFFIX ".o")
14-
set(CMAKE_SHARED_MODULE_SUFFIX ".o")
1514

16-
# Setting all these to empty string defeats the default behavior
17-
# of adding an -fPIC option to shared library/module code.
18-
set(CMAKE_DL_LIBS "")
19-
set(CMAKE_C_COMPILE_OPTIONS_PIC "")
20-
set(CMAKE_CXX_COMPILE_OPTIONS_PIC "")
15+
if(VXWORKS_RTP)
16+
# RTP Specific rules
17+
set(CMAKE_EXECUTABLE_SUFFIX ".vxe")
18+
set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
19+
set(CMAKE_SHARED_MODULE_SUFFIX ".so")
20+
21+
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
22+
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
23+
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
24+
set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
25+
set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
26+
27+
set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
28+
set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
29+
set(CMAKE_SHARED_MODULE_C_FLAGS "-fPIC")
30+
set(CMAKE_SHARED_MODULE_CXX_FLAGS "")
2131

22-
set(CMAKE_SHARED_LIBRARY_C_FLAGS "")
23-
set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
24-
set(CMAKE_SHARED_MODULE_C_FLAGS "")
25-
set(CMAKE_SHARED_MODULE_CXX_FLAGS "")
32+
set(CMAKE_SHARED_OBJECT_LINKER_FLAGS -shared)
33+
set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <LINK_FLAGS> -o <TARGET> -rdynamic <OBJECTS> <LINK_LIBRARIES>")
34+
else()
35+
# DKM Specific rules
36+
set(CMAKE_EXECUTABLE_SUFFIX ".exe")
37+
set(CMAKE_SHARED_LIBRARY_SUFFIX ".o")
38+
set(CMAKE_SHARED_MODULE_SUFFIX ".o")
2639

40+
# Setting all these to empty string defeats the default behavior
41+
# of adding an -fPIC option to shared library/module code.
42+
set(CMAKE_DL_LIBS "")
43+
set(CMAKE_C_COMPILE_OPTIONS_PIC "")
44+
set(CMAKE_CXX_COMPILE_OPTIONS_PIC "")
45+
46+
set(CMAKE_SHARED_LIBRARY_C_FLAGS "")
47+
set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
48+
set(CMAKE_SHARED_MODULE_C_FLAGS "")
49+
set(CMAKE_SHARED_MODULE_CXX_FLAGS "")
50+
51+
set(CMAKE_SHARED_OBJECT_LINKER_FLAGS -r)
52+
set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_LINKER> <LINK_FLAGS> -o <TARGET> ${CMAKE_SHARED_OBJECT_LINKER_FLAGS} <OBJECTS> <LINK_LIBRARIES>")
53+
endif()
2754

2855
# This creates a simple relocatable object file, not a shared library
29-
set(CMAKE_SHARED_OBJECT_LINKER_FLAGS -r)
3056
set(CMAKE_C_CREATE_SHARED_MODULE "<CMAKE_LINKER> <LINK_FLAGS> -o <TARGET> ${CMAKE_SHARED_OBJECT_LINKER_FLAGS} <OBJECTS> <LINK_LIBRARIES>")
3157
set(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_MODULE})
3258
set(CMAKE_C_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_MODULE})
3359
set(CMAKE_CXX_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_MODULE})
34-
set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_LINKER> <LINK_FLAGS> -o <TARGET> ${CMAKE_SHARED_OBJECT_LINKER_FLAGS} <OBJECTS> <LINK_LIBRARIES>")
3560

3661
set(VXWORKS_TARGET_PATH "${WIND_HOME}/vxworks-${CMAKE_SYSTEM_VERSION}/target")
3762

3863
set(CMAKE_FIND_ROOT_PATH "${VXWORKS_TARGET_PATH}")
39-
4064
set(CMAKE_SYSTEM_PREFIX_PATH "${VXWORKS_TARGET_PATH}")
4165
set(CMAKE_SYSTEM_INCLUDE_PATH "${VXWORKS_TARGET_PATH}/h")
4266

4367
set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES ${CMAKE_SYSTEM_INCLUDE_PATH})
4468
set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES ${CMAKE_SYSTEM_INCLUDE_PATH})
45-
#set(CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${VXWORKS_TARGET_PATH}/lib")
46-
#set(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES})
47-
48-
#set(CMAKE_C_FLAGS_INIT "${VXWORKS_BSP_C_FLAGS}")
49-
#set(CMAKE_CXX_FLAGS_INIT "${VXWORKS_BSP_CXX_FLAGS}")
50-

‎default_config.cmake‎

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
##########################################################################
2+
#
3+
# Default configuration options for PSP
4+
#
5+
# This file specifies the default values for various compile-time options
6+
# supported by PSP.
7+
#
8+
# NOTE:
9+
# The defaults in this file should _not_ be directly modified for tuning.
10+
#
11+
# Instead, use the "PSP_CONFIGURATION_FILE" CMake variable to define
12+
# a custom file which can override/modify the configuration for the items
13+
# which require tuning.
14+
#
15+
##########################################################################
16+
17+
##############################################################
18+
# Code/Feature Selection Options for the PSP implementation
19+
##############################################################
20+
21+
22+
#
23+
# PSP_CONFIG_DEBUG_PRINTF
24+
# ----------------------------------
25+
#
26+
# Controls inclusion of PSP_DEBUG statements in the code
27+
#
28+
# If set FALSE, all PSP_DEBUG statements are compiled out.
29+
#
30+
# If set TRUE, all the "PSP_DEBUG" statements will be compiled in and displayed
31+
# on the debug console. The statements may still be suppressed at runtime.
32+
#
33+
set(PSP_CONFIG_DEBUG_PRINTF FALSE
34+
CACHE BOOL "Controls inclusion of PSP_DEBUG statements in the code"
35+
)
36+
37+
#############################################
38+
# Resource Limits for the PSP
39+
#############################################
40+
41+
# The default value of debug level for PSP_DEBUG statements
42+
set(PSP_CONFIG_DEBUG_LEVEL 1
43+
CACHE STRING "Default value of Debug level for PSP_DEBUG"
44+
)
45+
46+
##############################################################
47+
# FS Mapping for the PSP implementation
48+
##############################################################
49+
50+
51+
# The default virtual FS mapping for the "/cf" directory, typically used for Linux and QNX
52+
set(PSP_CONFIG_CF_VIRTUAL_MAPPING "./cf"
53+
CACHE STRING "Default virtual FS mapping for the /cf directory"
54+
)
55+
56+
# The default virtual FS mapping for the EEPROM "/cf" directory, typically used for RTEMS
57+
set(PSP_CONFIG_CF_EEPROM_VIRTUAL_MAPPING "/mnt/eeprom"
58+
CACHE STRING "Default virtual FS mapping for the EEPROM /cf directory"
59+
)
60+
61+
# The default virtual FS mapping for the ROMFS "/cf" directory, typically used for VxWorks 7.x
62+
set(PSP_CONFIG_CF_ROMFS_VIRTUAL_MAPPING "/romfs/cpu1/cf"
63+
CACHE STRING "Default virtual FS mapping for the ROMFS /cf directory"
64+
)
65+
66+
# The default virtual FS mapping for the physical device "/cf" directory, typically used for VxWorks 6.9 (MCP750)
67+
set(PSP_CONFIG_CF_PHY_DEV_VIRTUAL_MAPPING "CF:0"
68+
CACHE STRING "Default virtual FS mapping for the physical device /cf directory"
69+
)
70+
71+

‎fsw/generic-qnx/CMakeLists.txt‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
######################################################################
2+
#
3+
# CMAKE build recipe for generic-qnx PSP component
4+
#
5+
######################################################################
6+
7+
# This contains the fully platform-specific code to
8+
# run CFE on this target.
9+
10+
# Build the pc-linux implementation as a library
11+
add_library(psp-${CFE_PSP_TARGETNAME}-impl OBJECT
12+
src/cfe_psp_exception.c
13+
src/cfe_psp_memory.c
14+
src/cfe_psp_ssr.c
15+
src/cfe_psp_start.c
16+
src/cfe_psp_support.c
17+
src/cfe_psp_watchdog.c
18+
)
19+
20+
# The _GNU_SOURCE directive is required to call non-posix APIs
21+
# that are specific to the Linux/glibc environment.
22+
# Code outside the pc-linux PSP should _not_ depend on this.
23+
target_compile_definitions(psp-${CFE_SYSTEM_PSPNAME}-impl PRIVATE
24+
_GNU_SOURCE
25+
$<TARGET_PROPERTY:psp_module_api,INTERFACE_COMPILE_DEFINITIONS>
26+
)
27+
28+
target_include_directories(psp-${CFE_PSP_TARGETNAME}-impl PRIVATE
29+
inc
30+
$<TARGET_PROPERTY:psp_module_api,INTERFACE_INCLUDE_DIRECTORIES>
31+
)
32+
33+
# Include definition of cfe_psp_backtrace.h referenced by cfe_psp_config.h
34+
if (QNX_SDP_VERSION EQUAL 800)
35+
target_include_directories(psp-${CFE_PSP_TARGETNAME}-impl PRIVATE $<TARGET_PROPERTY:backtrace_libunwind,INTERFACE_INCLUDE_DIRECTORIES>)
36+
elseif (QNX_SDP_VERSION EQUAL 710)
37+
target_include_directories(psp-${CFE_PSP_TARGETNAME}-impl PRIVATE $<TARGET_PROPERTY:backtrace_qnx,INTERFACE_INCLUDE_DIRECTORIES>)
38+
endif()
39+

‎fsw/generic-qnx/doc/.gitignore‎

Whitespace-only changes.

0 commit comments

Comments
 (0)