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 20200121 #490

Merged
merged 14 commits into from
Jan 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,22 @@ include(${MISSION_DEFS}/targets.cmake)
# Scan the list of targets and organize by target system type.
read_targetconfig()

# Include global-scope build customization
# Note if this feature is used it should only set basic options
# that have wide support (e.g. add_definitions). It should not
# set anything target or machine specific.
include("${MISSION_DEFS}/global_build_options.cmake" OPTIONAL)

# Additionally the target mission might require additional
# custom build steps or override some routines. In particular
# some architectures might need some special installation steps
# The custom script may override functions such as the
# cfe_exec_do_install() and cfe_app_do_install() functions for this
if (IS_CFS_ARCH_BUILD)
include("${MISSION_DEFS}/arch_build.cmake" OPTIONAL)
include("${MISSION_DEFS}/arch_build_${TARGETSYSTEM}.cmake" OPTIONAL)
include("${MISSION_DEFS}/arch_build_custom.cmake" OPTIONAL)
include("${MISSION_DEFS}/arch_build_custom_${TARGETSYSTEM}.cmake" OPTIONAL)
elseif (IS_CFS_MISSION_BUILD)
include("${MISSION_DEFS}/mission_build.cmake" OPTIONAL)
include("${MISSION_DEFS}/mission_build_custom.cmake" OPTIONAL)
endif (IS_CFS_ARCH_BUILD)

# Call the prepare function defined by the sub-script
Expand Down
7 changes: 1 addition & 6 deletions cmake/cfe-common.doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 8
Expand Down Expand Up @@ -93,7 +92,6 @@ GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = YES
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
Expand Down Expand Up @@ -159,7 +157,6 @@ HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
HTML_DYNAMIC_SECTIONS = NO
CHM_FILE =
Expand Down Expand Up @@ -206,9 +203,7 @@ MAN_LINKS = NO
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_OUTPUT = xml
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
Expand Down
7 changes: 1 addition & 6 deletions cmake/osal-common.doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 8
Expand Down Expand Up @@ -66,7 +65,6 @@ GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = YES
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
Expand Down Expand Up @@ -128,7 +126,6 @@ HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
HTML_DYNAMIC_SECTIONS = NO
CHM_FILE =
Expand Down Expand Up @@ -175,9 +172,7 @@ MAN_LINKS = NO
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_OUTPUT = xml
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
Expand Down
38 changes: 38 additions & 0 deletions cmake/sample_defs/arch_build_custom.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#
# Example arch_build_custom.cmake
# -------------------------------
#
# This file will be automatically included in the arch-specific build scope
#
# Definitions and options specified here will be used when cross-compiling
# _all_ FSW code for _all_ targets defined in targets.cmake.
#
# Avoid machine-specific code generation options in this file (e.g. -f,-m options); such
# options should be localized to the toolchain file such that they will only be
# included on the machines where they apply.
#
# CAUTION: In heterogeneous environments where different cross compilers are
# used for different CPUs, particularly if from different vendors, it is likely
# that compile options will need to be different as well.
#
# In general, options in this file can only be used in cases where all CPUs use a
# compiler from the same vendor and/or are all GCC based such that they accept similar
# command line options.
#
# This file can alternatively be named as "arch_build_custom_${TARGETSYSTEM}.cmake"
# where ${TARGETSYSTEM} represents the system type, matching the toolchain.
#
# These example options assume a GCC-style toolchain is used for cross compilation,
# and uses the same warning options that are applied at the mission level.
#
add_compile_options(
-std=c99 # Target the C99 standard (without gcc extensions)
-pedantic # Issue all the warnings demanded by strict ISO C
-Wall # Warn about most questionable operations
-Wstrict-prototypes # Warn about missing prototypes
-Wwrite-strings # Warn if not treating string literals as "const"
-Wpointer-arith # Warn about suspicious pointer operations
-Wcast-align # Warn about casts that increase alignment requirements
-Werror # Treat warnings as errors (code should be clean)
)

25 changes: 25 additions & 0 deletions cmake/sample_defs/global_build_options.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# Example global_build_options.cmake
# ----------------------------------
#
# This may set global definitions that apply to ALL targets in ALL scopes,
# including FSW code that is cross-compiled for a target as well as code
# built for the development host itself (native).
#
# As such, it should only invoke basic commands that have wide applicability,
# such as "add_definitions()" for macro definitions that should be set
# globally. It should not include any compiler-specific options that might
# change between compiler vendors or target processor families.
#

