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-09-02 #861

Merged
merged 22 commits into from
Sep 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8afeb2a
Fix #265, name-based target configuration
jphickey Jul 9, 2020
37a5ac9
Fix #815, remove all deprecated code
jphickey Aug 18, 2020
2799d07
Fix #851, Pass aligned message into CFE_MSG_ComputeCheckSum
skliper Aug 31, 2020
58ed92e
Fix #823, avoid infinite loop in CDS registry find
jphickey Sep 2, 2020
4d3c809
Fix #797, refactor internal table/id management in ES
jphickey Sep 2, 2020
2efe70b
Fix #797, refactor internal table/id management in EVS
jphickey Sep 2, 2020
dfe8abc
Fix #797, Update FS subsystem for abstract IDs
jphickey Sep 2, 2020
4d901e8
Fix #797, Update SB subsystem for abstract IDs
jphickey Sep 2, 2020
aa8d7a9
Fix #797, Update TBL subsystem for abstract IDs
jphickey Sep 2, 2020
7f0c08e
Fix #797, Update TIME subsystem for abstract IDs
jphickey Sep 2, 2020
64f0da9
Merge pull request #852 from skliper/fix851-cast-align-checksum
yammajamma Sep 2, 2020
c16fbee
Merge pull request #857 from jphickey/fix-823-cds-reg-find
yammajamma Sep 2, 2020
e0910fb
Merge pull request #817 from jphickey/fix-815-remove-deprecated
yammajamma Sep 2, 2020
1be664e
Fix #828, Spacecraft ID sample set to historical value (0x42)
skliper Aug 21, 2020
3baef94
HOTFIX-20200902, Fix sb unit test setup issue
skliper Sep 4, 2020
8b9a3db
Merge pull request #866 from skliper/HOTFIX-sb-unit-tests
astrogeco Sep 4, 2020
0bca6dc
Merge pull request #860 from skliper/fix828-spacecraft-id-hex
astrogeco Sep 4, 2020
aaa27b6
Merge pull request #776 from jphickey/fix-265-name-based-target
astrogeco Sep 4, 2020
a40ce45
Merge pull request #859 from jphickey/fix-797-internal-tbl-mgmt
astrogeco Sep 4, 2020
d47a869
HOTFIX 20200902, update documentation links for deprecated symbols
jphickey Sep 8, 2020
68f871a
HOTFIX 20200902, Fix SB Test_CleanupApp_API AppID
jphickey Sep 8, 2020
aa9f96a
Increase version to 6.8.0-rc1+dev65, update readme
yammajamma Sep 9, 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
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ The detailed cFE user's guide can be viewed at <https://github.com/nasa/cFS/blob

## Version History

### Development Build: 6.8.0-rc1+dev65

