Skip to content

Commit

Permalink
TEST: Add GSFC apps
Browse files Browse the repository at this point in the history
  • Loading branch information
skliper committed Aug 8, 2024
1 parent f378320 commit 25438a6
Show file tree
Hide file tree
Showing 33 changed files with 3,932 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Makefile
build
/sample_defs
.DS_Store
.vscode
30 changes: 30 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,33 @@
path = tools/tblCRCTool
url = https://github.com/nasa/tblCRCTool.git
branch = main
[submodule "apps/cf"]
path = apps/cf
url = https://github.com/nasa/cf
[submodule "apps/cs"]
path = apps/cs
url = https://github.com/nasa/CS
[submodule "apps/ds"]
path = apps/ds
url = https://github.com/nasa/DS
[submodule "apps/fm"]
path = apps/fm
url = https://github.com/nasa/FM
[submodule "apps/hk"]
path = apps/hk
url = https://github.com/nasa/HK
[submodule "apps/hs"]
path = apps/hs
url = https://github.com/nasa/HS
[submodule "apps/lc"]
path = apps/lc
url = https://github.com/nasa/LC
[submodule "apps/md"]
path = apps/md
url = https://github.com/nasa/MD
[submodule "apps/mm"]
path = apps/mm
url = https://github.com/nasa/MM
[submodule "apps/sc"]
path = apps/sc
url = https://github.com/nasa/SC
1 change: 1 addition & 0 deletions apps/cf
Submodule cf added at 5e1cfc
1 change: 1 addition & 0 deletions apps/cs
Submodule cs added at f958cc
1 change: 1 addition & 0 deletions apps/ds
Submodule ds added at 8647f3
1 change: 1 addition & 0 deletions apps/fm
Submodule fm added at 0a9099
1 change: 1 addition & 0 deletions apps/hk
Submodule hk added at a42147
1 change: 1 addition & 0 deletions apps/hs
Submodule hs added at e5d77d
1 change: 1 addition & 0 deletions apps/lc
Submodule lc added at 776ef6
1 change: 1 addition & 0 deletions apps/md
Submodule md added at 40aeed
1 change: 1 addition & 0 deletions apps/mm
Submodule mm added at b8fb57
1 change: 1 addition & 0 deletions apps/sc
Submodule sc added at 83ee61
39 changes: 39 additions & 0 deletions sample_defs/arch_build_custom.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#
# 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
-Werror # Treat warnings as errors (code should be clean)
-Wno-format-truncation # Inhibit printf-style format truncation warnings
-Wno-stringop-truncation # Inhibit string operation truncation warnings
)

12 changes: 12 additions & 0 deletions sample_defs/arch_build_custom_native.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# Example arch_build_custom.cmake
# -------------------------------
#
# On native builds only, add strict cast alignment warnings
# This requires a newer version of gcc
#
add_compile_options(
-Wcast-align=strict # Warn about casts that increase alignment requirements
-fno-common # Do not use a common section for globals
)