# If the OMIT_DEPRECATED flag is specified, then define the respective macros
# that omit the deprecated features from the build. This is conditional in this
# example for CI purposes, so it can be tested both ways. Most projects would
# likely set this only one way.
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)
else()
message (STATUS "OMIT_DEPRECATED=false: Deprecated elements included in build")
endif (OMIT_DEPRECATED)
28 changes: 28 additions & 0 deletions cmake/sample_defs/mission_build_custom.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# Example mission_build_custom.cmake
# ----------------------------------
#
# This file will be automatically included in the top level ("mission") build scope
#
# Definitions and options specified here will be used when building local tools and
# other code that runs on the development host, but do _NOT_ apply to flight software
# (embedded) code or anything built for the target machine.
#
# These options assume a GCC toolchain but a similar set should be applicable to clang.
#
add_compile_options(
-std=c99 # Target the C99 standard (without gcc extensions)
-pedantic # Issue all the warnings demanded by strict ISO C
-Wall # Warn about most questionable operations
-Wstrict-prototypes # Warn about missing prototypes
-Wwrite-strings # Warn if not treating string literals as "const"
-Wpointer-arith # Warn about suspicious pointer operations
-Wcast-align # Warn about casts that increase alignment requirements
-Werror # Treat warnings as errors (code should be clean)
)

# The _XOPEN_SOURCE directive is required for glibc to enable conformance with the
# the X/Open standard version 6, which includes POSIX.1c as well as SUSv2/UNIX98 extensions.
add_definitions(
-D_XOPEN_SOURCE=600
)
14 changes: 0 additions & 14 deletions fsw/cfe-core/src/inc/cfe_sb_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -430,20 +430,6 @@
**/
#define CFE_SB_SUBSCRIPTION_RPT_EID 22


/** \brief <tt> 'Sending Unsubscription Report Msg=0x\%x,Pipe=\%d,Stat=0x\%x' </tt>
** \event <tt> 'Sending Unsubscription Report Msg=0x\%x,Pipe=\%d,Stat=0x\%x' </tt>
**
** \par Type: DEBUG
**
** \par Cause:
**
** This debug event message is issued when SB subscription reporting is enabled,
** (which is disabled by default) and a subscription is successfully received.
**/
#define CFE_SB_UNSUBSCRIPTION_RPT_EID 24


/** \brief <tt> 'Pipe Overflow,MsgId 0x\%x,pipe \%s,stat 0x\%x,app \%s' </tt>
** \event <tt> 'Pipe Overflow,MsgId 0x\%x,pipe \%s,stat 0x\%x,app \%s' </tt>
**
Expand Down
26 changes: 0 additions & 26 deletions fsw/cfe-core/src/sb/cfe_sb_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,6 @@ int32 CFE_SB_UnsubscribeFull(CFE_SB_MsgId_t MsgId,CFE_SB_PipeId_t PipeId,
uint32 PipeIdx;
uint32 TskId = 0;
bool MatchFound = false;
int32 Stat;
CFE_SB_DestinationD_t *DestPtr = NULL;
char FullName[(OS_MAX_API_NAME * 2)];

Expand Down Expand Up @@ -1098,31 +1097,6 @@ int32 CFE_SB_UnsubscribeFull(CFE_SB_MsgId_t MsgId,CFE_SB_PipeId_t PipeId,

}while((MatchFound == false)&&(DestPtr != NULL));

/* if 'Destinations' was decremented to zero above... */
if(RoutePtr->Destinations==0){
CFE_SB.StatTlmMsg.Payload.MsgIdsInUse--;
CFE_SB_RouteIdxPush_Unsync(RouteIdx); /* Return the idx to the available list (stack) for reuse */
CFE_SB_SetRoutingTblIdx(MsgKey,CFE_SB_INVALID_ROUTE_IDX);

/* Send unsubscribe report only if there are zero requests for this pkt */
if((CFE_SB.SubscriptionReporting == CFE_SB_ENABLE)&&
(Scope == CFE_SB_GLOBAL))
{
CFE_SB.SubRprtMsg.Payload.MsgId = MsgId;
CFE_SB.SubRprtMsg.Payload.Pipe = PipeId;
CFE_SB.SubRprtMsg.Payload.Qos.Priority = 0;
CFE_SB.SubRprtMsg.Payload.Qos.Reliability = 0;
CFE_SB.SubRprtMsg.Payload.SubType = CFE_SB_UNSUBSCRIPTION;
CFE_SB_UnlockSharedData(__func__,__LINE__);
Stat = CFE_SB_SendMsg((CFE_SB_Msg_t *)&CFE_SB.SubRprtMsg);
CFE_EVS_SendEventWithAppID(CFE_SB_UNSUBSCRIPTION_RPT_EID,CFE_EVS_EventType_DEBUG,CFE_SB.AppId,
"Sending Unsubscription Report Msg=0x%x,Pipe=%d,Stat=0x%x",
(unsigned int)MsgId,(int)PipeId,(unsigned int)Stat);
CFE_SB_LockSharedData(__func__,__LINE__);
}/* end if */

}/* end if */

CFE_SB_UnlockSharedData(__func__,__LINE__);

CFE_EVS_SendEventWithAppID(CFE_SB_SUBSCRIPTION_REMOVED_EID,CFE_EVS_EventType_DEBUG,CFE_SB.AppId,
Expand Down
4 changes: 2 additions & 2 deletions fsw/cfe-core/src/tbl/cfe_tbl_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,7 @@ int32 CFE_TBL_Modified( CFE_TBL_Handle_t TblHandle )


return Status;
}
} /* End of CFE_TBL_Modified() */


