Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration Candidate: 2020-04-15 #635

Merged
merged 24 commits into from
Apr 27, 2020
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8ee7c02
CMake: use a dedicated variable to hold a path to the CFS source folder
stanislaw Jan 10, 2020
f5e4c50
Fixes #88, updates comments to note that the length limit of OS_MAX_P…
dmknutsen Mar 30, 2020
07c4cae
Fix #344, Remove mission/platform include dirs
skliper Mar 31, 2020
fe700b7
Fix #580, Deprecate CFE_OS_ abstracted error codes
skliper Apr 2, 2020
627a969
Fix #335: Shell unsigned pkt length bug
skliper Nov 1, 2019
bf24986
Fix #295, Move app table management to background task
jphickey Apr 9, 2020
79e4bfb
Fixes #494, Updates CFE_SB_GetLastSenderID to check if message has be…
dmknutsen Apr 13, 2020
537f9b8
Fix #263, Expose CFE_SB_IsValidMsgId() API
jphickey Apr 15, 2020
51c599c
Fix #245, Consistent use of MsgId type
jphickey Apr 13, 2020
9a6950b
Fix #632, Infer OSAL_SYSTEM_BSPTYPE from CFE_SYSTEM_PSP_NAME
jphickey Apr 21, 2020
bd6707c
Merge pull request #575 from dmknutsen/issue_88
astrogeco Apr 21, 2020
5a1c7e8
Merge pull request #474 from stanislaw/root-level-cmake
astrogeco Apr 21, 2020
a4a48bd
Merge pull request #598 from jphickey/fix-295-apptable-scan
astrogeco Apr 21, 2020
9f7de0f
Merge pull request #582 from skliper/fix580-deprecate-cfe-os-error-codes
astrogeco Apr 21, 2020
0cd9f5e
Merge pull request #577 from skliper/fix344-rm-mission-platform-inc
astrogeco Apr 21, 2020
8ed578e
Merge pull request #584 from skliper/fix335-shell-unsigned-bug
astrogeco Apr 21, 2020
d9ade13
Merge pull request #605 from dmknutsen/issue_494
astrogeco Apr 21, 2020
e636967
Fixes #240, removes MESSAGE_FORMAT_IS_CCSDS ifdefs from code
dmknutsen Mar 31, 2020
3b7f20f
Merge pull request #602 and #635
jphickey Apr 22, 2020
89308e4
Merge pull request #634 from jphickey/fix-632-implied-osal-bsptype
astrogeco Apr 24, 2020
b1ef9fc
Fix #644, Append directory properties
jphickey Apr 27, 2020
fb88b53
HOTFIX: Use CFE_PLATFORM_SB_HIGHEST_VALID_MSGID
jphickey Apr 27, 2020
690576a
HOTFIX: Add osconfig.h to doxygen path to resolve references
skliper Apr 27, 2020
963ba09
Increase version to 6.7.14. Update Readme content and version history…
astrogeco Apr 27, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ set(CMAKE_LEGACY_CYGWIN_WIN32 0)
# Add a path for any locally-supplied CMake modules
# These would typically be a part of any custom PSPs in use.
# (this is not required, and the directory can be empty/nonexistent)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../psp/cmake/Modules" ${CMAKE_MODULE_PATH})
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../psp/cmake/Modules" ${CMAKE_MODULE_PATH})

# The minimum CMake version is chosen because 2.6.4 is what is
# included by default with RHEL/Centos 5.x
Expand All @@ -59,7 +59,8 @@ cmake_minimum_required(VERSION 2.6.4)
# that the subdirectories will at least use the "C" language, so
# indicate that now. Doing this early initializes the CFLAGS
# so they won't change later.
project(CFETOP C)
# Note: this line defines the CFE_SOURCE_DIR variable.
project(CFE C)

# Allow unit tests to be added by any recipe
enable_testing()
Expand Down
27 changes: 19 additions & 8 deletions cmake/arch_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -272,21 +272,19 @@ function(prepare)
add_definitions(-DSIMULATION=${SIMULATION})
endif (SIMULATION)

