Skip to content

Commit

Permalink
fix nasa#583 - ES start table
Browse files Browse the repository at this point in the history
  • Loading branch information
CDKnightNASA committed Apr 30, 2020
1 parent 0648a47 commit fc9221b
Show file tree
Hide file tree
Showing 20 changed files with 411 additions and 531 deletions.
30 changes: 0 additions & 30 deletions cmake/sample_defs/cpu1_cfe_es_startup.scr

This file was deleted.

12 changes: 6 additions & 6 deletions cmake/sample_defs/cpu1_platform_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -823,33 +823,33 @@


/**
** \cfeescfg ES Nonvolatile Startup Filename
** \cfeescfg ES Nonvolatile Startup Table Filename
**
** \par Description:
** The value of this constant defines the path and name of the file that
** The value of this constant defines the path and name of the table file that
** contains a list of modules that will be loaded and started by the cFE after
** the cFE finishes its startup sequence.
**
** \par Limits
** The length of each string, including the NULL terminator cannot exceed the
** #OS_MAX_PATH_LEN value.
*/
#define CFE_PLATFORM_ES_NONVOL_STARTUP_FILE "/cf/cfe_es_startup.scr"
#define CFE_PLATFORM_ES_NONVOL_TBL_FILE "/cf/cfe_es_start.tbl"


/**
** \cfeescfg ES Volatile Startup Filename
** \cfeescfg ES Volatile Startup Table Filename
**
** \par Description:
** The value of this constant defines the path and name of the file that
** The value of this constant defines the path and name of the table file that
** contains a list of modules that will be loaded and started by the cFE after
** the cFE finishes its startup sequence.
**
** \par Limits
** The length of each string, including the NULL terminator cannot exceed the
** #OS_MAX_PATH_LEN value.
*/
#define CFE_PLATFORM_ES_VOLATILE_STARTUP_FILE "/ram/cfe_es_startup.scr"
#define CFE_PLATFORM_ES_VOLATILE_TBL_FILE "/ram/cfe_es_start.tbl"

/**
** \cfeescfg Default Shell Filename
Expand Down
13 changes: 13 additions & 0 deletions cmake/sample_defs/f
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
** \cfeescfg ES Startup Table Filename
**
** \par Description:
** The value of this constant defines the path and name of the table file that
** contains a list of modules that will be loaded and started by the cFE after
** the cFE finishes its startup sequence.
**
** \par Limits
** The length of each string, including the NULL terminator cannot exceed the
** #OS_MAX_PATH_LEN value.
*/
#define CFE_PLATFORM_ES_TBL_FILE "/cf/cfe_es_start.tbl"
93 changes: 93 additions & 0 deletions cmake/sample_defs/tables/cpu1_cfe_es_start.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/*
** GSC-18128-1, "Core Flight Executive Version 6.7"
**
** Copyright (c) 2006-2019 United States Government as represented by
** the Administrator of the National Aeronautics and Space Administration.
** All Rights Reserved.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/

/*
** File:
** cfe_es_start.c
**
** Purpose:
** Provides the load-time configuration of which shared libraries and applications should
** be loaded into the cFS instance.
**
** References:
**
** Notes:
**
** Modification History:
**
*/

/*
** Required header files.
*/

#include "cfe_tbl_filedef.h" /* Required for the CFE_TBL_FILEDEF macro */
#include "cfe_es_table.h"

CFE_ES_AppLibTbl_t CFE_ES_AppLibTbl = {
/** Libraries **/
.Libs = {
/** { <name> <shared library file path>, <entry point> } **/
{ /* Lib #0 */
.Name = "SAMPLE_LIB",
.FileName = "/cf/sample_lib.so",
.EntryPoint = "SAMPLE_LibInit"
},
},
/** Applications **/
{
/** { <name>, <shared library file path>, <entry point>, <stack size>, <priority>,
<1 == reset processor on err> } **/
{ /* App #0 */
.Name = "SAMPLE_APP",
.FileName = "/cf/sample_app.so",
.EntryPoint = "SAMPLE_AppMain",
.StackSize = 16384,
.Priority = 50,
.ExceptionAction = 0
},
{ /* App #1 */
.Name = "CI_LAB",
.FileName = "/cf/ci_lab.so",
.EntryPoint = "CI_Lab_AppMain",
.StackSize = 16384,
.Priority = 60,
.ExceptionAction = 0
},
{ /* App #2 */
.Name = "TO_LAB",
.FileName = "/cf/to_lab.so",
.EntryPoint = "TO_Lab_AppMain",
.StackSize = 16384,
.Priority = 70,
.ExceptionAction = 0
},
{ /* App #3 */
.Name = "SCH_LAB_APP",
.FileName = "/cf/sch_lab.so",
.EntryPoint = "SCH_Lab_AppMain",
.StackSize = 16384,
.Priority = 80,
.ExceptionAction = 0
},
}
};

CFE_TBL_FILEDEF(CFE_ES_AppLibTbl, CFE_ES.CFE_ES_AppLibTbl, ES App and Lib Table, cfe_es_start.tbl)
3 changes: 0 additions & 3 deletions cmake/sample_defs/targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,12 @@ SET(FT_INSTALL_SUBDIR "host/functional-test")
# Each target board can have its own HW arch selection and set of included apps
SET(TGT1_NAME cpu1)
SET(TGT1_APPLIST sample_app sample_lib ci_lab to_lab sch_lab)
SET(TGT1_FILELIST cfe_es_startup.scr)

# CPU2/3 are duplicates of CPU1. These are not built by default anymore but are
# commented out to serve as an example of how one would configure multiple cpus.
#SET(TGT2_NAME cpu2)
#SET(TGT2_APPLIST sample_app ci_lab to_lab sch_lab)
#SET(TGT2_FILELIST cfe_es_startup.scr)

#SET(TGT3_NAME cpu3)
#SET(TGT3_APPLIST sample_app ci_lab to_lab sch_lab)
#SET(TGT3_FILELIST cfe_es_startup.scr)

2 changes: 1 addition & 1 deletion cmake/target/src/target_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Target_CfeConfigData GLOBAL_CFE_CONFIGDATA =
* Default values for Startup file.
* This is a suggested value, but the PSP may provide a different file
*/
.NonvolStartupFile = CFE_PLATFORM_ES_NONVOL_STARTUP_FILE,
.NonvolStartupFile = CFE_PLATFORM_ES_NONVOL_TBL_FILE,

/*
* Sizes of other memory segments
Expand Down
3 changes: 1 addition & 2 deletions fsw/cfe-core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ foreach(MODULE ${CFE_CORE_MODULES} config shared)
endforeach(MODULE ${CFE_CORE_MODULES})

add_library(${CFE_CORE_TARGET} STATIC ${CFE_ALL_MODULE_SRCS})
add_cfe_tables(ES cfe_es_start.c)

if (ENABLE_UNIT_TESTS)
add_subdirectory(unit-test)
endif (ENABLE_UNIT_TESTS)


Loading

0 comments on commit fc9221b

Please sign in to comment.