Skip to content

Commit

Permalink
Merge pull request nasa#649 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
Integration Candidate: 2020-04-22
  • Loading branch information
astrogeco authored May 1, 2020
2 parents 3c616f2 + 4de29bd commit 20c25c2
Show file tree
Hide file tree
Showing 21 changed files with 516 additions and 441 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,48 @@ This is a collection of services and associated framework to be located in the `

## Version History

#### Development Build: 6.7.15

- Upon power on reset, default system log mode set to overwrite. Upon processor reset, default system log mode set to discard.
- No longer locks while locked (no issue observed on linux/posix, but user reported issue on FreeRTOS 10)
- Internal `CFE_TBL_LoadFromFile()` API changed slightly to add AppName as a parameter. Return value from `LoadFromFile()` no longer relevant for event generation.
- Updates `CFE_TBL_CleanUpApp` such that it now checks the 'used flag' prior to calling `CFE_TBL_RemoveAccessLink` for a given TblHandle. Also sets the AppId to `CFE_TBL_NOT_OWNED` after removing the access descriptor link from linked list.
- Removed `OS_FS_SUCCESS, OS_FS_ERROR , OS_FS_ERR_INVALID_POINTER, OS_FS_ERR_NO_FREE_FDS , OS_FS_ERR_INVALID_FD, and OS_FS_UNIMPLEMENTED` from `osapi-os-filesys.h`
- See https://github.com/nasa/cFE/pull/649 for more details

#### 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)

Expand All @@ -45,41 +60,50 @@ This is a collection of services and associated framework to be located in the `
- 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)
Expand Down
38 changes: 28 additions & 10 deletions cmake/sample_defs/cpu1_platform_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1005,22 +1005,40 @@
#define CFE_PLATFORM_ES_DEFAULT_CDS_REG_DUMP_FILE "/ram/cfe_cds_reg.log"

/**
** \cfeescfg Define Default System Log Mode
** \cfeescfg Define Default System Log Mode following Power On Reset
**
** \par Description:
** Defines the default mode for the operation of the ES System log. The log may
** operate in either Overwrite mode = 0, where once the log becomes full the
** oldest message in the log will be overwritten, or Discard mode = 1, where
** once the log becomes full the contents of the log are preserved and the new
** event is discarded. This constant may hold a value of either 0 or 1
** depending on the desired default log mode. Overwrite Mode = 0, Discard
** Mode = 1.
** Defines the default mode for the operation of the ES System log following a power
** on reset. The log may operate in either Overwrite mode = 0, where once the
** log becomes full the oldest message in the log will be overwritten, or
** Discard mode = 1, where once the log becomes full the contents of the log are
** preserved and the new event is discarded. This constant may hold a value of
** either 0 or 1 depending on the desired default.
** Overwrite Mode = 0, Discard Mode = 1.
**
** \par Limits
** There is a lower limit of 0 and an upper limit of 1 on this configuration
** paramater.
*/
#define CFE_PLATFORM_ES_DEFAULT_POR_SYSLOG_MODE 0

/**
** \cfeescfg Define Default System Log Mode following Processor Reset
**
** \par Description:
** Defines the default mode for the operation of the ES System log following a
** processor reset. The log may operate in either Overwrite mode = 0, where once
** the log becomes full the oldest message in the log will be overwritten, or
** Discard mode = 1, where once the log becomes full the contents of the log are
** preserved and the new event is discarded. This constant may hold a value of
** either 0 or 1 depending on the desired default.
** Overwrite Mode = 0, Discard Mode = 1.
**
** \par Limits
** There is a lower limit of 0 and an upper limit of 1 on this configuration
** paramater.
*/
#define CFE_PLATFORM_ES_DEFAULT_SYSLOG_MODE 1
#define CFE_PLATFORM_ES_DEFAULT_PR_SYSLOG_MODE 1