# Check that PSPNAME, BSPTYPE, and OSTYPE are set properly for this arch
if (NOT CFE_SYSTEM_PSPNAME OR NOT OSAL_SYSTEM_OSTYPE)
# Check that PSPNAME is set properly for this arch
if (NOT CFE_SYSTEM_PSPNAME)
if (CMAKE_CROSSCOMPILING)
message(FATAL_ERROR "Cross-compile toolchain ${CMAKE_TOOLCHAIN_FILE} must define CFE_SYSTEM_PSPNAME and OSAL_SYSTEM_OSTYPE")
message(FATAL_ERROR "Cross-compile toolchain ${CMAKE_TOOLCHAIN_FILE} must define CFE_SYSTEM_PSPNAME")
elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR
"${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN")
# Export the variables determined here up to the parent scope
SET(CFE_SYSTEM_PSPNAME "pc-linux" PARENT_SCOPE)
SET(OSAL_SYSTEM_BSPTYPE "pc-linux" PARENT_SCOPE)
SET(OSAL_SYSTEM_OSTYPE "posix" PARENT_SCOPE)
else ()
# Not cross compiling and host system is not recognized
message(FATAL_ERROR "Do not know how to set CFE_SYSTEM_PSPNAME and OSAL_SYSTEM_OSTYPE on ${CMAKE_SYSTEM_NAME} system")
message(FATAL_ERROR "Do not know how to set CFE_SYSTEM_PSPNAME on ${CMAKE_SYSTEM_NAME} system")
endif()
endif (NOT CFE_SYSTEM_PSPNAME OR NOT OSAL_SYSTEM_OSTYPE)
endif (NOT CFE_SYSTEM_PSPNAME)

# Truncate the global TGTSYS_LIST to be only the target architecture
set(TGTSYS_LIST ${TARGETSYSTEM} PARENT_SCOPE)
Expand Down Expand Up @@ -318,9 +316,22 @@ function(process_arch SYSVAR)
endif(NOT TGTNAME)
list(APPEND INSTALL_TARGET_LIST ${TGTNAME})
endforeach()

# Assume use of an OSAL BSP of the same name as the CFE PSP
# This can be overridden by the PSP-specific build_options but normally this is expected.
set(CFE_PSP_EXPECTED_OSAL_BSPTYPE ${CFE_SYSTEM_PSPNAME})

# Include any specific compiler flags or config from the selected PSP
include(${MISSION_SOURCE_DIR}/psp/fsw/${CFE_SYSTEM_PSPNAME}/make/build_options.cmake)

if (NOT DEFINED OSAL_SYSTEM_BSPTYPE)
# Implicitly use the OSAL BSP that corresponds with the CFE PSP
set(OSAL_SYSTEM_BSPTYPE ${CFE_PSP_EXPECTED_OSAL_BSPTYPE})
elseif (NOT OSAL_SYSTEM_BSPTYPE STREQUAL CFE_PSP_EXPECTED_OSAL_BSPTYPE)
# Generate a warning about the BSPTYPE not being expected.
# Not calling this a fatal error because it could possibly be intended during development
message(WARNING "Mismatched PSP/BSP: ${CFE_SYSTEM_PSPNAME} implies ${CFE_PSP_EXPECTED_OSAL_BSPTYPE}, but ${OSAL_SYSTEM_BSPTYPE} is configured")
endif()

# The "inc" directory in the binary dir contains the generated wrappers, if any
include_directories(${MISSION_BINARY_DIR}/inc)
Expand All @@ -347,7 +358,7 @@ function(process_arch SYSVAR)
get_target_property(OSAL_INCLUDE_DIRECTORIES osal INTERFACE_INCLUDE_DIRECTORIES)

