Skip to content

Commit

Permalink
Merge pull request #635 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
Integration Candidate: 2020-04-15
  • Loading branch information
astrogeco committed Apr 27, 2020
2 parents 0648a47 + 963ba09 commit 3c616f2
Show file tree
Hide file tree
Showing 47 changed files with 1,292 additions and 4,000 deletions.
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
137 changes: 79 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,64 +6,85 @@ This repository contains NASA's Core Flight Executive (cFE), which is a framewor

This is a collection of services and associated framework to be located in the `cfe` subdirectory of a cFS Mission Tree. The Core Flight System is bundled at https://github.com/nasa/cFS, which includes build and execution instructions.

## Version Notes
- 6.7.13: DEVELOPMENT
- RTEMS builds without error.
- Use the INTERFACE_COMPILE_DEFINITIONS and INTERFACE_INCLUDE_DIRECTORIES properties from the osal target and apply them to the entire CFE build as a directory-scope property. No impact until these are set in OSAL.
- Minor other updates (see https://github.com/nasa/cFE/pull/615)
- 6.7.12: DEVELOPMENT
- Cmd code (and checksum) are always in the same place (matches GSFC spec for command secondary header)
- No impact to behavior. Previously the perf log dump file frequently contained errors due to out of order or otherwise corrupted entries, which is now fixed.
- Minor other updates (see https://github.com/nasa/cFE/pull/586)
- 6.7.11: DEVELOPMENT
- Improve documentation
- Update makefile to report branch coverage
- Minor other updates (see https://github.com/nasa/cFE/pull/566)
- 6.7.10: DEVELOPMENT
- Fix potential unit test problems with name collisions
- Improve documentation
- Minor other updates (see https://github.com/nasa/cFE/pull/563)
- 6.7.9: DEVELOPMENT
- No longer requires sed "hack" to change the setting in default_config.h
- Minor other updates (see https://github.com/nasa/cFE/pull/544)
- 6.7.8: DEVELOPMENT
- Updates and cleaned up documentation and requirements
- Fixes incorrect debug messages
- Decrease child task count when one is deleted
- Minor other updates (see https://github.com/nasa/cFE/pull/530)
- 6.7.7: DEVELOPMENT
- Adds a new function, CFE_SB_GetPipeIdByName, which retrieves the pipe ID given a name of a pipe.
- Improvement in error reporting when using a pipe name that is already in use, or when the queue limit has been reached.
- Added userguide and osalguide to the local target list to avoid makefile warning
- Minor other updates (see https://github.com/nasa/cFE/pull/511)
- 6.7.6: DEVELOPMENT
- Adds OMIT_DEPRECATED prep flag
- Adds and enforces strict warnings
- Software Bus now increments sequence counter even if there are no subscribers
- Warning, comment, and code coverage cleanup (see https://github.com/nasa/cFE/pull/490)
- 6.7.5: DEVELOPMENT
- Added CI static analysis check
- Resolved static analysis warnings
- Minor other updates (see https://github.com/nasa/cFE/pull/479)
- 6.7.4: DEVELOPMENT
- Minor updates (see https://github.com/nasa/cFE/pull/448)
- 6.7.3: DEVELOPMENT
- Minor updates (see https://github.com/nasa/cFE/pull/413)
- 6.7.2: DEVELOPMENT
- Minor bugs and enhancements (see https://github.com/nasa/cFE/pull/388)
- 6.7.1: DEVELOPMENT
- Minor bug fixes (see https://github.com/nasa/cFE/pull/378)
- Fix strlen in CFE_ES_TaskInit https://github.com/nasa/cFE/pull/23
- **6.7.0 OFFICIAL RELEASE**:
- This is a point release from an internal repository
- Changes are detailed in [cFS repo](https://github.com/nasa/cFS) release documentation
- Apache 2.0
- **6.6.0a OFFICIAL RELEASE**:
- This is a point release from an internal repository
- Apache 2.0
- Additional release notes are found in [release notes](https://github.com/nasa/cFE/blob/v6.6.0a/docs/cFE_release_notes.md)
- See the [version description document](https://github.com/nasa/cFE/blob/v6.6.0a/docs/cFE_6_6_0_version_description.pdf) for the full document
- Test results can be found in [test results](https://github.com/nasa/cFE/tree/v6.6.0a/test-and-ground/test-review-packages/Results)
## Version History

#### Development Build: 6.7.14
- Exposes the `CFE_SB_IsValidMsgId()` for application usage.
- `CFE_SB_GetLastSenderID` will now detect if it is being called prior to a message being sent on a given pipe.
- Mismatches between PSP/BSP/OS are now detected and warned about during make prep. Only the `CFE_SYSTEM_PSPNAME` is actually required to be specified for a CFE build now. Others can be omitted.
- See https://github.com/nasa/cFE/pull/635 for more details

#### Development Build: 6.7.13
- RTEMS builds without error.
- Use the INTERFACE_COMPILE_DEFINITIONS and INTERFACE_INCLUDE_DIRECTORIES properties from the osal target and apply them to the entire CFE build as a directory-scope property. No impact until these are set in OSAL.
- Minor other updates (see https://github.com/nasa/cFE/pull/615)

#### Development Build: 6.7.12
- Cmd code (and checksum) are always in the same place (matches GSFC spec for command secondary header)
- No impact to behavior. Previously the perf log dump file frequently contained errors due to out of order or otherwise corrupted entries, which is now fixed.
- Minor other updates (see https://github.com/nasa/cFE/pull/586)

#### Development Build: 6.7.11
- Improve documentation
- Update makefile to report branch coverage
- Minor other updates (see https://github.com/nasa/cFE/pull/566)

#### Development Build: 6.7.10
- Fix potential unit test problems with name collisions
- Improve documentation
- Minor other updates (see https://github.com/nasa/cFE/pull/563)

#### Development Build: 6.7.9
- No longer requires sed "hack" to change the setting in default_config.h
- Minor other updates (see https://github.com/nasa/cFE/pull/544)

#### Development Build: 6.7.8
- Updates and cleaned up documentation and requirements
- Fixes incorrect debug messages
- Decrease child task count when one is deleted
- Minor other updates (see https://github.com/nasa/cFE/pull/530)

#### Development Build: 6.7.7
- Adds a new function, CFE_SB_GetPipeIdByName, which retrieves the pipe ID given a name of a pipe.
- Improvement in error reporting when using a pipe name that is already in use, or when the queue limit has been reached.
- Added userguide and osalguide to the local target list to avoid makefile warning
- Minor other updates (see https://github.com/nasa/cFE/pull/511)

#### Development Build: 6.7.6
- Adds OMIT_DEPRECATED prep flag
- Adds and enforces strict warnings
- Software Bus now increments sequence counter even if there are no subscribers
- Warning, comment, and code coverage cleanup (see https://github.com/nasa/cFE/pull/490)

#### Development Build: 6.7.5
- Added CI static analysis check
- Resolved static analysis warnings
- Minor other updates (see https://github.com/nasa/cFE/pull/479)

#### Development Build: 6.7.4
- Minor updates (see https://github.com/nasa/cFE/pull/448)

#### Development Build: 6.7.3
- Minor updates (see https://github.com/nasa/cFE/pull/413)

#### Development Build: 6.7.2
- Minor bugs and enhancements (see https://github.com/nasa/cFE/pull/388)

#### Development Build: 6.7.1
- Fix strlen in CFE_ES_TaskInit https://github.com/nasa/cFE/pull/23
- Minor bug fixes (see https://github.com/nasa/cFE/pull/378)

### ***OFFICIAL RELEASE: 6.7.0***
- This is a point release from an internal repository
- Changes are detailed in [cFS repo](https://github.com/nasa/cFS) release documentation
- Apache 2.0

### ***OFFICIAL RELEASE: 6.6.0a***
- This is a point release from an internal repository
- Apache 2.0
- Additional release notes are found in [release notes](https://github.com/nasa/cFE/blob/v6.6.0a/docs/cFE_release_notes.md)
- See the [version description document](https://github.com/nasa/cFE/blob/v6.6.0a/docs/cFE_6_6_0_version_description.pdf) for the full document
- Test results can be found in [test results](https://github.com/nasa/cFE/tree/v6.6.0a/test-and-ground/test-review-packages/Results)

## Known issues

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

0 comments on commit 3c616f2

Please sign in to comment.