43 changes: 43 additions & 0 deletions sample_defs/cpu1_cfe_es_startup.scr
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
CFE_LIB, cfe_assert, CFE_Assert_LibInit, ASSERT_LIB, 0, 0, 0x0, 0;
CFE_LIB, sample_lib, SAMPLE_LIB_Init, SAMPLE_LIB, 0, 0, 0x0, 0;
CFE_APP, sample_app, SAMPLE_APP_Main, SAMPLE_APP, 50, 16384, 0x0, 0;
CFE_APP, ci_lab, CI_LAB_AppMain, CI_LAB_APP, 60, 16384, 0x0, 0;
CFE_APP, to_lab, TO_LAB_AppMain, TO_LAB_APP, 70, 16384, 0x0, 0;
CFE_APP, sch_lab, SCH_LAB_AppMain, SCH_LAB_APP, 80, 16384, 0x0, 0;
CFE_APP, cf, CF_AppMain, CF, 90, 8192, 0x0, 0;
CFE_APP, cs, CS_AppMain, CS, 90, 8192, 0x0, 0;
CFE_APP, ds, DS_AppMain, DS, 90, 8192, 0x0, 0;
CFE_APP, fm, FM_AppMain, FM, 90, 8192, 0x0, 0;
CFE_APP, hk, HK_AppMain, HK, 90, 8192, 0x0, 0;
CFE_APP, hs, HS_AppMain, HS, 90, 8192, 0x0, 0;
CFE_APP, lc, LC_AppMain, LC, 90, 8192, 0x0, 0;
CFE_APP, mm, MM_AppMain, MM, 90, 8192, 0x0, 0;
CFE_APP, sc, SC_AppMain, SC, 90, 8192, 0x0, 0;
CFE_APP, md, MD_AppMain, MD, 90, 8192, 0x0, 0;
!
! Startup script fields:
! 1. Object Type -- CFE_APP for an Application, or CFE_LIB for a library.
! 2. Path/Filename -- This is a cFE Virtual filename, not a vxWorks device/pathname
! 3. Entry Point -- This is the "main" function for Apps.
! 4. CFE Name -- The cFE name for the APP or Library
! 5. Priority -- This is the Priority of the App, not used for Library
! 6. Stack Size -- This is the Stack size for the App, not used for the Library
! 7. Load Address -- This is the Optional Load Address for the App or Library. Currently not implemented
! so keep it at 0x0.
! 8. Exception Action -- This is the Action the cFE should take if the App has an exception.
! 0 = Just restart the Application
! Non-Zero = Do a cFE Processor Reset
!
! Other Notes:
! 1. The software will not try to parse anything after the first '!' character it sees. That
! is the End of File marker.
! 2. Common Application file extensions:
! Linux = .so ( ci.so )
! OS X = .bundle ( ci.bundle )
! Cygwin = .dll ( ci.dll )
! vxWorks = .o ( ci.o )
! RTEMS with S-record Loader = .s3r ( ci.s3r )
! RTEMS with CEXP Loader = .o ( ci.o )
! 3. The filename field (2) no longer requires a fully-qualified filename; the path and extension
! may be omitted. If omitted, the standard virtual path (/cf) and a platform-specific default
! extension will be used, which is derived from the build system.
35 changes: 35 additions & 0 deletions sample_defs/default_osconfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
##########################################################################
#
# CFE-specific configuration options for OSAL
#
# This file specifies the CFE-specific values for various compile options
# supported by OSAL.
#
# OSAL has many configuration options, which may vary depending on the
# specific version of OSAL in use. The complete list of OSAL options,
# along with a description of each, can be found OSAL source in the file:
#
# osal/default_config.cmake
#
# A CFE framework build utilizes mostly the OSAL default configuration.
# This file only contains a few specific overrides that tune for a debug
# environment, rather than a deployment environment.
#
# ALSO NOTE: There is also an arch-specific addendum to this file
# to allow further tuning on a per-arch basis, in the form of:
#
# ${TOOLCHAIN_NAME}_osconfig.cmake
#
# See "native_osconfig.cmake" for options which apply only to "native" builds.
#
##########################################################################

#
# OSAL_CONFIG_DEBUG_PRINTF
# ------------------------
#
# For CFE builds this can be helpful during debugging as it will display more
# specific error messages for various OSAL error/warning events, such as if a
# module cannot be loaded or a file cannot be opened for some reason.
#
set(OSAL_CONFIG_DEBUG_PRINTF TRUE)
117 changes: 117 additions & 0 deletions sample_defs/eds/cfe-topicids.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
This document adheres to the Electronic Data Sheet (EDS) XML schema
as prescribed in CCSDS book 876.0.
Purpose:
This describes stardard data types used throughout the Core Flight System
-->
<DesignParameters>
<Package name="CFE_MISSION" shortDescription="Definitions and Data Types for the CFE Project/Mission">

<!--
Define how the topic ID table is arranged into commands and telemetry
Note that this works in tandem with the C implementation of the mapping functions in cfe_missionlib
The default/reference implementation of the TC/TM component mappings uses a flat topic ID table
where one portion of this table represents commands and the other porition represents telemetry, and
the entire table should be small enough that direct lookup tables can be generated without hogging
too much memory.
In this implementation the BASE is inclusive and the MAX is exclusive, just like C arrays.
The real values will start at 1 and zero should be reserved as an invalid index.
Also note that it is entirely possible to write a plugin script for the toolchain that could generate
all of these topic ID indices based on the presence of EDS files. However, that would affect backward
compatibility as topic IDs (and therefore APIDs) could get reassigned more frequently as configuration
changes are made. Such changes would not be an issue if EDS were used across the board, but until that
milestone is met, this manually-specified approach offers more stability in distributed systems.
-->
<Define name="TELECOMMAND_NUM_TOPICIDS" value="60" />
<Define name="TELEMETRY_NUM_TOPICIDS" value="60" />