/**
** \cfeescfg Define Max Number of Performance IDs
Expand Down Expand Up @@ -1997,7 +2015,7 @@
#define CFE_ES_DEFAULT_ER_LOG_FILE CFE_PLATFORM_ES_DEFAULT_ER_LOG_FILE
#define CFE_ES_DEFAULT_PERF_DUMP_FILENAME CFE_PLATFORM_ES_DEFAULT_PERF_DUMP_FILENAME
#define CFE_ES_DEFAULT_CDS_REG_DUMP_FILE CFE_PLATFORM_ES_DEFAULT_CDS_REG_DUMP_FILE
#define CFE_ES_DEFAULT_SYSLOG_MODE CFE_PLATFORM_ES_DEFAULT_SYSLOG_MODE
#define CFE_ES_DEFAULT_SYSLOG_MODE CFE_PLATFORM_ES_DEFAULT_PR_SYSLOG_MODE
#define CFE_ES_PERF_MAX_IDS CFE_PLATFORM_ES_PERF_MAX_IDS
#define CFE_ES_PERF_DATA_BUFFER_SIZE CFE_PLATFORM_ES_PERF_DATA_BUFFER_SIZE
#define CFE_ES_PERF_FILTMASK_NONE CFE_PLATFORM_ES_PERF_FILTMASK_NONE
Expand Down
2 changes: 1 addition & 1 deletion fsw/cfe-core/src/es/cfe_es_apps.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ void CFE_ES_StartApplications(uint32 ResetType, const char *StartFilePath )
while(1)
{
ReadStatus = OS_read(AppFile, &c, 1);
if ( ReadStatus == OS_FS_ERROR )
if ( ReadStatus == OS_ERROR )
{
CFE_ES_WriteToSysLog ("ES Startup: Error Reading Startup file. EC = 0x%08X\n",(unsigned int)ReadStatus);
break;
Expand Down
18 changes: 9 additions & 9 deletions fsw/cfe-core/src/es/cfe_es_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ int32 CFE_ES_ShellOutputCommand(const char * CmdString, const char *Filename)

fd = OS_creat(Filename, OS_READ_WRITE);

if (fd < OS_FS_SUCCESS)
if (fd < OS_SUCCESS)
{
Result = OS_FS_ERROR;
Result = OS_ERROR;
}

else
Expand Down Expand Up @@ -113,11 +113,11 @@ int32 CFE_ES_ShellOutputCommand(const char * CmdString, const char *Filename)
/* seek to the end of the file to get it's size */
FileSize = OS_lseek(fd,0,OS_SEEK_END);

if (FileSize == OS_FS_ERROR)
if (FileSize == OS_ERROR)
{
OS_close(fd);
CFE_ES_WriteToSysLog("OS_lseek call failed from CFE_ES_ShellOutputCmd 1\n");
Result = OS_FS_ERROR;
Result = OS_ERROR;
}


Expand Down Expand Up @@ -153,11 +153,11 @@ int32 CFE_ES_ShellOutputCommand(const char * CmdString, const char *Filename)
/* seek to the end of the file again to get it's new size */
FileSize = OS_lseek(fd,0,OS_SEEK_END);

if (FileSize == OS_FS_ERROR)
if (FileSize == OS_ERROR)
{
OS_close(fd);
CFE_ES_WriteToSysLog("OS_lseek call failed from CFE_ES_ShellOutputCmd 2\n");
Result = OS_FS_ERROR;
Result = OS_ERROR;
}


Expand Down Expand Up @@ -210,9 +210,9 @@ int32 CFE_ES_ShellOutputCommand(const char * CmdString, const char *Filename)

/* Close the file descriptor */
OS_close(fd);
} /* if FilseSize == OS_FS_ERROR */
} /* if FileSeize == OS_FS_ERROR */
}/* if fd < OS_FS_SUCCESS */
} /* if FilseSize == OS_ERROR */
} /* if FileSeize == OS_ERROR */
}/* if fd < OS_SUCCESS */