- In the next major CFE release, this code will be no longer supported at all. It should be removed early in the cycle to avoid needing to maintain this compatibility code.
- The CFE_ES_FindCDSInRegistry function had an unusual loop control structure with mixed types of signed and unsigned. This has the possibility of being infinite if the MaxNumRegEntries is zero due to the way the end condition is structured. Simplify to be like other loops and use unsigned int control variable.
- Fixes the cast-align error (use the aligned Msg since it's available already).
- HOTFIX-20200902 - Fix sb unit test setup issue.
- HOTFIX 20200902 - Update documentation links for deprecated symbols.
- HOTFIX 20200902 - Fix SB Test_CleanupApp_API AppID.
- See <https://github.com/nasa/cFE/pull/861>

### Development Build: 6.8.0-rc1+dev42

- Removes reference from documentation.
Expand Down
41 changes: 14 additions & 27 deletions cmake/arch_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ function(add_cfe_tables APP_NAME TBL_SRC_FILES)
# current content of a dependency (rightfully so).
add_custom_command(
OUTPUT "${TABLE_DESTDIR}/${TBLWE}.tbl"
COMMAND ${CMAKE_C_COMPILER} ${TBL_CFLAGS} -c -o ${TBLWE}.o ${TBL_SRC}
COMMAND ${CMAKE_C_COMPILER} ${TBL_CFLAGS}
-DCFE_PLATFORM_CPU_ID=${${TGT}_PROCESSORID}
-DCFE_PLATFORM_CPU_NAME="${TGT}"
-c -o ${TBLWE}.o ${TBL_SRC}
COMMAND ${MISSION_BINARY_DIR}/tools/elf2cfetbl/elf2cfetbl ${TBLWE}.o
DEPENDS ${MISSION_BINARY_DIR}/tools/elf2cfetbl/elf2cfetbl ${TBL_SRC}
WORKING_DIRECTORY ${TABLE_DESTDIR}
Expand Down Expand Up @@ -326,14 +329,7 @@ function(process_arch SYSVAR)
endif()

# Generate a list of targets that share this system architecture
set(INSTALL_TARGET_LIST)
foreach(TGTID ${TGTSYS_${SYSVAR}})
set(TGTNAME ${TGT${TGTID}_NAME})
if(NOT TGTNAME)
set(TGTNAME "cpu${TGTID}")
endif(NOT TGTNAME)
list(APPEND INSTALL_TARGET_LIST ${TGTNAME})
endforeach()
set(INSTALL_TARGET_LIST ${TGTSYS_${SYSVAR}})

# 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.
Expand Down Expand Up @@ -454,20 +450,14 @@ function(process_arch SYSVAR)
set(TGTLIST_${APP})
endforeach()

foreach(TGTID ${TGTSYS_${SYSVAR}})
foreach(TGTNAME ${TGTSYS_${SYSVAR}})

set(TGTNAME ${TGT${TGTID}_NAME})
if(NOT TGTNAME)
set(TGTNAME "cpu${TGTID}")
set(TGT${TGTID}_NAME "${TGTNAME}")
endif(NOT TGTNAME)

# Append to the app install list for this CPU
foreach(APP ${TGT${TGTID}_APPLIST})
set(TGTLIST_${APP} ${TGTLIST_${APP}} ${TGTNAME})
endforeach(APP ${TGT${TGTID}_APPLIST})
foreach(APP ${${TGTNAME}_APPLIST})
list(APPEND TGTLIST_${APP} ${TGTNAME})
endforeach(APP ${${TGTNAME}_APPLIST})

endforeach(TGTID ${TGTSYS_${SYSVAR}})
endforeach(TGTNAME ${TGTSYS_${SYSVAR}})

# Process each app that is used on this system architecture
foreach(APP ${TGTSYS_${SYSVAR}_APPS})
Expand All @@ -478,14 +468,12 @@ function(process_arch SYSVAR)

# Process each target that shares this system architecture
# Second Pass: Build and link final target executable
foreach(TGTID ${TGTSYS_${SYSVAR}})
foreach(TGTNAME ${TGTSYS_${SYSVAR}})

set(TGTNAME ${TGT${TGTID}_NAME})

# Target to generate the actual executable file
add_subdirectory(cmake/target ${TGTNAME})

foreach(INSTFILE ${TGT${TGTID}_FILELIST})
foreach(INSTFILE ${${TGTNAME}_FILELIST})
if(EXISTS ${MISSION_DEFS}/${TGTNAME}_${INSTFILE})
set(FILESRC ${MISSION_DEFS}/${TGTNAME}_${INSTFILE})
elseif(EXISTS ${MISSION_DEFS}/${INSTFILE})
Expand All @@ -498,9 +486,8 @@ function(process_arch SYSVAR)
else(FILESRC)
message("WARNING: Install file ${INSTFILE} for ${TGTNAME} not found")
endif (FILESRC)
endforeach(INSTFILE ${TGT${TGTID}_FILELIST})
endforeach(TGTID ${TGTSYS_${SYSVAR}})

endforeach(INSTFILE ${${TGTNAME}_FILELIST})
endforeach(TGTNAME ${TGTSYS_${SYSVAR}})

endfunction(process_arch SYSVAR)

82 changes: 57 additions & 25 deletions cmake/global_functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -148,30 +148,61 @@ function(read_targetconfig)
set(TGTSYS_LIST)
set(MISSION_APPS)
set(MISSION_PSPMODULES)

# This while loop checks for a sequential set of variables prefixed with TGT<x>_
# where <x> is a sequence number starting with 1. The first "gap" (undefined name)
# is treated as the end of list.
# This is the historical way of specifying CPU configs. New/future development should
# prefer the name-based specification. This translates the sequential TGT<x> variable
# to a name-based variable.
set(TGTID 0)
while(1)
math(EXPR TGTID "${TGTID} + 1")
if (NOT DEFINED TGT${TGTID}_NAME)
break()
endif()
if (NOT DEFINED TGT${TGTID}_SYSTEM)
set(TGT${TGTID}_SYSTEM "cpu${TGTID}")
set(TGT${TGTID}_SYSTEM "${TGT${TGTID}_SYSTEM}" PARENT_SCOPE)
endif()
if (NOT DEFINED TGT${TGTID}_PLATFORM)
set(TGT${TGTID}_PLATFORM "default" "${TGT${TGTID}_NAME}")
set(TGT${TGTID}_PLATFORM "${TGT${TGTID}_PLATFORM}" PARENT_SCOPE)
endif()
set(CPUNAME ${TGT${TGTID}_NAME})
# by default if PROCESSORID isn't specified, then use TGTID number.
if(NOT DEFINED TGT${TGTID}_PROCESSORID)
set(TGT${TGTID}_PROCESSORID ${TGTID})
endif()

if (SIMULATION)
# Translate the TGT<x> prefix to the CPU name prefix
# also propagate the value to parent scope
foreach(PROP PROCESSORID
APPLIST
STATIC_APPLIST
STATIC_SYMLIST
PSP_MODULELIST
FILELIST
EMBED_FILELIST
SYSTEM
PLATFORM)
set(${CPUNAME}_${PROP} ${TGT${TGTID}_${PROP}})
set(${CPUNAME}_${PROP} ${${CPUNAME}_${PROP}} PARENT_SCOPE)
endforeach()
list(APPEND MISSION_CPUNAMES ${CPUNAME})
endwhile()

foreach(CPUNAME ${MISSION_CPUNAMES})
if (DEFINED SIMULATION)
# if simulation use simulation system architecture for all targets
set(TOOLCHAIN_NAME "${SIMULATION}")
else (SIMULATION)
elseif (DEFINED ${CPUNAME}_SYSTEM)
# get the target system arch identifier string
set(TOOLCHAIN_NAME "${TGT${TGTID}_SYSTEM}")
endif (SIMULATION)
set(TOOLCHAIN_NAME "${${CPUNAME}_SYSTEM}")
else()
# assume a toolchain name matching the CPU name
set(TOOLCHAIN_NAME "${CPUNAME}")
set(${CPUNAME}_SYSTEM ${TOOLCHAIN_NAME} PARENT_SCOPE)
endif ()

if (NOT DEFINED ${CPUNAME}_PLATFORM)
set(${CPUNAME}_PLATFORM "default" "${CPUNAME}")
set(${CPUNAME}_PLATFORM "${${CPUNAME}_PLATFORM}" PARENT_SCOPE)
endif()

set(BUILD_CONFIG ${TOOLCHAIN_NAME} ${TGT${TGTID}_PLATFORM})
set(BUILD_CONFIG ${TOOLCHAIN_NAME} ${${CPUNAME}_PLATFORM})

# convert to a the string which is safe for a variable name
string(REGEX REPLACE "[^A-Za-z0-9]" "_" SYSVAR "${BUILD_CONFIG}")
Expand All @@ -181,25 +212,25 @@ function(read_targetconfig)

# if the "global" applist is not empty, append to every CPU applist
if (MISSION_GLOBAL_APPLIST)
list(APPEND TGT${TGTID}_APPLIST ${MISSION_GLOBAL_APPLIST})
set(TGT${TGTID}_APPLIST ${TGT${TGTID}_APPLIST} PARENT_SCOPE)
list(APPEND ${CPUNAME}_APPLIST ${MISSION_GLOBAL_APPLIST})
set(${CPUNAME}_APPLIST ${${CPUNAME}_APPLIST} PARENT_SCOPE)
endif (MISSION_GLOBAL_APPLIST)

if (MISSION_GLOBAL_STATIC_APPLIST)
list(APPEND TGT${TGTID}_STATIC_APPLIST ${MISSION_GLOBAL_STATIC_APPLIST})
set(TGT${TGTID}_STATIC_APPLIST ${TGT${TGTID}_STATIC_APPLIST} PARENT_SCOPE)
list(APPEND ${CPUNAME}_STATIC_APPLIST ${MISSION_GLOBAL_STATIC_APPLIST})
set(${CPUNAME}_STATIC_APPLIST ${${CPUNAME}_STATIC_APPLIST} PARENT_SCOPE)
endif (MISSION_GLOBAL_STATIC_APPLIST)

# Append to global lists
list(APPEND TGTSYS_LIST "${SYSVAR}")
list(APPEND TGTSYS_${SYSVAR} "${TGTID}")
list(APPEND TGTSYS_${SYSVAR}_APPS ${TGT${TGTID}_APPLIST})
list(APPEND TGTSYS_${SYSVAR}_STATICAPPS ${TGT${TGTID}_STATIC_APPLIST})
list(APPEND TGTSYS_${SYSVAR}_PSPMODULES ${TGT${TGTID}_PSP_MODULELIST})
list(APPEND MISSION_APPS ${TGT${TGTID}_APPLIST} ${TGT${TGTID}_STATIC_APPLIST})
list(APPEND MISSION_PSPMODULES ${TGT${TGTID}_PSP_MODULELIST})
list(APPEND TGTSYS_${SYSVAR} "${CPUNAME}")
list(APPEND TGTSYS_${SYSVAR}_APPS ${${CPUNAME}_APPLIST})
list(APPEND TGTSYS_${SYSVAR}_STATICAPPS ${${CPUNAME}_STATIC_APPLIST})
list(APPEND TGTSYS_${SYSVAR}_PSPMODULES ${${CPUNAME}_PSP_MODULELIST})
list(APPEND MISSION_APPS ${${CPUNAME}_APPLIST} ${${CPUNAME}_STATIC_APPLIST})
list(APPEND MISSION_PSPMODULES ${${CPUNAME}_PSP_MODULELIST})

endwhile()
endforeach()

# Remove duplicate entries in the generated lists
list(REMOVE_DUPLICATES TGTSYS_LIST)
Expand All @@ -214,6 +245,7 @@ function(read_targetconfig)
set(TGTSYS_LIST ${TGTSYS_LIST} PARENT_SCOPE)
set(MISSION_APPS ${MISSION_APPS} PARENT_SCOPE)
set(MISSION_PSPMODULES ${MISSION_PSPMODULES} PARENT_SCOPE)
set(MISSION_CPUNAMES ${MISSION_CPUNAMES} PARENT_SCOPE)

foreach(SYSVAR ${TGTSYS_LIST})
set(TGTSYS_${SYSVAR} ${TGTSYS_${SYSVAR}} PARENT_SCOPE)
Expand All @@ -229,7 +261,7 @@ function(read_targetconfig)
list(REMOVE_DUPLICATES TGTSYS_${SYSVAR}_PSPMODULES)
set(TGTSYS_${SYSVAR}_PSPMODULES ${TGTSYS_${SYSVAR}_PSPMODULES} PARENT_SCOPE)
endif(TGTSYS_${SYSVAR}_PSPMODULES)
endforeach(SYSVAR IN LISTS TGTSYS_LIST)
endforeach(SYSVAR ${TGTSYS_LIST})

endfunction(read_targetconfig)

Expand Down
15 changes: 0 additions & 15 deletions cmake/sample_defs/cpu1_msgids.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,6 @@
#define CFE_TBL_REG_TLM_MID CFE_MISSION_TLM_MID_BASE1 + CFE_MISSION_TBL_REG_TLM_MSG /* 0x080C */
#define CFE_SB_ALLSUBS_TLM_MID CFE_MISSION_TLM_MID_BASE1 + CFE_MISSION_SB_ALLSUBS_TLM_MSG /* 0x080D */
#define CFE_SB_ONESUB_TLM_MID CFE_MISSION_TLM_MID_BASE1 + CFE_MISSION_SB_ONESUB_TLM_MSG /* 0x080E */

#ifndef CFE_OMIT_DEPRECATED_6_7
#define CFE_ES_SHELL_TLM_MID CFE_MISSION_TLM_MID_BASE1 + CFE_MISSION_ES_SHELL_TLM_MSG /* 0x080F */
#endif

#define CFE_ES_MEMSTATS_TLM_MID CFE_MISSION_TLM_MID_BASE1 + CFE_MISSION_ES_MEMSTATS_TLM_MSG /* 0x0810 */

/*
* MID definitions by these older names are required to make some existing apps compile
* These are deprecated and should be removed after CFE 6.6
*/
#ifndef CFE_OMIT_DEPRECATED_6_6

#define CFE_EVS_EVENT_MSG_MID CFE_EVS_LONG_EVENT_MSG_MID

#endif

#endif
Loading