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 2, 2023
1 parent bfac3db commit 2b5dc63
Show file tree
Hide file tree
Showing 32 changed files with 3,340 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 d40193
1 change: 1 addition & 0 deletions apps/cs
Submodule cs added at bd4dd1
1 change: 1 addition & 0 deletions apps/ds
Submodule ds added at 2a6c6a
1 change: 1 addition & 0 deletions apps/fm
Submodule fm added at 98283b
1 change: 1 addition & 0 deletions apps/hk
Submodule hk added at 406ec6
1 change: 1 addition & 0 deletions apps/hs
Submodule hs added at 4d38d4
1 change: 1 addition & 0 deletions apps/lc
Submodule lc added at feb5bf
1 change: 1 addition & 0 deletions apps/md
Submodule md added at 7c7a54
1 change: 1 addition & 0 deletions apps/mm
Submodule mm added at 9535a0
1 change: 1 addition & 0 deletions apps/sc
Submodule sc added at c7a386
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
)

11 changes: 11 additions & 0 deletions sample_defs/arch_build_custom_native.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#
# 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
)

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.
131 changes: 131 additions & 0 deletions sample_defs/cpu1_msgids.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
/************************************************************************
* NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes”
*
* Copyright (c) 2020 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
*
* Purpose:
* This header file contains the Message Id's for messages used by the
* cFE core.
*
* Author: R.McGraw/SSI
*
* Notes:
* This file should not contain messages defined by cFE external
* applications.
*
*/

#ifndef CPU1_MSGIDS_H
#define CPU1_MSGIDS_H

/*
** Includes
*/

#include "cfe_mission_cfg.h"

/**
* \brief Platform command message ID base offset
*
* Example mechanism for setting default command bits and deconflicting MIDs across multiple
* platforms in a mission. For any sufficiently complex mission this method is
* typically replaced by a centralized message ID management scheme.
*
* 0x1800 - Nominal value for default message ID implementation (V1). This sets the command
* field and the secondary header present field. Typical V1 command MID range
* is 0x1800-1FFF. Additional cpus can deconflict message IDs by incrementing
* this value to provide sub-allocations (0x1900 for example).
* 0x0080 - Command bit for MISSION_MSGID_V2 message ID implementation (V2). Although
* this can be used for the value below due to the relatively small set
* of MIDs in the framework it will not scale so an alternative
* method of deconfliction is recommended.
*/
#define CFE_PLATFORM_CMD_MID_BASE 0x1800

/**
* \brief Platform telemetry message ID base offset
*
* 0x0800 - Nominal for message ID V1
* 0x0000 - Potential value for MISSION_MSGID_V2, but limited to a range of
* 0x0000-0x007F since the command bit is 0x0080. Alternative
* method of deconfliction is recommended.
*
* See #CFE_PLATFORM_CMD_MID_BASE for more information
*/
#define CFE_PLATFORM_TLM_MID_BASE 0x0800

/**
* \brief "Global" command message ID base offset
*
* 0x1860 - Nominal value for message ID V1
* 0x00E0 - Potential value for MISSION_MSGID_V2, note command bit is 0x0080.
* Works in limited cases only, alternative method of deconfliction
* is recommended.
* See #CFE_PLATFORM_CMD_MID_BASE for more information
*/
#define CFE_PLATFORM_CMD_MID_BASE_GLOB 0x1860

/*
** cFE Command Message Id's
*/
#define CFE_EVS_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_EVS_CMD_MSG /* 0x1801 */
#define CFE_TEST_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TEST_CMD_MSG /* 0x1802 */
#define CFE_SB_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_SB_CMD_MSG /* 0x1803 */
#define CFE_TBL_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TBL_CMD_MSG /* 0x1804 */
#define CFE_TIME_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TIME_CMD_MSG /* 0x1805 */
#define CFE_ES_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_ES_CMD_MSG /* 0x1806 */

#define CFE_ES_SEND_HK_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_ES_SEND_HK_MSG /* 0x1808 */
#define CFE_EVS_SEND_HK_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_EVS_SEND_HK_MSG /* 0x1809 */
/* Message ID 0x180A is available */
#define CFE_SB_SEND_HK_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_SB_SEND_HK_MSG /* 0x180B */
#define CFE_TBL_SEND_HK_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TBL_SEND_HK_MSG /* 0x180C */
#define CFE_TIME_SEND_HK_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TIME_SEND_HK_MSG /* 0x180D */

#define CFE_SB_SUB_RPT_CTRL_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_SB_SUB_RPT_CTRL_MSG /* 0x180E */

#define CFE_TIME_TONE_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TIME_TONE_CMD_MSG /* 0x1810 */
#define CFE_TIME_1HZ_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TIME_1HZ_CMD_MSG /* 0x1811 */

/*
** cFE Global Command Message Id's
*/
#define CFE_TIME_DATA_CMD_MID CFE_PLATFORM_CMD_MID_BASE_GLOB + CFE_MISSION_TIME_DATA_CMD_MSG /* 0x1860 */
#define CFE_TIME_SEND_CMD_MID CFE_PLATFORM_CMD_MID_BASE_GLOB + CFE_MISSION_TIME_SEND_CMD_MSG /* 0x1862 */

/*
** CFE Telemetry Message Id's
*/
#define CFE_ES_HK_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_ES_HK_TLM_MSG /* 0x0800 */
#define CFE_EVS_HK_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_EVS_HK_TLM_MSG /* 0x0801 */
#define CFE_TEST_HK_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_TEST_HK_TLM_MSG /* 0x0802 */
#define CFE_SB_HK_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_SB_HK_TLM_MSG /* 0x0803 */
#define CFE_TBL_HK_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_TBL_HK_TLM_MSG /* 0x0804 */
#define CFE_TIME_HK_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_TIME_HK_TLM_MSG /* 0x0805 */
#define CFE_TIME_DIAG_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_TIME_DIAG_TLM_MSG /* 0x0806 */
#define CFE_EVS_LONG_EVENT_MSG_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_EVS_LONG_EVENT_MSG_MSG /* 0x0808 */
#define CFE_EVS_SHORT_EVENT_MSG_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_EVS_SHORT_EVENT_MSG_MSG /* 0x0809 */
#define CFE_SB_STATS_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_SB_STATS_TLM_MSG /* 0x080A */
#define CFE_ES_APP_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_ES_APP_TLM_MSG /* 0x080B */
#define CFE_TBL_REG_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_TBL_REG_TLM_MSG /* 0x080C */
#define CFE_SB_ALLSUBS_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_SB_ALLSUBS_TLM_MSG /* 0x080D */
#define CFE_SB_ONESUB_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_SB_ONESUB_TLM_MSG /* 0x080E */
#define CFE_ES_MEMSTATS_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_ES_MEMSTATS_TLM_MSG /* 0x0810 */

#endif /* CPU1_MSGIDS_H */
Loading

0 comments on commit 2b5dc63

Please sign in to comment.