<Define name="TELECOMMAND_BASE_TOPICID" value="1" />
<Define name="TELECOMMAND_MAX_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + ${CFE_MISSION/TELECOMMAND_NUM_TOPICIDS}" />
<Define name="TELEMETRY_BASE_TOPICID" value="${CFE_MISSION/TELECOMMAND_MAX_TOPICID}" />
<Define name="TELEMETRY_MAX_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + ${CFE_MISSION/TELEMETRY_NUM_TOPICIDS}" />
<Define name="MAX_TOPICID" value="${CFE_MISSION/TELEMETRY_MAX_TOPICID}" />

<!-- Mission-specific mappings for CFE "topic IDs" -->
<!-- Executive Services (ES) Command Topics -->
<Define name="ES_CMD_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 0" />
<Define name="ES_SEND_HK_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 1" />
<!-- Time Services (TIME) Command Topics -->
<Define name="TIME_CMD_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 2" />
<Define name="TIME_TONE_CMD_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 3" />
<Define name="TIME_ONEHZ_CMD_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 4" />
<Define name="TIME_SEND_HK_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 5" />
<Define name="TIME_DATA_CMD_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 6" />
<Define name="TIME_FAKE_CMD_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 7" />
<Define name="TIME_SEND_CMD_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 8" />
<!-- Event Services (EVS) Command Topics -->
<Define name="EVS_CMD_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 9" />
<Define name="EVS_SEND_HK_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 10" />
<!-- Software Bus (SB) Command Topics -->
<Define name="SB_CMD_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 11" />
<Define name="SB_SEND_HK_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 12" />
<!-- Table Services (TBL) Command Topics -->
<Define name="TBL_CMD_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 13" />
<Define name="TBL_SEND_HK_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 14" />

<Define name="CI_LAB_CMD_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 15" />
<Define name="CI_LAB_SEND_HK_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 16" />
<Define name="TO_LAB_CMD_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 17" />
<Define name="TO_LAB_SEND_HK_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 18" />
<Define name="SAMPLE_APP_CMD_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 19" />
<Define name="SAMPLE_APP_SEND_HK_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 20" />
<Define name="SB_SUB_RPT_CTRL_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 21" />
<Define name="TEST_CMD_TOPICID" value="${CFE_MISSION/TELECOMMAND_BASE_TOPICID} + 22" />

<!-- Executive Services (ES) Telemetry Topics -->
<Define name="ES_HK_TLM_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + 0" />
<Define name="ES_APP_TLM_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + 1" />
<Define name="ES_SHELL_TLM_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + 2" />
<Define name="ES_MEMSTATS_TLM_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + 3" />
<!-- Time Services (TIME) Telemetry Topics -->
<Define name="TIME_HK_TLM_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + 4" />
<Define name="TIME_DIAG_TLM_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + 5" />
<!-- Event Services (EVS) Telemetry Topics -->
<Define name="EVS_HK_TLM_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + 6" />
<Define name="EVS_SHORT_EVENT_MSG_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + 7" />
<Define name="EVS_LONG_EVENT_MSG_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + 8" />
<!-- Software Bus (SB) Telemetry Topics -->
<Define name="SB_HK_TLM_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + 9" />
<Define name="SB_STATS_TLM_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + 10" />
<Define name="SB_ALLSUBS_TLM_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + 11" />
<Define name="SB_ONESUB_TLM_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + 12" />
<!-- Table Services (TBL) Telemetry Topics -->
<Define name="TBL_HK_TLM_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + 13" />
<Define name="TBL_REG_TLM_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + 14" />

<Define name="CI_LAB_HK_TLM_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + 15" />
<Define name="TO_LAB_HK_TLM_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + 16" />
<Define name="TO_LAB_DATA_TYPES_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + 17" />
<Define name="SAMPLE_APP_HK_TLM_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + 18" />
<Define name="TEST_HK_TLM_TOPICID" value="${CFE_MISSION/TELEMETRY_BASE_TOPICID} + 19" />

</Package>
</DesignParameters>
Loading

0 comments on commit 25438a6

Please sign in to comment.