diff --git a/fsw/cfe-core/src/es/cfe_es_task.c b/fsw/cfe-core/src/es/cfe_es_task.c
index 3254e306f..05bd7ae5e 100644
--- a/fsw/cfe-core/src/es/cfe_es_task.c
+++ b/fsw/cfe-core/src/es/cfe_es_task.c
@@ -862,6 +862,7 @@ int32 CFE_ES_StartAppCmd(const CFE_ES_StartApp_t *data)
int32 FilenameLen;
int32 AppEntryLen;
int32 AppNameLen;
+ size_t AppStackSize;
char LocalFile[OS_MAX_PATH_LEN];
char LocalEntryPt[OS_MAX_API_NAME];
char LocalAppName[OS_MAX_API_NAME];
@@ -898,13 +899,6 @@ int32 CFE_ES_StartAppCmd(const CFE_ES_StartApp_t *data)
CFE_EVS_SendEvent(CFE_ES_START_NULL_APP_NAME_ERR_EID, CFE_EVS_EventType_ERROR,
"CFE_ES_StartAppCmd: App Name is NULL.");
}
- else if (cmd->StackSize < CFE_PLATFORM_ES_DEFAULT_STACK_SIZE)
- {
- CFE_ES_TaskData.CommandErrorCounter++;
- CFE_EVS_SendEvent(CFE_ES_START_STACK_ERR_EID, CFE_EVS_EventType_ERROR,
- "CFE_ES_StartAppCmd: Stack size is less than system Minimum: %d.",
- CFE_PLATFORM_ES_DEFAULT_STACK_SIZE);
- }
else if (cmd->Priority > OS_MAX_PRIORITY)
{
CFE_ES_TaskData.CommandErrorCounter++;
@@ -922,15 +916,25 @@ int32 CFE_ES_StartAppCmd(const CFE_ES_StartApp_t *data)
}
else
{
+ /* If stack size was provided, use it, otherwise use default. */
+ if (cmd->StackSize == 0)
+ {
+ AppStackSize = CFE_PLATFORM_ES_DEFAULT_STACK_SIZE;
+ }
+ else
+ {
+ AppStackSize = cmd->StackSize;
+ }
+
/*
** Invoke application loader/startup function.
*/
Result = CFE_ES_AppCreate(&AppID, LocalFile,
LocalEntryPt,
LocalAppName,
- (uint32) cmd->Priority,
- (uint32) cmd->StackSize,
- (uint32) cmd->ExceptionAction);
+ cmd->Priority,
+ AppStackSize,
+ cmd->ExceptionAction);
/*
** Send appropriate event message
diff --git a/fsw/cfe-core/src/inc/cfe_es_events.h b/fsw/cfe-core/src/inc/cfe_es_events.h
index 8b0f4b432..06acbc1fd 100644
--- a/fsw/cfe-core/src/inc/cfe_es_events.h
+++ b/fsw/cfe-core/src/inc/cfe_es_events.h
@@ -488,23 +488,6 @@
**/
#define CFE_ES_START_NULL_APP_NAME_ERR_EID 29
-/** \brief 'CFE_ES_StartAppCmd: Stack size is less than system Minimum: \%d.'
-** \event 'CFE_ES_StartAppCmd: Stack size is less than system Minimum: \%d.'
-**
-** \par Type: ERROR
-**
-** \par Cause:
-**
-** This event message is generated for an error encountered in response
-** to an Executive Services \link #CFE_ES_START_APP_CC Start Application Command \endlink.
-**
-** This message reports a command failure when the Application Stack Size parameter is
-** less than the default stack size defined in the cfe_platform_cfg.h file: CFE_PLATFORM_ES_DEFAULT_STACK_SIZE.
-**
-** The \c 'd' term identifies the size of the stack that was given in the command.
-**/
-#define CFE_ES_START_STACK_ERR_EID 30
-
/** \brief 'CFE_ES_StartAppCmd: Priority is too large: \%d.'
** \event 'CFE_ES_StartAppCmd: Priority is too large: \%d.'
**
diff --git a/fsw/cfe-core/unit-test/es_UT.c b/fsw/cfe-core/unit-test/es_UT.c
index dddfb8ddb..8d12e8a06 100644
--- a/fsw/cfe-core/unit-test/es_UT.c
+++ b/fsw/cfe-core/unit-test/es_UT.c
@@ -2963,7 +2963,7 @@ void TestTask(void)
"CFE_ES_StartAppCmd",
"Invalid exception action");
- /* Test app create with a bad stack size */
+ /* Test app create with a default stack size */
ES_ResetUnitTest();
memset(&CmdBuf, 0, sizeof(CmdBuf));
strncpy((char *) CmdBuf.StartAppCmd.Payload.AppFileName, "filename",
@@ -2978,9 +2978,9 @@ void TestTask(void)
UT_CallTaskPipe(CFE_ES_TaskPipe, &CmdBuf.Msg, sizeof(CFE_ES_StartApp_t),
UT_TPID_CFE_ES_CMD_START_APP_CC);
UT_Report(__FILE__, __LINE__,
- UT_EventIsInHistory(CFE_ES_START_STACK_ERR_EID),
+ UT_EventIsInHistory(CFE_ES_START_INF_EID),
"CFE_ES_StartAppCmd",
- "Stack size too small");
+ "Default Stack Size");
/* Test app create with a bad priority */
ES_ResetUnitTest();