if (OSAL_COMPILE_DEFINITIONS)
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS "${OSAL_COMPILE_DEFINITIONS}")
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "${OSAL_COMPILE_DEFINITIONS}")
endif (OSAL_COMPILE_DEFINITIONS)
if (OSAL_INCLUDE_DIRECTORIES)
include_directories(${OSAL_INCLUDE_DIRECTORIES})
Expand Down
30 changes: 12 additions & 18 deletions cmake/mission_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function(initialize_globals)
# this is the parent (mission) build and variable values must be determined
# Obtain the "real" top-level source directory and set it in parent scope
if (NOT DEFINED MISSION_SOURCE_DIR)
get_filename_component(MISSION_SOURCE_DIR "${CMAKE_SOURCE_DIR}/.." ABSOLUTE)
get_filename_component(MISSION_SOURCE_DIR "${CFE_SOURCE_DIR}/.." ABSOLUTE)
set(MISSION_SOURCE_DIR ${MISSION_SOURCE_DIR} CACHE PATH "Top level mission source directory")
endif(NOT DEFINED MISSION_SOURCE_DIR)

Expand Down Expand Up @@ -211,13 +211,13 @@ function(prepare)
file(WRITE "${CMAKE_BINARY_DIR}/doc/mission-content.doxyfile"
${MISSION_DOXYFILE_USER_CONTENT})