/* cppcheck-suppress duplicateExpression */
Expand Down
18 changes: 9 additions & 9 deletions fsw/cfe-core/src/es/cfe_es_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ void CFE_ES_InitializeFileSystems(uint32 StartType)
if ( StartType == CFE_PSP_RST_TYPE_POWERON )
{
RetStatus = OS_mkfs((void *)RamDiskMemoryAddress, "/ramdev0", "RAM", CFE_PLATFORM_ES_RAM_DISK_SECTOR_SIZE, CFE_PLATFORM_ES_RAM_DISK_NUM_SECTORS );
if ( RetStatus != OS_FS_SUCCESS )
if ( RetStatus != OS_SUCCESS )
{
CFE_ES_WriteToSysLog("ES Startup: Error Creating Volatile(RAM) Volume. EC = 0x%08X\n",(unsigned int)RetStatus);

Expand All @@ -558,7 +558,7 @@ void CFE_ES_InitializeFileSystems(uint32 StartType)
else
{
RetStatus = OS_initfs((void *)RamDiskMemoryAddress, "/ramdev0", "RAM", CFE_PLATFORM_ES_RAM_DISK_SECTOR_SIZE, CFE_PLATFORM_ES_RAM_DISK_NUM_SECTORS );
if ( RetStatus != OS_FS_SUCCESS )
if ( RetStatus != OS_SUCCESS )
{
CFE_ES_WriteToSysLog("ES Startup: Error Initializing Volatile(RAM) Volume. EC = 0x%08X\n",(unsigned int)RetStatus);
CFE_ES_WriteToSysLog("ES Startup: Formatting Volatile(RAM) Volume.\n");
Expand Down Expand Up @@ -586,7 +586,7 @@ void CFE_ES_InitializeFileSystems(uint32 StartType)
** Now, mount the RAM disk
*/
RetStatus = OS_mount("/ramdev0", CFE_PLATFORM_ES_RAM_DISK_MOUNT_STRING);
if ( RetStatus != OS_FS_SUCCESS )
if ( RetStatus != OS_SUCCESS )
{
CFE_ES_WriteToSysLog("ES Startup: Error Mounting Volatile(RAM) Volume. EC = 0x%08X\n",(unsigned int)RetStatus);
/*
Expand Down Expand Up @@ -642,14 +642,14 @@ void CFE_ES_InitializeFileSystems(uint32 StartType)
** First, unmount the disk
*/
RetStatus = OS_unmount(CFE_PLATFORM_ES_RAM_DISK_MOUNT_STRING);
if ( RetStatus == OS_FS_SUCCESS )
if ( RetStatus == OS_SUCCESS )
{

/*
** Remove the file system from the OSAL
*/
RetStatus = OS_rmfs("/ramdev0");
if ( RetStatus == OS_FS_SUCCESS )
if ( RetStatus == OS_SUCCESS )
{

/*
Expand All @@ -658,13 +658,13 @@ void CFE_ES_InitializeFileSystems(uint32 StartType)
RetStatus = OS_mkfs((void *)RamDiskMemoryAddress, "/ramdev0",
"RAM", CFE_PLATFORM_ES_RAM_DISK_SECTOR_SIZE,
CFE_PLATFORM_ES_RAM_DISK_NUM_SECTORS );
if ( RetStatus == OS_FS_SUCCESS )
if ( RetStatus == OS_SUCCESS )
{
/*
** Last, remount the disk
*/
RetStatus = OS_mount("/ramdev0", CFE_PLATFORM_ES_RAM_DISK_MOUNT_STRING);
if ( RetStatus != OS_FS_SUCCESS )
if ( RetStatus != OS_SUCCESS )
{
CFE_ES_WriteToSysLog("ES Startup: Error Re-Mounting Volatile(RAM) Volume. EC = 0x%08X\n",(unsigned int)RetStatus);
/*
Expand Down Expand Up @@ -869,7 +869,7 @@ void CFE_ES_CreateObjects(void)
*/
if ( CFE_ES_Global.TaskTable[TaskIndex].RecordUsed == true )
{
CFE_ES_WriteToSysLog("ES Startup: CFE_ES_Global.TaskTable record used error for App: %s, continuing.\n",
CFE_ES_SysLogWrite_Unsync("ES Startup: CFE_ES_Global.TaskTable record used error for App: %s, continuing.\n",
CFE_ES_ObjectTable[i].ObjectName);
}
else
Expand All @@ -881,7 +881,7 @@ void CFE_ES_CreateObjects(void)
strncpy((char *)CFE_ES_Global.TaskTable[TaskIndex].TaskName, (char *)CFE_ES_Global.AppTable[j].TaskInfo.MainTaskName, OS_MAX_API_NAME);
CFE_ES_Global.TaskTable[TaskIndex].TaskName[OS_MAX_API_NAME - 1] = '\0';

CFE_ES_WriteToSysLog("ES Startup: Core App: %s created. App ID: %d\n",
CFE_ES_SysLogWrite_Unsync("ES Startup: Core App: %s created. App ID: %d\n",
CFE_ES_ObjectTable[i].ObjectName,j);

/*
Expand Down
13 changes: 10 additions & 3 deletions fsw/cfe-core/src/es/cfe_es_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,16 @@ int32 CFE_ES_TaskInit(void)
CFE_ES_TaskData.LimitCmd = 4;

/*
** Initialize systemlog to default mode
** Initialize systemlog to default Power On or Processor Reset mode
*/
CFE_ES_ResetDataPtr->SystemLogMode = CFE_PLATFORM_ES_DEFAULT_SYSLOG_MODE;
if (CFE_ES_GetResetType(NULL) == CFE_PSP_RST_TYPE_POWERON)
{
CFE_ES_ResetDataPtr->SystemLogMode = CFE_PLATFORM_ES_DEFAULT_POR_SYSLOG_MODE;
}
else
{
CFE_ES_ResetDataPtr->SystemLogMode = CFE_PLATFORM_ES_DEFAULT_PR_SYSLOG_MODE;
}

/*
** Register event filter table.
Expand Down Expand Up @@ -1887,7 +1894,7 @@ int32 CFE_ES_DumpCDSRegistryCmd(const CFE_ES_DumpCDSRegistry_t *data)
/* Create a new dump file, overwriting anything that may have existed previously */
FileDescriptor = OS_creat(DumpFilename, OS_WRITE_ONLY);

if (FileDescriptor >= OS_FS_SUCCESS)
if (FileDescriptor >= OS_SUCCESS)
{
/* Initialize the standard cFE File Header for the Dump File */
CFE_FS_InitHeader(&StdFileHeader, "CDS_Registry", CFE_FS_SubType_ES_CDS_REG);
Expand Down
2 changes: 1 addition & 1 deletion fsw/cfe-core/src/evs/cfe_evs_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ int32 CFE_EVS_WriteLogDataFileCmd(const CFE_EVS_WriteLogDataFile_t *data)
/* Create the log file */
LogFileHandle = OS_creat(LogFilename, OS_WRITE_ONLY);

if (LogFileHandle < OS_FS_SUCCESS)
if (LogFileHandle < OS_SUCCESS)
{
EVS_SendEvent(CFE_EVS_ERR_CRLOGFILE_EID, CFE_EVS_EventType_ERROR,
"Write Log File Command Error: OS_creat = 0x%08X, filename = %s",
Expand Down
2 changes: 1 addition & 1 deletion fsw/cfe-core/src/evs/cfe_evs_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -1753,7 +1753,7 @@ int32 CFE_EVS_WriteAppDataFileCmd(const CFE_EVS_WriteAppDataFile_t *data)
/* Create Application Data File */
FileHandle = OS_creat(LocalName, OS_WRITE_ONLY);

if (FileHandle < OS_FS_SUCCESS)
if (FileHandle < OS_SUCCESS)
{
EVS_SendEvent(CFE_EVS_ERR_CRDATFILE_EID, CFE_EVS_EventType_ERROR,
"Write App Data Command Error: OS_creat = 0x%08X, filename = %s",
Expand Down
2 changes: 1 addition & 1 deletion fsw/cfe-core/src/fs/cfe_fs_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ int32 CFE_FS_SetTimestamp(int32 FileDes, CFE_TIME_SysTime_t NewTimestamp)

if (Result == sizeof(OutTimestamp.Subseconds))
{
Result = OS_FS_SUCCESS;
Result = OS_SUCCESS;
}
else
{
Expand Down
18 changes: 15 additions & 3 deletions fsw/cfe-core/src/inc/cfe_error.h
Original file line number Diff line number Diff line change
Expand Up @@ -807,12 +807,12 @@
#define CFE_OS_ERR_NAME_NOT_FOUND (OS_ERR_NAME_NOT_FOUND) /**< @brief DEPRECATED @deprecated */
#define CFE_OS_ERR_SEM_NOT_FULL (OS_ERR_SEM_NOT_FULL) /**< @brief DEPRECATED @deprecated */
#define CFE_OS_ERR_INVALID_PRIORITY (OS_ERR_INVALID_PRIORITY) /**< @brief DEPRECATED @deprecated */
#define CFE_OS_FS_ERROR (OS_FS_ERROR) /**< @brief DEPRECATED @deprecated */
#define CFE_OS_FS_ERR_INVALID_POINTER (OS_FS_ERR_INVALID_POINTER) /**< @brief DEPRECATED @deprecated */
#define CFE_OS_FS_ERROR (OS_ERROR) /**< @brief DEPRECATED @deprecated */
#define CFE_OS_FS_ERR_INVALID_POINTER (OS_INVALID_POINTER) /**< @brief DEPRECATED @deprecated */
#define CFE_OS_FS_ERR_PATH_TOO_LONG (OS_FS_ERR_PATH_TOO_LONG) /**< @brief DEPRECATED @deprecated */
#define CFE_OS_FS_ERR_NAME_TOO_LONG (OS_FS_ERR_NAME_TOO_LONG) /**< @brief DEPRECATED @deprecated */
#define CFE_OS_FS_ERR_DRIVE_NOT_CREATED (OS_FS_ERR_DRIVE_NOT_CREATED) /**< @brief DEPRECATED @deprecated */
#define CFE_OSAPI_NOT_IMPLEMENTED (OS_FS_UNIMPLEMENTED) /**< @brief DEPRECATED @deprecated */
#define CFE_OSAPI_NOT_IMPLEMENTED (OS_ERR_NOT_IMPLEMENTED) /**< @brief DEPRECATED @deprecated */

#endif /* CFE_OMIT_DEPRECATED_6_7 */

Expand Down Expand Up @@ -1420,6 +1420,18 @@
*/
#define CFE_TBL_MESSAGE_ERROR ((int32)0xcc00002a)

/**
** Error code indicating that the TBL file is shorter than
** indicated in the file header.
*/
#define CFE_TBL_ERR_SHORT_FILE ((int32)0xcc00002b)

/**
** Error code indicating that the TBL file could not be
** opened by the OS.
*/
#define CFE_TBL_ERR_ACCESS ((int32)0xcc00002c)


/**
* @brief Not Implemented
Expand Down
Loading

0 comments on commit 20c25c2

Please sign in to comment.