Skip to content

Commit

Permalink
fix nasa#583 - strawman for CCB consideration, UT not working!
Browse files Browse the repository at this point in the history
  • Loading branch information
CDKnightNASA committed Apr 7, 2020
1 parent f1be048 commit 17de99b
Show file tree
Hide file tree
Showing 12 changed files with 179 additions and 346 deletions.
30 changes: 0 additions & 30 deletions cmake/sample_defs/cpu1_cfe_es_startup.scr

This file was deleted.

20 changes: 3 additions & 17 deletions cmake/sample_defs/cpu1_platform_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -823,34 +823,20 @@


/**
** \cfeescfg ES Nonvolatile Startup Filename
** \cfeescfg ES 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_TBL_FILE "/cf/cfe_es_start.tbl"


/**
** \cfeescfg ES Volatile Startup Filename
**
** \par Description:
** The value of this constant defines the path and name of the 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"

/**
** \cfeescfg Default Shell Filename
**
Expand Down
67 changes: 67 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,67 @@
/*
** 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 = {
/** \brief number of entries in the library array **/
1,
/** Entries **/
{
/** { <shared library file path>, <entry point>, <name> } **/
{"/cf/sample_lib.so", "SAMPLE_LibInit", "SAMPLE_LIB"},
{}
},
/** \brief number of entries in the application array **/
4,
/** Entries **/
{
/** { <shared library file path>, <entry point>, <name>, <stack size>, <priority>,
<1 == reset processor on err> } **/
{"/cf/sample_app.so", "SAMPLE_AppMain", "SAMPLE_APP", 16384, 50, 0},
{"/cf/ci_lab.so", "CI_Lab_AppMain", "CI_LAB_APP", 16384, 60, 0},
{"/cf/to_lab.so", "TO_Lab_AppMain", "TO_LAB_APP", 16384, 70, 0},
{"/cf/sch_lab.so", "SCH_Lab_AppMain", "SCH_LAB_APP", 16384, 80, 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)

5 changes: 3 additions & 2 deletions cmake/target/src/target_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "cfe_mission_cfg.h"
#include "cfe_platform_cfg.h"
#include "cfe_es.h"
#include "cfe_es_table.h"
#include "cfe_time.h"
#include "cfecfs_version_info.h"
#include "cfecfs_build_info.h"
Expand Down Expand Up @@ -63,11 +64,11 @@ Target_CfeConfigData GLOBAL_CFE_CONFIGDATA =
.SystemMain = CFE_ES_Main,
.SystemExceptionISR = CFE_ES_ProcessCoreException,

/*
/* TODO: remove, or replace with the name of the table?
* 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_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 17de99b

Please sign in to comment.