configure_file("${CMAKE_SOURCE_DIR}/cmake/cfe-common.doxyfile.in"
configure_file("${CFE_SOURCE_DIR}/cmake/cfe-common.doxyfile.in"
"${CMAKE_BINARY_DIR}/doc/cfe-common.doxyfile")

configure_file("${CMAKE_SOURCE_DIR}/cmake/osal-common.doxyfile.in"
configure_file("${CFE_SOURCE_DIR}/cmake/osal-common.doxyfile.in"
"${CMAKE_BINARY_DIR}/doc/osal-common.doxyfile")

configure_file("${CMAKE_SOURCE_DIR}/cmake/mission-detaildesign.doxyfile.in"
configure_file("${CFE_SOURCE_DIR}/cmake/mission-detaildesign.doxyfile.in"
"${CMAKE_BINARY_DIR}/doc/mission-detaildesign.doxyfile")

# The user guide should include the doxygen from the _public_ API files from CFE + OSAL
Expand All @@ -229,20 +229,14 @@ function(prepare)

# OSAL API GUIDE include PUBLIC API
file(GLOB MISSION_OSAL_HEADERFILES
"${osal_MISSION_DIR}/src/os/inc/*.h")
"${osal_MISSION_DIR}/src/os/inc/*.h"
"${MISSION_SOURCE_DIR}/cfe/cmake/sample_defs/*osconfig.h")
string(REPLACE ";" " \\\n" MISSION_OSAL_HEADERFILES "${MISSION_OSAL_HEADERFILES}")

# PREDEFINED
set(USERGUIDE_PREDEFINED
"MESSAGE_FORMAT_IS_CCSDS")

set(OSALGUIDE_PREDEFINED
"MESSAGE_FORMAT_IS_CCSDS")

configure_file("${CMAKE_SOURCE_DIR}/cmake/cfe-usersguide.doxyfile.in"
configure_file("${CFE_SOURCE_DIR}/cmake/cfe-usersguide.doxyfile.in"
"${CMAKE_BINARY_DIR}/doc/cfe-usersguide.doxyfile")

configure_file("${CMAKE_SOURCE_DIR}/cmake/osalguide.doxyfile.in"
configure_file("${CFE_SOURCE_DIR}/cmake/osalguide.doxyfile.in"
"${CMAKE_BINARY_DIR}/doc/osalguide.doxyfile")

add_custom_target(mission-doc
Expand Down Expand Up @@ -294,7 +288,7 @@ function(prepare)
add_custom_target(mission-version
COMMAND
${CMAKE_COMMAND} -D BIN=${CMAKE_BINARY_DIR}
-P ${CMAKE_SOURCE_DIR}/cmake/version.cmake
-P ${CFE_SOURCE_DIR}/cmake/version.cmake
WORKING_DIRECTORY
${CMAKE_SOURCE_DIR}
)
Expand Down Expand Up @@ -337,8 +331,8 @@ function(process_arch TARGETSYSTEM)
# Find the toolchain file - allow a file in the mission defs dir to supercede one in the compile dir
if (EXISTS ${MISSION_DEFS}/toolchain-${CURRSYS}.cmake)
set(TOOLCHAIN_FILE ${MISSION_DEFS}/toolchain-${CURRSYS}.cmake)
elseif(EXISTS ${CMAKE_SOURCE_DIR}/cmake/toolchain-${CURRSYS}.cmake)
set(TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchain-${CURRSYS}.cmake)
elseif(EXISTS ${CFE_SOURCE_DIR}/cmake/toolchain-${CURRSYS}.cmake)
set(TOOLCHAIN_FILE ${CFE_SOURCE_DIR}/cmake/toolchain-${CURRSYS}.cmake)
else()
message(FATAL_ERROR "Unable to find toolchain file for ${CURRSYS}")
endif()
Expand All @@ -357,7 +351,7 @@ function(process_arch TARGETSYSTEM)
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
${SELECTED_TOOLCHAIN_FILE}
${CMAKE_SOURCE_DIR}
${CFE_SOURCE_DIR}
WORKING_DIRECTORY
"${ARCH_BINARY_DIR}"
RESULT_VARIABLE
Expand Down
6 changes: 3 additions & 3 deletions cmake/sample_defs/default_osconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#define OS_MAX_MUTEXES 20

/*
** Maximum length for an absolute path name
** Maximum length (including terminator) for an absolute path name
*/
#define OS_MAX_PATH_LEN 64

Expand All @@ -56,7 +56,7 @@
#define OS_MAX_LOCAL_PATH_LEN (OS_MAX_PATH_LEN + OS_FS_PHYS_NAME_LEN)

/*
** The maxium length allowed for a object (task,queue....) name
** The maxium length allowed for a object name (task, queue, etc.), including terminating null
*/
#define OS_MAX_API_NAME 20

Expand All @@ -66,7 +66,7 @@
#define OS_MAX_FILE_NAME 20

/*
** These defines are for OS_printf
** Buffer for OS_printf, includes terminator. Longer messages will be truncated
*/
#define OS_BUFFER_SIZE 172
#define OS_BUFFER_MSG_DEPTH 100
Expand Down
2 changes: 1 addition & 1 deletion cmake/sample_defs/global_build_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
set(OMIT_DEPRECATED $ENV{OMIT_DEPRECATED} CACHE STRING "Omit deprecated elements")
if (OMIT_DEPRECATED)
message (STATUS "OMIT_DEPRECATED=true: Not including deprecated elements in build")
add_definitions(-DCFE_OMIT_DEPRECATED_6_6 -DOSAL_OMIT_DEPRECATED)
add_definitions(-DCFE_OMIT_DEPRECATED_6_7 -DCFE_OMIT_DEPRECATED_6_6 -DOSAL_OMIT_DEPRECATED)
else()
message (STATUS "OMIT_DEPRECATED=false: Deprecated elements included in build")
endif (OMIT_DEPRECATED)
6 changes: 2 additions & 4 deletions cmake/sample_defs/sample_mission_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,9 @@
**
** \par Limits
** All versions of the cFE currently support only CCSDS as the message format
** Defining only MESSAGE_FORMAT_IS_CCSDS implements the 11 bit APID format in the primary header
** Also defining MESSAGE_FORMAT_IS_CCSDS_VER_2 implements the APID extended header format
** MESSAGE_FORMAT_IS_CCSDS must be defined for all cFE deployments. MESSAGE_FORMAT_IS_CCSDS_VER_2 is optional
** Defining MESSAGE_FORMAT_IS_CCSDS_VER_2 implements the APID extended header format
** MESSAGE_FORMAT_IS_CCSDS_VER_2 is optional
*/
#define MESSAGE_FORMAT_IS_CCSDS
/* #define MESSAGE_FORMAT_IS_CCSDS_VER_2 */
#undef MESSAGE_FORMAT_IS_CCSDS_VER_2

Expand Down
Loading