/*******************************************************************
Expand Down Expand Up @@ -1673,7 +1673,7 @@ int32 CFE_TBL_NotifyByMessage(CFE_TBL_Handle_t TblHandle, CFE_SB_MsgId_t MsgId,
}

return Status;
}
} /* End of CFE_TBL_NotifyByMessage() */

/************************/
/* End of File Comment */
Expand Down
18 changes: 9 additions & 9 deletions fsw/cfe-core/src/tbl/cfe_tbl_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ int32 CFE_TBL_EarlyInit (void)

return Status;

}/* end CFE_TBL_EarlyInit */
}/* End CFE_TBL_EarlyInit */


/*******************************************************************
Expand Down Expand Up @@ -304,7 +304,7 @@ void CFE_TBL_InitRegistryRecord (CFE_TBL_RegistryRec_t *RegRecPtr)
RegRecPtr->ActiveBufferIndex = 0;
RegRecPtr->Name[0] = '\0';
RegRecPtr->LastFileLoaded[0] = '\0';
}
} /* End CFE_TBL_InitRegistryRecord */


/*******************************************************************
Expand Down Expand Up @@ -433,7 +433,7 @@ int32 CFE_TBL_CheckAccessRights(CFE_TBL_Handle_t TblHandle, uint32 ThisAppId)
}

return Status;
}
} /* End of CFE_TBL_CheckAccessRights() */

/*******************************************************************
**
Expand Down Expand Up @@ -1033,7 +1033,7 @@ int32 CFE_TBL_LoadFromFile(CFE_TBL_LoadBuff_t *WorkingBufferPtr,
}

return Status;
}
} /* End of CFE_TBL_LoadFromFile() */


/*******************************************************************
Expand Down Expand Up @@ -1167,7 +1167,7 @@ void CFE_TBL_NotifyTblUsersOfUpdate(CFE_TBL_RegistryRec_t *RegRecPtr)

AccessIterator = CFE_TBL_TaskData.Handles[AccessIterator].NextLink;
}
}
} /* End of CFE_TBL_NotifyTblUsersOfUpdate() */

/*******************************************************************
**
Expand Down Expand Up @@ -1422,7 +1422,7 @@ int32 CFE_TBL_CleanUpApp(uint32 AppId)
}

return CFE_SUCCESS;
}
} /* End of CFE_TBL_CleanUpApp() */

/*******************************************************************
**
Expand All @@ -1446,7 +1446,7 @@ void CFE_TBL_FindCriticalTblInfo(CFE_TBL_CritRegRec_t **CritRegRecPtr, CFE_ES_CD
break;
}
}
}
} /* End of CFE_TBL_FindCriticalTblInfo() */


/*******************************************************************
Expand Down Expand Up @@ -1500,7 +1500,7 @@ void CFE_TBL_UpdateCriticalTblCDS(CFE_TBL_RegistryRec_t *RegRecPtr)
}

/* Don't bother notifying the caller of the problem since the active table is still legitimate */
}
} /* End of CFE_TBL_UpdateCriticalTblCDS() */


/*******************************************************************
Expand Down Expand Up @@ -1543,7 +1543,7 @@ int32 CFE_TBL_SendNotificationMsg(CFE_TBL_RegistryRec_t *RegRecPtr)
}

return Status;
}
} /* End of CFE_TBL_SendNotificationMsg() */

/************************/
/* End of File Comment */
Expand Down
35 changes: 0 additions & 35 deletions fsw/cfe-core/src/tbl/cfe_tbl_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -590,41 +590,6 @@ void CFE_TBL_UpdateCriticalTblCDS(CFE_TBL_RegistryRec_t *RegRecPtr);
******************************************************************************/
int32 CFE_TBL_SendNotificationMsg(CFE_TBL_RegistryRec_t *RegRecPtr);


/*****************************************************************************/
/**
** \brief Gathers data and puts it into the Housekeeping Message format
**
** \par Description
** Gathers data from the Table Services Application, computes necessary data values and identifies
** what Table Validation information needs to be reported in Housekeeping Telemetry.
**
** \par Assumptions, External Events, and Notes:
** None
**
** \retval None
******************************************************************************/
extern void CFE_TBL_GetHkData(void);


/*****************************************************************************/
/**
** \brief Convert Table Registry Entry for a Table into a Message
**
** \par Description
** Extracts the Table Registry information for the table specified by the
** #CFE_TBL_TaskData_t::HkTlmTblRegIndex variable. It then formats the
** Registry contents into a format appropriate for downlink.
**
** \par Assumptions, External Events, and Notes:
** #CFE_TBL_TaskData_t::HkTlmTblRegIndex is assumed to be a valid index into
** the Table Registry.
**
** \retval None
******************************************************************************/
extern void CFE_TBL_GetTblRegData(void);


/*****************************************************************************/
/**
** \brief Performs a byte swap on a uint32 integer
Expand Down
Loading