├── .clang-format ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── codeql │ ├── codeql-coding-standard.yml │ ├── codeql-security.yml │ └── jpl-misra.qls ├── pull_request_template.md ├── scripts │ ├── common-test.mk │ ├── cppcheck-merge.xslt │ ├── cppcheck-xml2text.xslt │ ├── create_ccb_agenda.py │ └── rtems-test.mk └── workflows │ ├── README.md │ ├── Reusable-Workflows-Architecture.svg │ ├── build-cfs-deprecated.yml │ ├── build-cfs-rtems4.11.yml │ ├── build-cfs-rtems5.yml │ ├── build-cfs.yml │ ├── build-deploy-doc.yml │ ├── build-documentation.yml │ ├── build-run-app.yml │ ├── cfs-wiki.yml │ ├── changelog.yml │ ├── codeql-analysis.yml │ ├── codeql-reusable.yml │ ├── format-check.yml │ ├── static-analysis-misra.yml │ ├── static-analysis-reuse.yml │ ├── static-analysis.yml │ └── unit-test-coverage.yml ├── .gitignore ├── .gitmodules ├── .lgtm.yml ├── CITATION.cff ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── SECURITY.md ├── cFS_Apps_Corporate_CLA.pdf ├── cFS_Apps_Individual_CLA.pdf ├── cFS_Framework_Corporate_CLA.pdf ├── cFS_Framework_Individual_CLA.pdf └── tools └── CMakeLists.txt /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | Language: Cpp 3 | AccessModifierOffset: -4 4 | AlignAfterOpenBracket: Align 5 | AlignConsecutiveAssignments: true 6 | AlignConsecutiveDeclarations: true 7 | AlignConsecutiveMacros: true 8 | AlignEscapedNewlines: Left 9 | AlignOperands: true 10 | AlignTrailingComments: true 11 | AllowAllParametersOfDeclarationOnNextLine: true 12 | AllowShortBlocksOnASingleLine: Empty 13 | AllowShortCaseLabelsOnASingleLine: false 14 | AllowShortFunctionsOnASingleLine: Empty 15 | AllowShortIfStatementsOnASingleLine: false 16 | AllowShortLoopsOnASingleLine: false 17 | AlwaysBreakAfterReturnType: None 18 | AlwaysBreakBeforeMultilineStrings: false 19 | BinPackArguments: true 20 | BinPackParameters: true 21 | BreakBeforeBinaryOperators: None 22 | BreakBeforeBraces: Allman 23 | BreakBeforeTernaryOperators: true 24 | BreakStringLiterals: true 25 | ColumnLimit: 120 26 | CommentPragmas: '' 27 | ContinuationIndentWidth: 4 28 | Cpp11BracedListStyle: true 29 | DerivePointerAlignment: false 30 | DisableFormat: false 31 | ExperimentalAutoDetectBinPacking: false 32 | ForEachMacros: [] 33 | IncludeBlocks: Preserve 34 | IncludeCategories: [] 35 | IncludeIsMainRegex: '$' 36 | IndentCaseLabels: true 37 | IndentPPDirectives: None 38 | IndentWidth: 4 39 | KeepEmptyLinesAtTheStartOfBlocks: true 40 | MacroBlockBegin: '' 41 | MacroBlockEnd: '' 42 | MaxEmptyLinesToKeep: 1 43 | PenaltyBreakAssignment: 2 44 | PenaltyBreakBeforeFirstCallParameter: 19 45 | PenaltyBreakComment: 300 46 | PenaltyBreakFirstLessLess: 120 47 | PenaltyBreakString: 1000 48 | PenaltyExcessCharacter: 1000000 49 | PenaltyReturnTypeOnItsOwnLine: 60 50 | PointerAlignment: Right 51 | ReflowComments: true 52 | SortIncludes: false 53 | SpaceAfterCStyleCast: false 54 | SpaceBeforeAssignmentOperators: true 55 | SpaceBeforeParens: ControlStatements 56 | SpaceInEmptyParentheses: false 57 | SpaceBeforeCpp11BracedList: true 58 | SpacesBeforeTrailingComments: 1 59 | SpacesInCStyleCastParentheses: false 60 | SpacesInParentheses: false 61 | SpacesInSquareBrackets: false 62 | Standard: c++11 63 | TabWidth: 8 64 | UseTab: Never 65 | ... 66 | 67 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Checklist (Please check before submitting)** 11 | 12 | * [ ] I reviewed the [Contributing Guide](https://github.com/nasa/cFS/blob/main/CONTRIBUTING.md). 13 | * [ ] I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets. 14 | 15 | **Describe the bug** 16 | A clear and concise description of what the bug is. 17 | 18 | **To Reproduce** 19 | Steps to reproduce the behavior: 20 | 1. Go to '...' 21 | 2. Click on '....' 22 | 3. Scroll down to '....' 23 | 4. See error 24 | 25 | **Expected behavior** 26 | A clear and concise description of what you expected to happen. 27 | 28 | **Code snips** 29 | If applicable, add references to the software. 30 | 31 | **System observed on:** 32 | - Hardware 33 | - OS: [e.g. Linux 4.4] 34 | - Versions [e.g. cFE 6.6, OSAL 4.2, PSP 1.3 for mcp750, any related apps] 35 | 36 | **Additional context** 37 | Add any other context about the problem here. 38 | 39 | **Reporter Info** 40 | Full name and company/organization if applicable 41 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Checklist (Please check before submitting)** 11 | 12 | * [ ] I reviewed the [Contributing Guide](https://github.com/nasa/cFS/blob/main/CONTRIBUTING.md). 13 | * [ ] I reviewed the [cFS README.md file](https://github.com/nasa/cFS/blob/main/README.md) to see if the feature is in the major future work. 14 | * [ ] I performed a cursory search to see if the feature request is relevant, not redundant, nor in conflict with other tickets. 15 | 16 | **Is your feature request related to a problem? Please describe.** 17 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 18 | 19 | **Describe the solution you'd like** 20 | A clear and concise description of what you want to happen. 21 | 22 | **Describe alternatives you've considered** 23 | A clear and concise description of any alternative solutions or features you've considered. 24 | 25 | **Additional context** 26 | Add any other context about the feature request here. 27 | 28 | **Requester Info** 29 | Full name and company/organization if applicable 30 | -------------------------------------------------------------------------------- /.github/codeql/codeql-coding-standard.yml: -------------------------------------------------------------------------------- 1 | name: "CodeQL Coding Standard Configuration File" 2 | 3 | disable-default-queries: true 4 | 5 | queries: 6 | - name: JPL and MISRA 7 | uses: nasa/cFS/.github/codeql/jpl-misra.qls@main -------------------------------------------------------------------------------- /.github/codeql/codeql-security.yml: -------------------------------------------------------------------------------- 1 | name: "CodeQL Security Configuration File" 2 | 3 | queries: 4 | - name: Security and Quality 5 | uses: security-and-quality 6 | - name: Security Extended 7 | uses: security-extended 8 | -------------------------------------------------------------------------------- /.github/codeql/jpl-misra.qls: -------------------------------------------------------------------------------- 1 | # Start with all the queries in the codeql/cpp-queries pack. 2 | - queries: . 3 | from: codeql/cpp-queries 4 | # Restrict to only the queries with the following ID patterns. 5 | - include: 6 | id: 7 | # MISRA Rule 5-3-2 8 | - cpp/jsf/av-rule-173 9 | # MISRA Rule 5-14-1 10 | - cpp/jsf/av-rule-165 11 | # MISRA Rule 5-18-1 12 | - cpp/jsf/av-rule-168 13 | # MISRA 6-2-2 14 | - cpp/jsf/av-rule-202 15 | # JPL Rules 16 | - /cpp/jpl-c/*/ 17 | # Exclude queries with too many results 18 | - exclude: 19 | id: 20 | # JPL 14 21 | - cpp/jpl-c/checking-return-values 22 | # JPL 15 23 | - cpp/jpl-c/checking-parameter-values 24 | # JPL 17 25 | - cpp/jpl-c/basic-int-types 26 | # JPL 24 27 | - cpp/jpl-c/multiple-stmts-per-line 28 | - cpp/jpl-c/multiple-var-decls-per-line 29 | # Excluded since cFS use unions judiciously 30 | # MISRA Rule 9-5-1 31 | - cpp/jsf/av-rule-153 32 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | **Checklist (Please check before submitting)** 2 | 3 | * [ ] I reviewed the [Contributing Guide](https://github.com/nasa/cFS/blob/main/CONTRIBUTING.md). 4 | * [ ] I signed and emailed the appropriate [Contributor License Agreement](https://github.com/nasa/cFS/blob/main/CONTRIBUTING.md#contributor-license-agreement-cla) to GSFC-SoftwareRelease@mail.nasa.gov and copied cfs-program@lists.nasa.gov. 5 | 6 | **Describe the contribution** 7 | A clear and concise description of what the contribution is. 8 | - Include explicitly what issue it addresses [e.g. Fixes #X] 9 | 10 | **Testing performed** 11 | Steps taken to test the contribution: 12 | 1. Build steps '...' 13 | 2. Execution steps '...' 14 | 15 | **Expected behavior changes** 16 | A clear and concise description of how this contribution will change behavior and level of impact. 17 | - API Change: xxx (if applicable) 18 | - Behavior Change: xxx (if applicable) 19 | - Or no impact to behavior 20 | 21 | **System(s) tested on** 22 | - Hardware: [e.g. PC, SP0, MCP750] 23 | - OS: [e.g. Ubuntu 18.04, RTEMS 4.11, VxWorks 6.9] 24 | - Versions: [e.g. cFE 6.6, OSAL 4.2, PSP 1.3 for mcp750, any related apps or tools] 25 | 26 | **Additional context** 27 | Add any other context about the contribution here. 28 | 29 | **Code contributions** 30 | The cFS repository is provided to bundle the cFS Framework. It is utilized for bundling submodules, continuous integration testing, and version management and does not contain any software. Code contributions should be directed to the appropriate submodule. 31 | 32 | **Contributor Info - All information REQUIRED for consideration of pull request** 33 | Full name and company/organization/center of all contributors ("Personal" if individual work) 34 | - Note CLAs apply to only software contributions. 35 | -------------------------------------------------------------------------------- /.github/scripts/common-test.mk: -------------------------------------------------------------------------------- 1 | CPUNAME ?= cpu1 2 | INSTALL_DIR ?= $(O)/exe 3 | 4 | ALL_TESTRUNNER_EXES := $(shell ls $(INSTALL_DIR)/$(CPUNAME)/*testrunner.exe) 5 | ALL_UT_EXES := $(shell ls $(INSTALL_DIR)/$(CPUNAME)/*UT.exe) 6 | ALL_FUNC_TEST_EXES := $(shell ls $(INSTALL_DIR)/$(CPUNAME)/*test.exe) 7 | 8 | # These functional tests require a network stack, 9 | # so they can be skipped on platforms that may not have network 10 | ifeq ($(SKIP_NET_TESTS), true) 11 | SKIP_FUNC_TEST := \ 12 | $(INSTALL_DIR)/$(CPUNAME)/network-api-test.exe \ 13 | $(INSTALL_DIR)/$(CPUNAME)/select-test.exe 14 | ALL_FUNC_TEST_EXES := $(filter-out $(SKIP_FUNC_TEST),$(ALL_FUNC_TEST_EXES)) 15 | endif 16 | 17 | ALL_TESTRUNNER_TEST_LIST := $(basename $(ALL_TESTRUNNER_EXES)) 18 | ALL_UT_TEST_LIST := $(basename $(ALL_UT_EXES)) 19 | ALL_FUNC_TEST_LIST := $(basename $(ALL_FUNC_TEST_EXES)) 20 | 21 | 22 | ALL_TEST_LIST := \ 23 | $(ALL_TESTRUNNER_TEST_LIST) \ 24 | $(ALL_UT_TEST_LIST) \ 25 | $(ALL_FUNC_TEST_LIST) \ 26 | 27 | .PHONY: clean_logs \ 28 | all_tests \ 29 | all_logs \ 30 | all_checks \ 31 | all_testrunner_logs \ 32 | all_ut_logs \ 33 | all_func_test_logs \ 34 | 35 | clean_logs: 36 | rm -f $(addsuffix .check,$(ALL_TEST_LIST)) \ 37 | $(addsuffix .log,$(ALL_TEST_LIST)) 38 | rm -f $(INSTALL_DIR)/$(CPUNAME)/failed-tests.log 39 | 40 | # run all tests without checking success 41 | all_logs: $(addsuffix .log,$(ALL_TEST_LIST)) 42 | # run all tests and check success 43 | all_checks: $(addsuffix .check,$(ALL_TEST_LIST)) 44 | 45 | # run just tests with suffix *testrunner.exe 46 | all_testrunner_logs: $(addsuffix .log,$(ALL_TESTRUNNER_TEST_LIST)) 47 | # run just tests with suffix *UT.exe 48 | all_ut_logs: $(addsuffix .log,$(ALL_UT_TEST_LIST)) 49 | # run just tests with suffix *test.exe 50 | all_func_test_logs: $(addsuffix .log,$(ALL_FUNC_TEST_LIST)) 51 | 52 | all_tests: all_checks 53 | @echo '*** SUCCESS ***' 54 | 55 | -------------------------------------------------------------------------------- /.github/scripts/cppcheck-merge.xslt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /.github/scripts/cppcheck-xml2text.xslt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ## CppCheck Summary 5 | 6 | | error | warning | style | performance | portability | information | 7 | | --- | --- | --- | --- | --- | --- | 8 | | | | | | | | 9 | 10 | | severity | location | error id | issue | 11 | | --- | --- | --- | --- | 12 | | | : | | | 13 | 14 | 15 | ** error(s) reported** 16 | 17 | 18 | -------------------------------------------------------------------------------- /.github/scripts/create_ccb_agenda.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | import json 3 | import sys 4 | import time 5 | import os 6 | 7 | # extract pull request data from GitHub 8 | repos = ['cFS', 'cFE', 'osal', 'psp', 'sch_lab', 'ci_lab', 'to_lab', 'sample_app', 'sample_lib', 'elf2cfetbl', 'tblcrctool','cFS-GroundSystem', 'CF', 'CS', 'DS','FM', 'HK', 'HS', 'LC', 'MD', 'MM', 'SC'] 9 | 10 | for repo in repos: 11 | subprocess.Popen('gh pr list --repo nasa/' + str(repo) + ' --search "draft:false" --json number,author,title,url,additions,deletions,labels | jq -c ' + '\'reduce range(0, length) as $index (.; (.[$index].author=.[$index].author.login | .[$index].number=(.[$index].number|"\'' + str(repo) + '\' PR #\(.)") )) | .[]\' ' + '>> temp.json', shell=True) 12 | 13 | time.sleep(5) 14 | subprocess.Popen('jq -s . temp.json > prs.json', shell=True) 15 | time.sleep(5) 16 | 17 | # load a list of pull requests as python dictionaries 18 | with open ('prs.json') as prs_file: 19 | prs = json.load(prs_file) 20 | 21 | PrData = dict() # {author: [pr1, pr2, pr3, ...]} 22 | AuthorPrChanges = dict() # {author: #TotalChanges} 23 | 24 | for pr in prs: 25 | ignore = False 26 | for label in pr['labels']: 27 | if label['name'] == 'CCB:Ignore' or label['name'] == 'CCB:Approved': 28 | ignore = True 29 | break 30 | if ignore == False: 31 | if pr['author'] not in PrData: 32 | PrData[pr['author']] = [pr] 33 | AuthorPrChanges[pr['author']] = pr['additions'] + pr['deletions'] 34 | else: 35 | PrData[pr['author']].append(pr) 36 | AuthorPrChanges[pr['author']] += pr['additions'] + pr['deletions'] 37 | 38 | # no prs to write, exit program 39 | if len(PrData) == 0: 40 | print("Failed to find relevant Pull Requests for the agenda. Exiting...\n") 41 | sys.exit() 42 | 43 | # re-order dict according to sum(additions, deletions) of each pr for each author 44 | AuthorPrChanges = {k: v for k, v in sorted(AuthorPrChanges.items(), key=lambda item: item[1])} 45 | 46 | # write to markdown 47 | CCBfilename = "CCBAgenda.md" 48 | with open(CCBfilename, 'w') as f: 49 | f.write("## Items for Discussion\n\n") 50 | for author in AuthorPrChanges.keys(): 51 | f.write("### @" + author + "\n\n") 52 | for pr_auth in PrData[author]: 53 | if (author == pr_auth['author']): 54 | f.write("[" + pr_auth['number'] + "](" + pr_auth['url'].replace("pull", "issues") + ") " + pr_auth['title'] + "\n\n") 55 | 56 | # close files 57 | f.close() 58 | prs_file.close() 59 | time.sleep(5) 60 | try: 61 | os.remove("prs.json") 62 | os.remove("temp.json") 63 | except OSError: 64 | pass 65 | 66 | time.sleep(5) 67 | 68 | if (os.stat(CCBfilename).st_size != 0): 69 | print("CCB markdown has been successfully created") -------------------------------------------------------------------------------- /.github/scripts/rtems-test.mk: -------------------------------------------------------------------------------- 1 | SKIP_NET_TESTS := true 2 | 3 | # At a minimum the variable O must be set by the caller 4 | ifeq ($(O),) 5 | $(error O must be set prior to native-test.mk) 6 | endif 7 | 8 | CFE_IMG_MB ?= 32 9 | CFE_DISK_IMG ?= $(INSTALL_DIR)/$(CPUNAME)/nonvol-disk.img 10 | CFE_FS_IMG ?= $(INSTALL_DIR)/$(CPUNAME)/nonvol-fs.img 11 | QEMU_COMMAND ?= qemu-system-i386 -m 128 12 | MACADDR = 00:04:9F$(shell head -c 3 /dev/urandom | hexdump -v -e '/1 ":%02X"') 13 | RTEMS_VERSION ?= i686-rtems5 14 | 15 | # default rule to just create qemu disk image 16 | all: cfe-disk 17 | 18 | # include list of all unit tests to run 19 | include .github/scripts/common-test.mk 20 | 21 | .PHONY: run cfe-disk 22 | .SECONDARY: $(addsuffix .log,$(ALL_TEST_LIST))) 23 | 24 | cfe-disk: $(CFE_DISK_IMG) 25 | 26 | $(CFE_DISK_IMG): FS_SIZE := $(shell echo $$(($(CFE_IMG_MB) * 1048576))) 27 | 28 | $(CFE_DISK_IMG): $(wildcard $(O)/$(RTEMS_VERSION)/default_cpu1/osal/unit-tests/osloader-test/utmod/*) $(wildcard $(INSTALL_DIR)/$(CPUNAME)/eeprom/*) 29 | # Basic disk 30 | truncate -s $(FS_SIZE) $(@) 31 | parted -s $(@) -- mklabel msdos 32 | parted -a none -s $(@) -- mkpart primary fat32 63s -1s 33 | # File system partition 34 | mkfs.fat --offset 63 $(@) 35 | mcopy -i $(@)@@32256 -sv $(O)/$(RTEMS_VERSION)/default_cpu1/osal/unit-tests/osloader-test/utmod :: || /bin/true 36 | mcopy -i $(@)@@32256 -sv $(INSTALL_DIR)/$(CPUNAME)/eeprom :: 37 | 38 | run: $(CFE_DISK_IMG) 39 | $(QEMU_COMMAND) -display none -no-reboot -serial mon:stdio \ 40 | -kernel $(INSTALL_DIR)/$(CPUNAME)/$(KERNEL_NAME).exe \ 41 | -drive file=$(CFE_DISK_IMG),format=raw \ 42 | -device i82557b,netdev=net0,mac=$(MACADDR) \ 43 | -netdev user,id=net0,hostfwd=udp:127.0.0.1:1235-:1235 \ 44 | -append '--console=/dev/com1' 45 | 46 | clean_img: 47 | rm -f $(INSTALL_DIR)/$(CPUNAME)/*.img 48 | 49 | %.cow: $(CFE_DISK_IMG) 50 | qemu-img create -o backing_file=$(notdir $(CFE_DISK_IMG)),backing_fmt=raw -f qcow2 $(@) 51 | 52 | %.log: %.exe %.cow 53 | $(QEMU_COMMAND) -no-reboot -display none \ 54 | -kernel $(<) \ 55 | -append '--batch-mode --console=/dev/com1' \ 56 | -drive file=$(*).cow,format=qcow2 \ 57 | -device i82557b,netdev=net0,mac=$(MACADDR) \ 58 | -netdev user,id=net0 \ 59 | -serial file:$(@).tmp 60 | @mv -v $(@).tmp $(@) 61 | 62 | %.check: %.log 63 | @(grep -q '^Application exit status: SUCCESS' $(<)) || (echo $(*): ---FAIL--- | tee -a $(INSTALL_DIR)/$(CPUNAME)/failed-tests.log; /bin/false ) 64 | -------------------------------------------------------------------------------- /.github/workflows/README.md: -------------------------------------------------------------------------------- 1 | # Our Workflows 2 | 3 | ## Reusable Workflows 4 | 5 | To reduce duplication, the workflows CodeQL Analysis, Static Analysis, and Format Checker are placed in cFS to be reused in the subrepositories. 6 | 7 | CodeQL Analysis and Static Analysis require inputs, therefore, they are called in an additional workflow in cFS to be utilized. Format checker does not need to be reused in cFS because it does not require inputs. 8 | 9 | Provided is a diagram of the architecture of the reusable workflows. 10 | 11 | ![Reusable Workflows Architecture](./Reusable-Workflows-Architecture.svg) 12 | 13 | ## Deprecated Build, Test, and Run 14 | [![Deprecated Build, Test, and Run](https://github.com/nasa/cfs/actions/workflows/build-cfs-deprecated.yml/badge.svg)](https://github.com/nasa/cfs/actions/workflows/build-cfs-deprecated.yml) 15 | 16 | This action builds, tests, and runs the cFS bundle using deprecated code. The flag OMIT_DEPRECATED is set to false. For more information on the OMIT_DEPRECATED flag, see [global_build_options.cmake](https://github.com/nasa/cFE/blob/063b4d8a9c4a7e822af5f3e4017599159b985bb0/cmake/sample_defs/global_build_options.cmake). 17 | 18 | Build, Test, and Run runs for every push and every pull request on all branches of cFS in Github Actions. 19 | 20 | ## Build, Test, and Run [OMIT_DEPRECATED=true] 21 | [![Build, Test, and Run %5B OMIT_DEPRECATED=true %5B](https://github.com/nasa/cfs/actions/workflows/build-cfs.yml/badge.svg)](https://github.com/nasa/cfs/actions/workflows/build-cfs.yml) 22 | 23 | This action builds, tests, and runs the cFS bundle omitting deprecated code. 24 | 25 | Build, Test, and Run [OMIT_DEPRECATED=true] runs for every push and every pull request on all branches of cFS in Github Actions. For more information on the OMIT_DEPRECATED flag, see [global_build_options.cmake](https://github.com/nasa/cFE/blob/063b4d8a9c4a7e822af5f3e4017599159b985bb0/cmake/sample_defs/global_build_options.cmake). 26 | 27 | ## Build and Test in RTEMS [OMIT_DEPRECATED=true] 28 | [![Build and Test rtems 4.11 [OMIT_DEPRECATED=true]](https://github.com/nasa/cFS/actions/workflows/build-cfs-rtems4.11.yml/badge.svg)](https://github.com/nasa/cFS/actions/workflows/build-cfs-rtems4.11.yml) 29 | [![Build and Test rtems 5 [OMIT_DEPRECATED=true]](https://github.com/nasa/cFS/actions/workflows/build-cfs-rtems5.yml/badge.svg)](https://github.com/nasa/cFS/actions/workflows/build-cfs-rtems5.yml) 30 | 31 | This action builds and tests the cFS bundle omitting deprecated code in both RTEMS 4.11 and RTEMS 5. 32 | 33 | Build and Test in RTEMS 4.11 and 5 runs for every push and every pull request on all branches of cFS in Github Actions. 34 | 35 | ## CodeQL Analysis 36 | [![CodeQL Analysis](https://github.com/nasa/cfs/actions/workflows/codeql-build.yml/badge.svg)](https://github.com/nasa/cfs/actions/workflows/codeql-build.yml) 37 | 38 | This action runs GitHub's static analysis engine, CodeQL, against our repository's source code to find security vulnerabilities. It then automatically uploads the results to GitHub so they can be displayed in the repository's code scanning alerts found under the security tab. CodeQL runs an extensible set of [queries](https://github.com/github/codeql), which have been developed by the community and the [GitHub Security Lab](https://securitylab.github.com/) to find common vulnerabilities in your code. 39 | 40 | CodeQL runs for every push and pull-request on all branches of cFS in GitHub Actions. 41 | 42 | For the CodeQL GitHub Actions setup, visit https://github.com/github/codeql-action. 43 | 44 | Our CodeQL action uses a configuration file to use specific queries, which can be found at [.github/codeql](https://github.com/nasa/cFS/tree/main/.github/codeql). 45 | 46 | ## Static Analysis 47 | [![Static Analysis](https://github.com/nasa/cfs/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/nasa/cfs/actions/workflows/static-analysis.yml) 48 | 49 | This action runs a static analysis tool for C/C++ code known as cppcheck. Cppcheck is designed to be able to analyze C/C++ code even if it has non-standard syntax, which is common in embedded projects. 50 | 51 | The cFS Cppcheck GitHub Actions workflow and results are available to the public. To view the results, select a workflow and download the artifacts. 52 | 53 | Cppcheck runs for every push on the main branch and every pull request on all branches of cFS in Github Actions. 54 | 55 | For more information about Cppcheck, visit http://cppcheck.sourceforge.net/. 56 | 57 | ## Local Unit Test 58 | [![Local Unit Test](https://github.com/nasa/osal/actions/workflows/local_unit_test.yml/badge.svg)](https://github.com/nasa/osal/actions/workflows/local_unit_test.yml) 59 | 60 | This action tests our code using GCC's coverage testing tool gcov. 61 | 62 | Local Unit Test runs for every push and every pull request on all branches of cFS in Github Actions. 63 | 64 | ## Documentation and Guides 65 | [![Documentation and Guides](https://github.com/nasa/cfs/actions/workflows/build-documentation.yml/badge.svg)](https://github.com/nasa/cfs/actions/workflows/build-documentation.yml) 66 | 67 | This action creates doxygen documents for cFE, cFS users guide, and osal guide. 68 | 69 | Documentation and Guides runs for every push and every pull request on all branches of cFS in Github Actions. The workflow pushes the PDFs for every push on the main branch. The PDFs can be found at https://github.com/nasa/cfs/tree/gh-pages. 70 | 71 | ## Changelog 72 | [![Changelog](https://github.com/nasa/cfs/actions/workflows/changelog.yml/badge.svg)](https://github.com/nasa/cfs/actions/workflows/changelog.yml) 73 | 74 | This action creates a changelog file which documents all the issues in cFS. 75 | 76 | The Changelog action runs manually. 77 | 78 | ## Format Check 79 | [![Format Check](https://github.com/nasa/osal/actions/workflows/format-check.yml/badge.svg)](https://github.com/nasa/osal/actions/workflows/format-check.yml) 80 | 81 | This action uses [clang-format-10](https://github.com/nasa/cFS/blob/main/.clang-format) to check for format errors. 82 | -------------------------------------------------------------------------------- /.github/workflows/Reusable-Workflows-Architecture.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/workflows/build-cfs-deprecated.yml: -------------------------------------------------------------------------------- 1 | name: Build, Test, and Run [OMIT_DEPRECATED = false] 2 | 3 | # Run every time a new commit pushed or for pull requests 4 | on: 5 | push: 6 | pull_request: 7 | 8 | env: 9 | SIMULATION: native 10 | OMIT_DEPRECATED: false 11 | ENABLE_UNIT_TESTS: true 12 | CTEST_OUTPUT_ON_FAILURE: true 13 | REPO_NAME: ${{ github.event.repository.name }} 14 | 15 | # Force bash to apply pipefail option so pipeline failures aren't masked 16 | defaults: 17 | run: 18 | shell: bash 19 | 20 | jobs: 21 | #Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action. 22 | check-for-duplicates: 23 | runs-on: ubuntu-latest 24 | # Map a step output to a job output 25 | outputs: 26 | should_skip: ${{ steps.skip_check.outputs.should_skip }} 27 | steps: 28 | - id: skip_check 29 | uses: fkirc/skip-duplicate-actions@master 30 | with: 31 | concurrent_skipping: 'same_content' 32 | skip_after_successful_duplicate: 'true' 33 | do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' 34 | 35 | build-cfs-omit-deprecated-false: 36 | name: "[Deprecated] Build" 37 | needs: check-for-duplicates 38 | if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }} 39 | runs-on: ubuntu-22.04 40 | 41 | strategy: 42 | fail-fast: false 43 | matrix: 44 | buildtype: [debug, release] 45 | 46 | # Set the type of machine to run on 47 | env: 48 | BUILDTYPE: ${{ matrix.buildtype }} 49 | 50 | steps: 51 | - name: Cache Source and Build 52 | id: cache-src-bld 53 | uses: actions/cache@v4 54 | with: 55 | path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/* 56 | key: deprecated-build-${{ github.run_number }}-${{ matrix.buildtype }} 57 | 58 | - name: Checkout cFS 59 | if: steps.cache-src-bld.outputs.cache-hit != 'true' 60 | uses: actions/checkout@v4 61 | with: 62 | submodules: true 63 | 64 | - name: Check versions 65 | run: git submodule 66 | 67 | - name: Copy Makefile 68 | run: | 69 | cp ./cfe/cmake/Makefile.sample Makefile 70 | cp -r ./cfe/cmake/sample_defs sample_defs 71 | 72 | - name: Prep Build 73 | run: make prep 74 | 75 | - name: Make 76 | run: make install 77 | 78 | tests-and-coverage-omit-deprecated-false: 79 | name: "[Deprecated] Run Unit Tests and Check Coverage" 80 | needs: build-cfs-omit-deprecated-false 81 | runs-on: ubuntu-22.04 82 | 83 | strategy: 84 | fail-fast: false 85 | matrix: 86 | buildtype: [debug, release] 87 | 88 | # Set the type of machine to run on 89 | env: 90 | BUILDTYPE: ${{ matrix.buildtype }} 91 | ENABLE_UNIT_TESTS: true 92 | 93 | steps: 94 | - name: Install Dependencies 95 | run: sudo apt-get install lcov -y 96 | 97 | - name: Cache Source and Deprecated Build 98 | id: cache-src-bld 99 | uses: actions/cache@v4 100 | with: 101 | path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/* 102 | key: deprecated-build-${{ github.run_number }}-${{ matrix.buildtype }} 103 | 104 | - name: Run Tests 105 | run: make test 106 | 107 | - name: Check Coverage 108 | run: make lcov 109 | 110 | run-cfs-omit-deprecated-false: 111 | name: "[Deprecated] Run cFS" 112 | needs: build-cfs-omit-deprecated-false 113 | runs-on: ubuntu-22.04 114 | 115 | strategy: 116 | fail-fast: false 117 | matrix: 118 | buildtype: [debug, release] 119 | 120 | # Set the type of machine to run on 121 | env: 122 | BUILDTYPE: ${{ matrix.buildtype }} 123 | 124 | steps: 125 | - name: Cache Source and Deprecated Build 126 | id: cache-src-bld 127 | uses: actions/cache@v4 128 | with: 129 | path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/* 130 | key: deprecated-build-${{ github.run_number }}-${{ matrix.buildtype }} 131 | 132 | 133 | - name: List cpu1 134 | run: ls build/exe/cpu1/ 135 | 136 | - name: Run cFS 137 | run: | 138 | ./core-cpu1 > cFS_startup_cpu1.txt & 139 | sleep 30 140 | ../host/cmdUtil --endian=LE --pktid=0x1806 --cmdcode=2 --half=0x0002 141 | working-directory: ./build/exe/cpu1/ 142 | 143 | - name: Archive cFS Startup Artifacts 144 | uses: actions/upload-artifact@v4 145 | with: 146 | name: cFS-startup-log-omit-deprecate-false${{ matrix.buildtype }} 147 | path: ./build/exe/cpu1/cFS_startup_cpu1.txt 148 | 149 | - name: Check for cFS Warnings 150 | run: | 151 | if [[ -n $(grep -i "warn\|err\|fail" cFS_startup_cpu1.txt) ]]; then 152 | echo "Must resolve warn|err|fail in cFS startup before submitting a pull request" 153 | echo "" 154 | grep -i 'warn\|err\|fail' cFS_startup_cpu1.txt 155 | exit -1 156 | fi 157 | working-directory: ./build/exe/cpu1/ 158 | 159 | run-functional-test-app-omit-deprecated-false: 160 | #Continue if check-for-duplicates found no duplicates. Always runs for pull-requests. 161 | needs: run-cfs-omit-deprecated-false 162 | name: "[DEPRECATED] cFS Functional Tests" 163 | runs-on: ubuntu-22.04 164 | timeout-minutes: 15 165 | 166 | strategy: 167 | fail-fast: false 168 | matrix: 169 | buildtype: [debug, release] 170 | 171 | steps: 172 | - name: Cache Source and Deprecated Build 173 | id: cache-src-bld 174 | uses: actions/cache@v4 175 | with: 176 | path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/* 177 | key: deprecated-build-${{ github.run_number }}-${{ matrix.buildtype }} 178 | 179 | - name: List cpu1 180 | run: ls build/exe/cpu1/ 181 | 182 | # Run cFS, send commands to set perf trigger and start perf data, and run functional tests 183 | - name: Run cFS Functional Tests 184 | run: | 185 | ./core-cpu1 & 186 | sleep 10 187 | ../host/cmdUtil --pktid=0x1806 --cmdcode=17 --endian=LE --uint32=3 --uint32=0x40000000 188 | ../host/cmdUtil --pktid=0x1806 --cmdcode=14 --endian=LE --uint32=2 189 | ../host/cmdUtil --pktid=0x1806 --cmdcode=4 --endian=LE --string="20:CFE_TEST_APP" --string="20:CFE_TestMain" --string="64:cfe_testcase" --uint32=16384 --uint8=0 --uint8=0 --uint16=100 190 | sleep 30 191 | counter=0 192 | while [[ ! -f cf/cfe_test.log ]]; do 193 | temp=$(grep -c "BEGIN" cf/cfe_test.tmp) 194 | 195 | if [ $temp -eq $counter ]; then 196 | echo "Test is frozen. Quiting" 197 | break 198 | fi 199 | counter=$(grep -c "BEGIN" cf/cfe_test.tmp) 200 | echo "Waiting for CFE Tests" 201 | sleep 120 202 | done 203 | 204 | ../host/cmdUtil --endian=LE --pktid=0x1806 --cmdcode=2 --half=0x0002 205 | working-directory: ./build/exe/cpu1/ 206 | 207 | - name: Archive Functional Test Artifacts 208 | uses: actions/upload-artifact@v4 209 | with: 210 | name: cFS-functional-test-log-omit-deprecate-false-${{ matrix.buildtype }} 211 | path: ./build/exe/cpu1/cf/cfe_test.log 212 | 213 | - name: Check for cFS Warnings 214 | run: | 215 | if [[ -z $(grep -i "SUMMARY.*FAIL::0.*TSF::0.*TTF::0" cf/cfe_test.log) ]]; then 216 | echo "Must resolve Test Failures in cFS Test App before submitting a pull request" 217 | echo "" 218 | grep -i '\[ FAIL]\|\[ TSF]\|\[ TTF]' cf/cfe_test.log 219 | exit -1 220 | fi 221 | working-directory: ./build/exe/cpu1/ 222 | -------------------------------------------------------------------------------- /.github/workflows/build-cfs-rtems4.11.yml: -------------------------------------------------------------------------------- 1 | name: Build and Test rtems 4.11 [OMIT_DEPRECATED=true] 2 | 3 | # Run every time a new commit pushed or for pull requests 4 | on: 5 | push: 6 | pull_request: 7 | 8 | env: 9 | OMIT_DEPRECATED: true 10 | CTEST_OUTPUT_ON_FAILURE: true 11 | 12 | # Force bash to apply pipefail option so pipeline failures aren't masked 13 | defaults: 14 | run: 15 | shell: bash 16 | 17 | jobs: 18 | #Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action. 19 | check-for-duplicates: 20 | runs-on: ubuntu-latest 21 | # Map a step output to a job output 22 | outputs: 23 | should_skip: ${{ steps.skip_check.outputs.should_skip }} 24 | steps: 25 | - id: skip_check 26 | uses: fkirc/skip-duplicate-actions@master 27 | with: 28 | concurrent_skipping: 'same_content' 29 | skip_after_successful_duplicate: 'true' 30 | do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' 31 | 32 | build-cfs: 33 | #Continue if check-for-duplicates found no duplicates. Always runs for pull-requests. 34 | needs: check-for-duplicates 35 | if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }} 36 | name: Build 37 | runs-on: ubuntu-22.04 38 | container: ghcr.io/core-flight-system/qemu-rtems-4-11:latest 39 | 40 | strategy: 41 | fail-fast: false 42 | matrix: 43 | buildtype: [debug, release] 44 | 45 | # Set the type of machine to run on 46 | env: 47 | BUILDTYPE: ${{ matrix.buildtype }} 48 | # Set home to where rtems is located 49 | HOME: /root 50 | 51 | steps: 52 | # Check out the cfs bundle 53 | - name: Checkout code 54 | uses: actions/checkout@v4 55 | with: 56 | submodules: true 57 | 58 | # Setup the build system 59 | - name: Copy Files 60 | run: | 61 | cp ./cfe/cmake/Makefile.sample Makefile 62 | cp -r ./cfe/cmake/sample_defs sample_defs 63 | 64 | # Setup the build system 65 | - name: Make Prep 66 | run: make SIMULATION=i686-rtems4.11 prep 67 | 68 | - name: Make 69 | run: make 70 | 71 | test-cfs: 72 | name: Test 73 | runs-on: ubuntu-22.04 74 | container: ghcr.io/core-flight-system/qemu-rtems-4-11:latest 75 | 76 | needs: build-cfs 77 | 78 | strategy: 79 | fail-fast: false 80 | matrix: 81 | buildtype: [debug, release] 82 | 83 | # Set the type of machine to run on 84 | env: 85 | BUILDTYPE: ${{ matrix.buildtype }} 86 | ENABLE_UNIT_TESTS: true 87 | # Set home to where rtems is located 88 | HOME: /root 89 | # Disable mcopy check otherwise disk image build fails 90 | MTOOLS_SKIP_CHECK: 1 91 | 92 | steps: 93 | # Checks out a copy of your repository on the ubuntu-latest machine 94 | - name: Checkout code 95 | uses: actions/checkout@v4 96 | with: 97 | submodules: true 98 | 99 | # Setup the build system 100 | - name: Copy Files 101 | run: | 102 | cp ./cfe/cmake/Makefile.sample Makefile 103 | cp -r ./cfe/cmake/sample_defs sample_defs 104 | 105 | # Setup the build system 106 | - name: Make 107 | run: | 108 | make SIMULATION=i686-rtems4.11 prep 109 | make install 110 | 111 | - name: Test 112 | #run: .github/scripts/qemu_test.sh && .github/scripts/log_failed_tests.sh 113 | run: make O=build SKIP_NET_TESTS=true RTEMS_VERSION=i686-rtems4.11 -f .github/scripts/rtems-test.mk all_tests -k 114 | 115 | - name: Output Failed Tests 116 | # Runs only if a previous step has failed 117 | if: failure() 118 | run: | 119 | # Check if failed-tests is empty or not 120 | if [ -s ./build/exe/cpu1/failed-tests.log ]; then 121 | echo "Failing tests found:" 122 | cat ./build/exe/cpu1/failed-tests.log 123 | fi 124 | 125 | # Always archive test logs 126 | - name: Archive cFS Test Artifacts 127 | uses: actions/upload-artifact@v4 128 | # Runs even if previous steps have failed 129 | if: always() 130 | with: 131 | name: cFS-rtems-log-summary-${{ matrix.buildtype }} 132 | path: ./build/exe/cpu1/*.log 133 | -------------------------------------------------------------------------------- /.github/workflows/build-cfs-rtems5.yml: -------------------------------------------------------------------------------- 1 | name: Build and Test rtems 5 [OMIT_DEPRECATED=true] 2 | 3 | # Run every time a new commit pushed or for pull requests 4 | on: 5 | push: 6 | pull_request: 7 | 8 | env: 9 | OMIT_DEPRECATED: true 10 | CTEST_OUTPUT_ON_FAILURE: true 11 | 12 | # Force bash to apply pipefail option so pipeline failures aren't masked 13 | defaults: 14 | run: 15 | shell: bash 16 | 17 | jobs: 18 | #Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action. 19 | check-for-duplicates: 20 | runs-on: ubuntu-latest 21 | # Map a step output to a job output 22 | outputs: 23 | should_skip: ${{ steps.skip_check.outputs.should_skip }} 24 | steps: 25 | - id: skip_check 26 | uses: fkirc/skip-duplicate-actions@master 27 | with: 28 | concurrent_skipping: 'same_content' 29 | skip_after_successful_duplicate: 'true' 30 | do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' 31 | 32 | build-cfs: 33 | #Continue if check-for-duplicates found no duplicates. Always runs for pull-requests. 34 | needs: check-for-duplicates 35 | if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }} 36 | name: Build 37 | runs-on: ubuntu-22.04 38 | container: ghcr.io/core-flight-system/qemu-rtems-5:latest 39 | 40 | strategy: 41 | fail-fast: false 42 | matrix: 43 | buildtype: [debug, release] 44 | 45 | # Set the type of machine to run on 46 | env: 47 | BUILDTYPE: ${{ matrix.buildtype }} 48 | # Set home to where rtems is located 49 | HOME: /root 50 | 51 | steps: 52 | # Check out the cfs bundle 53 | - name: Checkout code 54 | uses: actions/checkout@v4 55 | with: 56 | submodules: true 57 | 58 | # Setup the build system 59 | - name: Copy Files 60 | run: | 61 | cp ./cfe/cmake/Makefile.sample Makefile 62 | cp -r ./cfe/cmake/sample_defs sample_defs 63 | 64 | # Setup the build system 65 | - name: Make Prep 66 | run: make SIMULATION=i686-rtems5 prep 67 | 68 | - name: Make 69 | run: make 70 | 71 | test-cfs: 72 | name: Test 73 | runs-on: ubuntu-22.04 74 | container: ghcr.io/core-flight-system/qemu-rtems-5:latest 75 | 76 | needs: build-cfs 77 | 78 | strategy: 79 | fail-fast: false 80 | matrix: 81 | buildtype: [debug, release] 82 | 83 | # Set the type of machine to run on 84 | env: 85 | BUILDTYPE: ${{ matrix.buildtype }} 86 | ENABLE_UNIT_TESTS: true 87 | # Set home to where rtems is located 88 | HOME: /root 89 | # Disable mcopy check otherwise disk image build fails 90 | MTOOLS_SKIP_CHECK: 1 91 | 92 | steps: 93 | # Checks out a copy of your repository on the ubuntu-latest machine 94 | - name: Checkout code 95 | uses: actions/checkout@v4 96 | with: 97 | submodules: true 98 | 99 | # Setup the build system 100 | - name: Copy Files 101 | run: | 102 | cp ./cfe/cmake/Makefile.sample Makefile 103 | cp -r ./cfe/cmake/sample_defs sample_defs 104 | 105 | # Setup the build system 106 | - name: Make 107 | run: | 108 | make SIMULATION=i686-rtems5 prep 109 | make install 110 | 111 | - name: Test 112 | #run: .github/scripts/qemu_test.sh && .github/scripts/log_failed_tests.sh 113 | run: make O=build SKIP_NET_TESTS=true RTEMS_VERSION=i686-rtems5 -f .github/scripts/rtems-test.mk all_tests -k 114 | 115 | - name: Output Failed Tests 116 | run: | 117 | # Check if failed-tests is empty or not 118 | if [ -s ./build/exe/cpu1/failed-tests.log ]; then 119 | echo "Failing tests found:" 120 | cat ./build/exe/cpu1/failed-tests.log 121 | fi 122 | 123 | # Always archive test logs 124 | - name: Archive cFS Test Artifacts 125 | uses: actions/upload-artifact@v4 126 | # Runs even if previous steps have failed 127 | if: always() 128 | with: 129 | name: cFS-rtems-log-summary-${{ matrix.buildtype }} 130 | path: ./build/exe/cpu1/*.log 131 | -------------------------------------------------------------------------------- /.github/workflows/build-cfs.yml: -------------------------------------------------------------------------------- 1 | name: Build, Test, and Run [OMIT_DEPRECATED = true] 2 | 3 | # Run every time a new commit pushed or for pull requests 4 | on: 5 | push: 6 | pull_request: 7 | 8 | env: 9 | SIMULATION: native 10 | OMIT_DEPRECATED: true 11 | ENABLE_UNIT_TESTS: true 12 | CTEST_OUTPUT_ON_FAILURE: true 13 | REPO_NAME: ${{ github.event.repository.name }} 14 | 15 | # Force bash to apply pipefail option so pipeline failures aren't masked 16 | defaults: 17 | run: 18 | shell: bash 19 | 20 | jobs: 21 | #Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action. 22 | check-for-duplicates: 23 | runs-on: ubuntu-latest 24 | # Map a step output to a job output 25 | outputs: 26 | should_skip: ${{ steps.skip_check.outputs.should_skip }} 27 | steps: 28 | - id: skip_check 29 | uses: fkirc/skip-duplicate-actions@master 30 | with: 31 | concurrent_skipping: 'same_content' 32 | skip_after_successful_duplicate: 'true' 33 | do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' 34 | 35 | build-cfs-omit-deprecated-true: 36 | name: Build 37 | needs: check-for-duplicates 38 | if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }} 39 | runs-on: ubuntu-22.04 40 | 41 | strategy: 42 | fail-fast: false 43 | matrix: 44 | buildtype: [debug, release] 45 | 46 | # Set the type of machine to run on 47 | env: 48 | BUILDTYPE: ${{ matrix.buildtype }} 49 | 50 | steps: 51 | - name: Cache Source and Build 52 | id: cache-src-bld 53 | uses: actions/cache@v4 54 | with: 55 | path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/* 56 | key: build-${{ github.run_number }}-${{ matrix.buildtype }} 57 | 58 | - name: Checkout cFS 59 | if: steps.cache-src-bld.outputs.cache-hit != 'true' 60 | uses: actions/checkout@v4 61 | with: 62 | submodules: true 63 | 64 | - name: Check versions 65 | run: git submodule 66 | 67 | - name: Copy Makefile 68 | run: | 69 | cp ./cfe/cmake/Makefile.sample Makefile 70 | cp -r ./cfe/cmake/sample_defs sample_defs 71 | - name: Prep Build 72 | run: make prep 73 | 74 | - name: Make 75 | run: make install 76 | 77 | tests-and-coverage-omit-deprecated-true: 78 | name: Run Unit Tests and Check Coverage 79 | needs: build-cfs-omit-deprecated-true 80 | runs-on: ubuntu-22.04 81 | 82 | strategy: 83 | fail-fast: false 84 | matrix: 85 | buildtype: [debug, release] 86 | 87 | # Set the type of machine to run on 88 | env: 89 | BUILDTYPE: ${{ matrix.buildtype }} 90 | ENABLE_UNIT_TESTS: true 91 | 92 | steps: 93 | - name: Install Dependencies 94 | run: sudo apt-get install lcov -y 95 | 96 | - name: Cache Source and Build 97 | id: cache-src-bld 98 | uses: actions/cache@v4 99 | with: 100 | path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/* 101 | key: build-${{ github.run_number }}-${{ matrix.buildtype }} 102 | 103 | - name: Run Tests 104 | run: make test 105 | 106 | - name: Check Coverage 107 | run: make lcov 108 | 109 | run-cfs-omit-deprecated-true: 110 | name: Run 111 | needs: build-cfs-omit-deprecated-true 112 | runs-on: ubuntu-22.04 113 | 114 | strategy: 115 | fail-fast: false 116 | matrix: 117 | buildtype: [debug, release] 118 | 119 | # Set the type of machine to run on 120 | env: 121 | BUILDTYPE: ${{ matrix.buildtype }} 122 | 123 | steps: 124 | - name: Cache Source and Build 125 | id: cache-src-bld 126 | uses: actions/cache@v4 127 | with: 128 | path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/* 129 | key: build-${{ github.run_number }}-${{ matrix.buildtype }} 130 | 131 | 132 | - name: List cpu1 133 | run: ls build/exe/cpu1/ 134 | 135 | - name: Run cFS 136 | run: | 137 | ./core-cpu1 > cFS_startup_cpu1.txt & 138 | sleep 30 139 | ../host/cmdUtil --endian=LE --pktid=0x1806 --cmdcode=2 --half=0x0002 140 | working-directory: ./build/exe/cpu1/ 141 | 142 | - name: Archive cFS Startup Artifacts 143 | uses: actions/upload-artifact@v4 144 | with: 145 | name: cFS-startup-log-omit-deprecate-true-${{ matrix.buildtype }} 146 | path: ./build/exe/cpu1/cFS_startup_cpu1.txt 147 | 148 | - name: Check for cFS Warnings 149 | run: | 150 | if [[ -n $(grep -i "warn\|err\|fail" cFS_startup_cpu1.txt) ]]; then 151 | echo "Must resolve warn|err|fail in cFS startup before submitting a pull request" 152 | echo "" 153 | grep -i 'warn\|err\|fail' cFS_startup_cpu1.txt 154 | exit -1 155 | fi 156 | working-directory: ./build/exe/cpu1/ 157 | 158 | run-functional-test-app-omit-deprecated-true: 159 | #Continue if check-for-duplicates found no duplicates. Always runs for pull-requests. 160 | needs: run-cfs-omit-deprecated-true 161 | runs-on: ubuntu-22.04 162 | timeout-minutes: 15 163 | 164 | strategy: 165 | fail-fast: false 166 | matrix: 167 | buildtype: [debug, release] 168 | 169 | steps: 170 | - name: Cache Source and Build 171 | id: cache-src-bld 172 | uses: actions/cache@v4 173 | with: 174 | path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/* 175 | key: build-${{ github.run_number }}-${{ matrix.buildtype }} 176 | 177 | - name: List cpu1 178 | run: ls build/exe/cpu1/ 179 | 180 | # Run cFS, send commands to set perf trigger and start perf data, and run functional tests 181 | - name: Run cFS Functional Tests 182 | run: | 183 | ./core-cpu1 & 184 | sleep 10 185 | ../host/cmdUtil --pktid=0x1806 --cmdcode=17 --endian=LE --uint32=3 --uint32=0x40000000 186 | ../host/cmdUtil --pktid=0x1806 --cmdcode=14 --endian=LE --uint32=2 187 | ../host/cmdUtil --pktid=0x1806 --cmdcode=4 --endian=LE --string="20:CFE_TEST_APP" --string="20:CFE_TestMain" --string="64:cfe_testcase" --uint32=16384 --uint8=0 --uint8=0 --uint16=100 188 | sleep 30 189 | counter=0 190 | while [[ ! -f cf/cfe_test.log ]]; do 191 | temp=$(grep -c "BEGIN" cf/cfe_test.tmp) 192 | 193 | if [ $temp -eq $counter ]; then 194 | echo "Test is frozen. Quiting" 195 | break 196 | fi 197 | counter=$(grep -c "BEGIN" cf/cfe_test.tmp) 198 | echo "Waiting for CFE Tests" 199 | sleep 120 200 | done 201 | 202 | ../host/cmdUtil --endian=LE --pktid=0x1806 --cmdcode=2 --half=0x0002 203 | working-directory: ./build/exe/cpu1/ 204 | 205 | - name: Archive cFS Startup Artifacts 206 | uses: actions/upload-artifact@v4 207 | with: 208 | name: cFS-functional-test-log-omit-deprecate-true-${{ matrix.buildtype }} 209 | path: ./build/exe/cpu1/cf/cfe_test.log 210 | 211 | - name: Check for cFS Warnings 212 | run: | 213 | if [[ -z $(grep -i "SUMMARY.*FAIL::0.*TSF::0.*TTF::0" cf/cfe_test.log) ]]; then 214 | echo "Must resolve Test Failures in cFS Test App before submitting a pull request" 215 | echo "" 216 | grep -i '\[ FAIL]\|\[ TSF]\|\[ TTF]' cf/cfe_test.log 217 | exit -1 218 | fi 219 | working-directory: ./build/exe/cpu1/ 220 | -------------------------------------------------------------------------------- /.github/workflows/build-deploy-doc.yml: -------------------------------------------------------------------------------- 1 | name: Build Document 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | # Required 7 | target: 8 | description: Document target name(s) as stringified JSON matrix list # Matrix example "[\"x\", \"y\"]" 9 | type: string 10 | required: true 11 | # Optional 12 | app-name: 13 | description: Application name, leave blank if using cache 14 | type: string 15 | required: false 16 | default: '' 17 | cache-key: 18 | description: Cache key to use 19 | type: string 20 | required: false 21 | default: '' 22 | buildpdf: 23 | description: Build the PDF 24 | type: boolean 25 | required: false 26 | default: true 27 | deploy: 28 | description: Deploy archived PDF to gh-pages 29 | type: boolean 30 | required: false 31 | default: true 32 | needs_osal_api: 33 | description: Whether this depends on the osal public api (compatibility bridge) 34 | type: boolean 35 | required: false 36 | default: true 37 | 38 | # Force bash to apply pipefail option so pipeline failures aren't masked 39 | defaults: 40 | run: 41 | shell: bash 42 | 43 | jobs: 44 | # Checks for duplicate actions. Skips push actions if there is a matching or 45 | # duplicate pull-request action. 46 | checks-for-duplicates: 47 | runs-on: ubuntu-latest 48 | # Map a step output to a job output 49 | outputs: 50 | should_skip: ${{ steps.skip_check.outputs.should_skip }} 51 | steps: 52 | - id: skip_check 53 | uses: fkirc/skip-duplicate-actions@master 54 | with: 55 | concurrent_skipping: 'same_content' 56 | skip_after_successful_duplicate: 'true' 57 | do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' 58 | 59 | build-doc: 60 | needs: checks-for-duplicates 61 | if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' || contains(github.ref, 'main') }} 62 | name: Build Documentation 63 | runs-on: ubuntu-22.04 64 | 65 | strategy: 66 | fail-fast: false 67 | matrix: 68 | target: ${{ fromJson(inputs.target) }} 69 | 70 | steps: 71 | - name: Reject non-compatible deployment settings 72 | if: ${{ inputs.deploy == true && inputs.cache-key != '' }} 73 | run: | 74 | echo "Deployment when using cache not supported due to password fail issue" 75 | exit -1 76 | 77 | - name: Get cache if supplied 78 | id: cache-src-bld 79 | if: ${{ inputs.cache-key != '' }} 80 | uses: actions/cache@v4 81 | with: 82 | path: /home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/* 83 | key: ${{ inputs.cache-key }} 84 | 85 | - name: Checkout Bundle Main 86 | if: ${{ inputs.app-name != '' }} 87 | uses: actions/checkout@v4 88 | with: 89 | submodules: true 90 | repository: nasa/cFS 91 | 92 | - name: Checkout Repo 93 | if: ${{ inputs.app-name != '' }} 94 | uses: actions/checkout@v4 95 | with: 96 | path: apps/${{ inputs.app-name }} 97 | 98 | - name: Copy Files 99 | run: | 100 | cp ./cfe/cmake/Makefile.sample Makefile 101 | cp -r ./cfe/cmake/sample_defs sample_defs 102 | 103 | - name: Add Repo To Build 104 | if: ${{ inputs.app-name != '' }} 105 | run: echo 'set(MISSION_GLOBAL_APPLIST ${{ inputs.app-name }})' >> sample_defs/targets.cmake 106 | 107 | - name: Make Prep 108 | run: make prep 109 | 110 | - name: Install Doxygen Dependencies 111 | run: sudo apt-get update && sudo apt-get install doxygen graphviz -y 112 | 113 | - name: Install PDF Generation Dependencies 114 | if: ${{ inputs.buildpdf == true }} 115 | run: | 116 | sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra 117 | 118 | - name: Generate OSAL header list 119 | if: ${{ inputs.needs_osal_api == true }} 120 | run: make -C build osal_public_api_headerlist 121 | 122 | - name: Build Document 123 | run: | 124 | make -C build ${{ matrix.target }} 2>&1 > ${{ matrix.target }}_stdout.txt | tee ${{ matrix.target }}_stderr.txt 125 | mv build/docs/${{ matrix.target }}/${{ matrix.target }}-warnings.log . 126 | 127 | - name: Archive Document Build Logs 128 | uses: actions/upload-artifact@v4 129 | with: 130 | name: ${{ matrix.target }}_doc_build_logs 131 | path: | 132 | ${{ matrix.target }}_stdout.txt 133 | ${{ matrix.target }}_stderr.txt 134 | ${{ matrix.target }}-warnings.log 135 | 136 | - name: Check For Document Build Errors 137 | run: | 138 | if [[ -s ${{ matrix.target }}_stderr.txt ]]; then 139 | cat ${{ matrix.target }}_stderr.txt 140 | exit -1 141 | fi 142 | 143 | - name: Check For Document Warnings 144 | run: | 145 | if [[ -s ${{ matrix.target }}-warnings.log ]]; then 146 | cat ${{ matrix.target }}-warnings.log 147 | exit -1 148 | fi 149 | 150 | - name: Generate PDF 151 | if: ${{ inputs.buildpdf == true }} 152 | run: | 153 | make -C ./build/docs/${{ matrix.target }}/latex 154 | mkdir deploy 155 | mv ./build/docs/${{ matrix.target }}/latex/refman.pdf ./deploy/${{ matrix.target }}.pdf 156 | # Could add pandoc and convert to github markdown 157 | # pandoc ${{ matrix.target }}.pdf -t gfm 158 | 159 | - name: Archive PDF 160 | if: ${{ inputs.buildpdf == true }} 161 | uses: actions/upload-artifact@v4 162 | with: 163 | name: ${{ matrix.target }}_pdf 164 | path: ./deploy/${{ matrix.target }}.pdf 165 | 166 | - name: Deploy to GitHub 167 | if: ${{ inputs.deploy == true }} 168 | uses: JamesIves/github-pages-deploy-action@v4 169 | with: 170 | token: ${{ secrets.GITHUB_TOKEN }} 171 | branch: gh-pages 172 | folder: deploy 173 | single-commit: true 174 | -------------------------------------------------------------------------------- /.github/workflows/build-documentation.yml: -------------------------------------------------------------------------------- 1 | name: cFS Documentation and Guides 2 | 3 | on: 4 | push: 5 | pull_request: 6 | 7 | # Force bash to apply pipefail option so pipeline failures aren't masked 8 | defaults: 9 | run: 10 | shell: bash 11 | 12 | jobs: 13 | # Checks for duplicate actions. Skips push actions if there is a matching or 14 | # duplicate pull-request action. 15 | checks-for-duplicates: 16 | runs-on: ubuntu-latest 17 | # Map a step output to a job output 18 | outputs: 19 | should_skip: ${{ steps.skip_check.outputs.should_skip }} 20 | steps: 21 | - id: skip_check 22 | uses: fkirc/skip-duplicate-actions@master 23 | with: 24 | concurrent_skipping: 'same_content' 25 | skip_after_successful_duplicate: 'true' 26 | do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' 27 | 28 | checkout-and-cache: 29 | name: Custom checkout and cache for cFS documents 30 | needs: checks-for-duplicates 31 | if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' || contains(github.ref, 'main') }} 32 | runs-on: ubuntu-latest 33 | 34 | steps: 35 | - name: Checkout code 36 | uses: actions/checkout@v4 37 | with: 38 | submodules: true 39 | 40 | - name: Cache Source and Build 41 | id: cache-src-bld 42 | uses: actions/cache@v4 43 | with: 44 | path: /home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/* 45 | key: cfs-doc-${{ github.run_number }} 46 | 47 | build-cfs-documentation: 48 | needs: checkout-and-cache 49 | name: Build cFS documents 50 | uses: nasa/cFS/.github/workflows/build-deploy-doc.yml@main 51 | with: 52 | target: "[\"cfe-usersguide\", \"osal-apiguide\", \"mission-doc\"]" 53 | cache-key: cfs-doc-${{ github.run_number }} 54 | deploy: false 55 | 56 | deploy-documentation: 57 | needs: build-cfs-documentation 58 | if: ${{ github.event_name == 'push' && contains(github.ref, 'main') }} 59 | name: Deploy documentation to gh-pages 60 | runs-on: ubuntu-latest 61 | 62 | steps: 63 | - uses: actions/checkout@v4 64 | 65 | - uses: actions/download-artifact@v4 66 | 67 | - name: Display structure of downloaded files 68 | run: ls -R 69 | 70 | - name: Move pdfs to deployment directory 71 | run: mkdir deploy; mv */*.pdf deploy 72 | 73 | - name: Deploy to GitHub 74 | uses: JamesIves/github-pages-deploy-action@v4 75 | with: 76 | token: ${{ secrets.GITHUB_TOKEN }} 77 | branch: gh-pages 78 | folder: deploy 79 | single-commit: true 80 | -------------------------------------------------------------------------------- /.github/workflows/build-run-app.yml: -------------------------------------------------------------------------------- 1 | name: Build And Run 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | # Optional inputs 7 | app-name: 8 | description: Application name, if different from repo name 9 | type: string 10 | required: false 11 | default: ${{ github.event.repository.name }} 12 | startup-string: 13 | description: Startup string to confirm, default will use " Initialized." 14 | type: string 15 | required: false 16 | default: '' 17 | 18 | # Force bash to apply pipefail option so pipeline failures aren't masked 19 | defaults: 20 | run: 21 | shell: bash 22 | 23 | jobs: 24 | # Checks for duplicate actions. Skips push actions if there is a matching or 25 | # duplicate pull-request action. 26 | checks-for-duplicates: 27 | runs-on: ubuntu-latest 28 | # Map a step output to a job output 29 | outputs: 30 | should_skip: ${{ steps.skip_check.outputs.should_skip }} 31 | steps: 32 | - id: skip_check 33 | uses: fkirc/skip-duplicate-actions@master 34 | with: 35 | concurrent_skipping: 'same_content' 36 | skip_after_successful_duplicate: 'true' 37 | do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' 38 | 39 | build-and-run: 40 | needs: checks-for-duplicates 41 | if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' || contains(github.ref, 'main') }} 42 | name: Build and run app, confirm startup message 43 | runs-on: ubuntu-22.04 44 | 45 | steps: 46 | - name: Set up environment variables 47 | # Apps typically use lowercase targets and uppercase names, this logic is fragile but works 48 | run: | 49 | echo "APP_UPPER=$(echo ${{ inputs.app-name }} | sed 's/[a-z]/\U&/g')" >> $GITHUB_ENV 50 | echo "APP_LOWER=$(echo ${{ inputs.app-name }} | sed 's/[A-Z]/\L&/g')" >> $GITHUB_ENV 51 | 52 | - name: Set up start string for verification 53 | run: | 54 | if [[ "${{ inputs.startup-string }}" == '' ]]; then 55 | echo "START_STRING=$APP_UPPER Initialized." >> $GITHUB_ENV 56 | else 57 | echo "START_STRING=${{ inputs.startup-string }}" >> $GITHUB_ENV 58 | fi 59 | 60 | - name: Checkout Bundle Main 61 | uses: actions/checkout@v4 62 | with: 63 | submodules: true 64 | repository: nasa/cFS 65 | 66 | - name: Checkout Repo 67 | uses: actions/checkout@v4 68 | with: 69 | path: apps/${{ env.APP_LOWER }} 70 | 71 | - name: Copy Files 72 | run: | 73 | cp ./cfe/cmake/Makefile.sample Makefile 74 | cp -r ./cfe/cmake/sample_defs sample_defs 75 | 76 | - name: Add To Build 77 | run: | 78 | sed -i "/list(APPEND MISSION_GLOBAL_APPLIST/a list(APPEND MISSION_GLOBAL_APPLIST $APP_LOWER)" sample_defs/targets.cmake 79 | 80 | - name: Add To Startup 81 | run: | 82 | sed -i "1i CFE_APP, $APP_LOWER, ${APP_UPPER}_AppMain, $APP_UPPER, 80, 16384, 0x0, 0;" sample_defs/cpu1_cfe_es_startup.scr 83 | cat sample_defs/cpu1_cfe_es_startup.scr 84 | 85 | - name: Make install 86 | run: make SIMULATION=native BUILDTYPE=release OMIT_DEPRECATED=true install 87 | 88 | - name: Run cFS 89 | working-directory: ./build/exe/cpu1 90 | run: | 91 | ./core-cpu1 > ../../../cFS_startup_cpu1.txt & 92 | sleep 30 93 | ../host/cmdUtil --endian=LE --pktid=0x1806 --cmdcode=2 --half=0x0002 94 | 95 | - name: Archive results 96 | uses: actions/upload-artifact@v4 97 | with: 98 | name: cFS_startup_log 99 | path: cFS_startup_cpu1.txt 100 | 101 | - name: Confirm startup string 102 | run: | 103 | if [[ -z $(grep "$START_STRING" cFS_startup_cpu1.txt) ]]; then 104 | echo "Startup verification string not found in log: $START_STRING" 105 | echo "" 106 | echo "Possible related event messages:" 107 | grep "/$APP_UPPER " cFS_startup_cpu1.txt 108 | exit -1 109 | fi 110 | 111 | - name: Check for cFS Warnings 112 | if: success() || failure() 113 | run: | 114 | if [[ -n $(grep -i "warn\|err\|fail" cFS_startup_cpu1.txt) ]]; then 115 | echo "cFS startup warn|err|fail:" 116 | echo "" 117 | grep -i 'warn\|err\|fail' cFS_startup_cpu1.txt 118 | exit -1 119 | fi 120 | -------------------------------------------------------------------------------- /.github/workflows/cfs-wiki.yml: -------------------------------------------------------------------------------- 1 | name: Update wiki 2 | 3 | on: 4 | # Allows you to run this workflow manually from the Actions tab 5 | workflow_dispatch: 6 | 7 | # Force bash to apply pipefail option so pipeline failures aren't masked 8 | defaults: 9 | run: 10 | shell: bash 11 | 12 | jobs: 13 | build: 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | # Checks out a copy of your repository on the ubuntu-latest machine 18 | - name: Checkout code 19 | uses: actions/checkout@v4 20 | with: 21 | submodules: true 22 | 23 | - name: create CCB agenda 24 | run: python3 .github/scripts/create_ccb_agenda.py 25 | env: 26 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 27 | 28 | - name: Archive CCB agenda artifact 29 | uses: actions/upload-artifact@v4 30 | with: 31 | name: ccb-agenda 32 | path: ./CCBAgenda.md -------------------------------------------------------------------------------- /.github/workflows/changelog.yml: -------------------------------------------------------------------------------- 1 | name: Changelog 2 | 3 | # Controls when the action will run. 4 | on: 5 | # Allows you to run this workflow manually from the Actions tab 6 | workflow_dispatch: 7 | 8 | # Force bash to apply pipefail option so pipeline failures aren't masked 9 | defaults: 10 | run: 11 | shell: bash 12 | 13 | jobs: 14 | build: 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - uses: actions/checkout@v4 19 | 20 | - name: Run Changelog 21 | uses: heinrichreimer/github-changelog-generator-action@v2.1.1 22 | with: 23 | token: ${{ secrets.GITHUB_TOKEN }} 24 | issuesLabel: "### Closed issues" 25 | breakingLabel: "### Breaking changes" 26 | enhancementLabel: "### Implemented enhancements" 27 | bugsLabel: "### Fixed bugs" 28 | deprecatedLabel: "### Deprecated" 29 | removedLabel: "### Removed" 30 | securityLabel: "### Security fixes" 31 | pullRequests: false 32 | author: false 33 | 34 | - name: "Upload changelog" 35 | uses: actions/upload-artifact@v4 36 | with: 37 | name: "Changelog" 38 | path: CHANGELOG.md 39 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | name: "CodeQL Analysis: cFS-Bundle" 2 | 3 | on: 4 | push: 5 | pull_request: 6 | 7 | jobs: 8 | codeql: 9 | uses: nasa/cFS/.github/workflows/codeql-reusable.yml@main 10 | with: 11 | component-path: cFS 12 | make: make -j8 13 | test: true 14 | -------------------------------------------------------------------------------- /.github/workflows/codeql-reusable.yml: -------------------------------------------------------------------------------- 1 | name: "CodeQL Reusable Workflow" 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | # REQUIRED Inputs 7 | component-path: 8 | description: 'Path to repo being tested in a cFS bundle setup' 9 | type: string 10 | required: true 11 | default: cFS 12 | 13 | # Optional inputs 14 | category: 15 | description: 'Analysis Category' 16 | required: false 17 | type: string 18 | 19 | make: 20 | description: 'Build Command' 21 | default: '' #Typically `make` or `make install`. Default is blank for workflows that don't need to build source 22 | required: false 23 | type: string 24 | 25 | prep: 26 | description: 'Make Prep' 27 | default: make prep 28 | required: false 29 | type: string 30 | 31 | setup: 32 | description: 'Build Prep Commands' 33 | type: string 34 | default: cp ./cfe/cmake/Makefile.sample Makefile && cp -r ./cfe/cmake/sample_defs sample_defs 35 | required: false 36 | 37 | test: 38 | description: 'Value for ENABLE_UNIT_TESTS flag' 39 | type: string 40 | default: false 41 | required: false 42 | 43 | # Force bash to apply pipefail option so pipeline failures aren't masked 44 | defaults: 45 | run: 46 | shell: bash 47 | 48 | env: 49 | SIMULATION: native 50 | ENABLE_UNIT_TESTS: ${{inputs.test}} 51 | OMIT_DEPRECATED: true 52 | BUILDTYPE: release 53 | REPO: ${{github.event.repository.name}} 54 | 55 | jobs: 56 | #Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action. 57 | check-for-duplicates: 58 | runs-on: ubuntu-22.04 59 | # Map a step output to a job output 60 | outputs: 61 | should_skip: ${{ steps.skip_check.outputs.should_skip }} 62 | steps: 63 | - id: skip_check 64 | uses: fkirc/skip-duplicate-actions@master 65 | with: 66 | concurrent_skipping: 'same_content' 67 | skip_after_successful_duplicate: 'true' 68 | do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' 69 | 70 | Analysis: 71 | #Continue if check-for-duplicates found no duplicates. Always runs for pull-requests. 72 | needs: check-for-duplicates 73 | if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }} 74 | runs-on: ubuntu-22.04 75 | timeout-minutes: 15 76 | 77 | strategy: 78 | fail-fast: false 79 | matrix: 80 | scan-type: [security, coding-standard] 81 | 82 | permissions: 83 | security-events: write 84 | 85 | steps: 86 | # Setup Bundle directory 87 | - name: Setup cFS-Bundle directory (component-path = cFS) 88 | if: inputs.component-path == 'cFS' 89 | run: 90 | echo "BUILD_DIRECTORY=${{github.workspace}}" >> $GITHUB_ENV 91 | 92 | - name: Setup cFS-Bundle directory (component-path != cFS) 93 | if: inputs.component-path != 'cFS' 94 | run: | 95 | cd .. 96 | git clone https://github.com/nasa/cFS.git --recurse-submodules 97 | cd cFS 98 | echo "BUILD_DIRECTORY=$(pwd)" >> $GITHUB_ENV 99 | git log -1 --pretty=oneline 100 | git submodule 101 | rm -r .git 102 | rm -rf ${{ inputs.component-path }} 103 | ln -s ${{github.workspace}} ${{ inputs.component-path }} 104 | 105 | 106 | - name: Checkout ${{ github.repository }} 107 | uses: actions/checkout@v4 108 | with: 109 | submodules: recursive 110 | 111 | # Setup the build system 112 | - name: cFS Build Setup 113 | run: | 114 | ${{ inputs.setup }} 115 | ${{ inputs.prep }} 116 | working-directory: ${{env.BUILD_DIRECTORY}} 117 | 118 | - name: Initialize CodeQL 119 | uses: github/codeql-action/init@v3 120 | with: 121 | languages: cpp 122 | config-file: nasa/cFS/.github/codeql/codeql-${{matrix.scan-type}}.yml@main 123 | 124 | - name: Build 125 | run: ${{ inputs.make }} 126 | working-directory: ${{env.BUILD_DIRECTORY}} 127 | 128 | - name: Perform CodeQL Analysis 129 | uses: github/codeql-action/analyze@v3 130 | with: 131 | add-snippets: true 132 | category: ${{matrix.scan-type}} 133 | upload: false 134 | output: CodeQL-Sarif-${{ matrix.scan-type }} 135 | 136 | - name: Rename Sarif 137 | run: | 138 | mv CodeQL-Sarif-${{ matrix.scan-type }}/cpp.sarif CodeQL-Sarif-${{ matrix.scan-type }}/Codeql-${{ matrix.scan-type }}.sarif 139 | sed -i 's/"name" : "CodeQL"/"name" : "CodeQL-${{ matrix.scan-type }}"/g' CodeQL-Sarif-${{ matrix.scan-type }}/Codeql-${{ matrix.scan-type }}.sarif 140 | 141 | - name: filter-sarif 142 | uses: zbazztian/filter-sarif@master 143 | with: 144 | patterns: | 145 | -**/*.md 146 | -**/*.txt 147 | -**/*.dox 148 | input: CodeQL-Sarif-${{ matrix.scan-type }}/Codeql-${{ matrix.scan-type }}.sarif 149 | output: CodeQL-Sarif-${{ matrix.scan-type }}/Codeql-${{ matrix.scan-type }}.sarif 150 | 151 | - name: Archive Sarif 152 | uses: actions/upload-artifact@v4 153 | with: 154 | name: CodeQL-Sarif-${{ matrix.scan-type }} 155 | path: CodeQL-Sarif-${{ matrix.scan-type }} 156 | 157 | - name: Upload SARIF 158 | uses: github/codeql-action/upload-sarif@v3 159 | with: 160 | sarif_file: CodeQL-Sarif-${{ matrix.scan-type }}/Codeql-${{ matrix.scan-type }}.sarif 161 | -------------------------------------------------------------------------------- /.github/workflows/format-check.yml: -------------------------------------------------------------------------------- 1 | name: Format Check 2 | 3 | # Run on all push and pull requests 4 | on: 5 | push: 6 | pull_request: 7 | workflow_call: 8 | 9 | # Force bash to apply pipefail option so pipeline failures aren't masked 10 | defaults: 11 | run: 12 | shell: bash 13 | 14 | jobs: 15 | #Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action. 16 | check-for-duplicates: 17 | runs-on: ubuntu-latest 18 | # Map a step output to a job output 19 | outputs: 20 | should_skip: ${{ steps.skip_check.outputs.should_skip }} 21 | steps: 22 | - id: skip_check 23 | uses: fkirc/skip-duplicate-actions@master 24 | with: 25 | concurrent_skipping: 'same_content' 26 | skip_after_successful_duplicate: 'true' 27 | do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' 28 | 29 | format-checker: 30 | name: Run format check 31 | #Continue if check-for-duplicates found no duplicates. Always runs for pull-requests. 32 | needs: check-for-duplicates 33 | if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }} 34 | runs-on: ubuntu-22.04 35 | timeout-minutes: 15 36 | 37 | steps: 38 | - name: Install format checker 39 | run: | 40 | sudo apt-get update && sudo apt-get install clang-format 41 | 42 | - name: Checkout bundle 43 | uses: actions/checkout@v4 44 | with: 45 | repository: nasa/cFS 46 | 47 | - name: Checkout 48 | uses: actions/checkout@v4 49 | with: 50 | path: repo 51 | 52 | - name: Generate format differences 53 | run: | 54 | cd repo 55 | find . -name "*.[ch]" -exec clang-format -i -style=file {} + 56 | git diff > $GITHUB_WORKSPACE/style_differences.txt 57 | 58 | - name: Archive Static Analysis Artifacts 59 | uses: actions/upload-artifact@v4 60 | with: 61 | name: style_differences 62 | path: style_differences.txt 63 | 64 | check-commit-message: 65 | name: Check Commit Message 66 | needs: check-for-duplicates 67 | # Only run for pull-requests. 68 | if: ${{ github.event_name == 'pull_request' }} 69 | runs-on: ubuntu-22.04 70 | timeout-minutes: 15 71 | steps: 72 | # Check each commit message associated with the pull-request against the pattern. 73 | - name: Check each commit message 74 | uses: gsactions/commit-message-checker@v2 75 | if: always() 76 | with: 77 | pattern: '^((Fix|HotFix|Part)\s\#[0-9]+,\s[a-zA-Z0-9]+|Merge\spull\srequest\s\#[0-9]+\s[a-zA-Z0-9]+|IC:\s[a-zA-Z0-9]+)' 78 | error: 'You need at least one "Fix|HotFix|Part #, " line in the commit message.' 79 | excludeDescription: 'true' 80 | excludeTitle: 'true' 81 | checkAllCommitMessages: 'true' 82 | accessToken: ${{ secrets.GITHUB_TOKEN }} 83 | -------------------------------------------------------------------------------- /.github/workflows/static-analysis-misra.yml: -------------------------------------------------------------------------------- 1 | name: Static Analysis with MISRA 2 | 3 | # Run this workflow manually from the Actions tab 4 | on: 5 | workflow_dispatch: 6 | 7 | # Force bash to apply pipefail option so pipeline failures aren't masked 8 | defaults: 9 | run: 10 | shell: bash 11 | 12 | jobs: 13 | #Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action. 14 | check-for-duplicates: 15 | runs-on: ubuntu-latest 16 | # Map a step output to a job output 17 | outputs: 18 | should_skip: ${{ steps.skip_check.outputs.should_skip }} 19 | steps: 20 | - id: skip_check 21 | uses: fkirc/skip-duplicate-actions@master 22 | with: 23 | concurrent_skipping: 'same_content' 24 | skip_after_successful_duplicate: 'true' 25 | do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' 26 | 27 | misra-analysis: 28 | #Continue if check-for-duplicates found no duplicates. Always runs for pull-requests. 29 | needs: check-for-duplicates 30 | if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }} 31 | name: Run cppcheck with misra 32 | runs-on: ubuntu-latest 33 | 34 | strategy: 35 | fail-fast: false 36 | matrix: 37 | cppcheck: [bundle, cfe, osal, psp] 38 | 39 | steps: 40 | - name: Install cppcheck 41 | run: sudo apt-get install cppcheck -y 42 | 43 | # Checks out a copy of the cfs bundle 44 | - name: Checkout code 45 | uses: actions/checkout@v4 46 | with: 47 | submodules: true 48 | 49 | - name: Get MISRA addon 50 | run: | 51 | sudo apt-get install git -y 52 | git clone https://github.com/danmar/cppcheck.git 53 | cp cppcheck/addons/misra.py misra.py 54 | cp cppcheck/addons/cppcheckdata.py cppcheckdata.py 55 | cp cppcheck/addons/misra_9.py misra_9.py 56 | 57 | - name: Run bundle cppcheck 58 | if: ${{matrix.cppcheck =='bundle'}} 59 | run: | 60 | cppcheck --addon=misra --force --inline-suppr --quiet . --xml 2> ${{matrix.cppcheck}}_cppcheck_err.xml 61 | cppcheck --addon=misra --force --inline-suppr --quiet . 2> ${{matrix.cppcheck}}_cppcheck_err.txt 62 | 63 | # Run strict static analysis for embedded portions of cfe, osal, and psp 64 | - name: cfe strict cppcheck 65 | if: ${{matrix.cppcheck =='cfe'}} 66 | run: | 67 | cd ${{matrix.cppcheck}} 68 | cppcheck --addon=misra --force --inline-suppr --std=c99 --language=c --enable=warning,performance,portability,style --suppress=variableScope --inconclusive ./modules/core_api/fsw ./modules/core_private/fsw ./modules/es/fsw ./modules/evs/fsw ./modules/fs/fsw ./modules/msg/fsw ./modules/resourceid/fsw ./modules/sb/fsw ./modules/sbr/fsw ./modules/tbl/fsw ./modules/time/fsw -UCFE_PLATFORM_TIME_CFG_CLIENT -DCFE_PLATFORM_TIME_CFG_SERVER --xml 2> ${{matrix.cppcheck}}_cppcheck_err.xml 69 | cppcheck --addon=misra --force --inline-suppr --std=c99 --language=c --enable=warning,performance,portability,style --suppress=variableScope --inconclusive ./modules/core_api/fsw ./modules/core_private/fsw ./modules/es/fsw ./modules/evs/fsw ./modules/fs/fsw ./modules/msg/fsw ./modules/resourceid/fsw ./modules/sb/fsw ./modules/sbr/fsw ./modules/tbl/fsw ./modules/time/fsw -UCFE_PLATFORM_TIME_CFG_CLIENT -DCFE_PLATFORM_TIME_CFG_SERVER 2> ${{matrix.cppcheck}}_cppcheck_err.txt 70 | 71 | - name: osal strict cppcheck 72 | if: ${{matrix.cppcheck =='osal'}} 73 | run: | 74 | cd ${{matrix.cppcheck}} 75 | cppcheck --addon=misra --force --inline-suppr --std=c99 --language=c --enable=warning,performance,portability,style --suppress=variableScope --inconclusive ./src/bsp ./src/os --xml 2> ${{matrix.cppcheck}}_cppcheck_err.xml 76 | cppcheck --addon=misra --force --inline-suppr --std=c99 --language=c --enable=warning,performance,portability,style --suppress=variableScope --inconclusive ./src/bsp ./src/os 2> ${{matrix.cppcheck}}_cppcheck_err.txt 77 | 78 | - name: psp strict cppcheck 79 | if: ${{matrix.cppcheck =='psp'}} 80 | run: | 81 | cd ${{matrix.cppcheck}} 82 | cppcheck --addon=misra --force --inline-suppr --std=c99 --language=c --enable=warning,performance,portability,style --suppress=variableScope --inconclusive ./fsw --xml 2> ${{matrix.cppcheck}}_cppcheck_err.xml 83 | cppcheck --addon=misra --force --inline-suppr --std=c99 --language=c --enable=warning,performance,portability,style --suppress=variableScope --inconclusive ./fsw 2> ${{matrix.cppcheck}}_cppcheck_err.txt 84 | 85 | - name: Convert bundle cppcheck to sarif 86 | uses: airtower-luna/convert-to-sarif@v0.2.0 87 | if: ${{matrix.cppcheck =='bundle'}} 88 | with: 89 | tool: 'CppCheck' 90 | input_file: '${{matrix.cppcheck}}_cppcheck_err.xml' 91 | sarif_file: '${{matrix.cppcheck}}_cppcheck_err.sarif' 92 | 93 | - name: Convert cfe, osal, psp cppcheck to sarif 94 | uses: airtower-luna/convert-to-sarif@v0.2.0 95 | if: ${{matrix.cppcheck !='bundle'}} 96 | with: 97 | tool: 'CppCheck' 98 | input_file: '${{matrix.cppcheck}}/${{matrix.cppcheck}}_cppcheck_err.xml' 99 | sarif_file: '${{matrix.cppcheck}}_cppcheck_err.sarif' 100 | 101 | - name: Define workspace 102 | run: | 103 | echo "CONTAINER_WORKSPACE=${PWD}" >> ${GITHUB_ENV} 104 | 105 | - name: Archive bundle static analysis artifacts 106 | uses: actions/upload-artifact@v4 107 | if: ${{matrix.cppcheck =='bundle'}} 108 | with: 109 | name: ${{matrix.cppcheck}}-cppcheck-err 110 | path: ./*cppcheck_err.* 111 | 112 | - name: Archive osal, cfe, and psp static analysis artifacts 113 | uses: actions/upload-artifact@v4 114 | if: ${{matrix.cppcheck !='bundle'}} 115 | with: 116 | name: ${{matrix.cppcheck}}-cppcheck-err 117 | path: ./${{matrix.cppcheck}}/*cppcheck_err.* 118 | 119 | - name: Upload sarif results 120 | uses: github/codeql-action/upload-sarif@v3 121 | with: 122 | sarif_file: '${{matrix.cppcheck}}_cppcheck_err.sarif' 123 | checkout_path: ${{ env.CONTAINER_WORKSPACE }} 124 | 125 | - name: Check for errors 126 | run: | 127 | if [[ -s ${{matrix.cppcheck}}_cppcheck_err.txt ]]; 128 | then 129 | cat ${{matrix.cppcheck}}_cppcheck_err.txt 130 | exit -1 131 | fi 132 | -------------------------------------------------------------------------------- /.github/workflows/static-analysis-reuse.yml: -------------------------------------------------------------------------------- 1 | name: Bundle Static Analysis 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | static-analysis: 8 | name: Static Analysis 9 | uses: nasa/cFS/.github/workflows/static-analysis.yml@main 10 | -------------------------------------------------------------------------------- /.github/workflows/static-analysis.yml: -------------------------------------------------------------------------------- 1 | name: Static Analysis 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | strict-dir-list: 7 | description: 'Directory List' 8 | type: string 9 | default: '' 10 | cmake-project-options: 11 | description: 'Command line options to pass to CMake' 12 | type: string 13 | default: '' 14 | cppcheck-xslt-path: 15 | description: 'Path to XSLT file for translating cppcheck XML output' 16 | type: string 17 | default: 'nasa/cFS/main/.github/scripts' 18 | 19 | # Force bash to apply pipefail option so pipeline failures aren't masked 20 | defaults: 21 | run: 22 | shell: bash 23 | 24 | jobs: 25 | #Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action. 26 | check-for-duplicates: 27 | name: Check for Duplicates 28 | runs-on: ubuntu-latest 29 | # Map a step output to a job output 30 | outputs: 31 | should_skip: ${{ steps.skip_check.outputs.should_skip }} 32 | steps: 33 | - id: skip_check 34 | uses: fkirc/skip-duplicate-actions@master 35 | with: 36 | concurrent_skipping: 'same_content' 37 | skip_after_successful_duplicate: 'true' 38 | do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' 39 | 40 | static-analysis: 41 | #Continue if check-for-duplicates found no duplicates. Always runs for pull-requests. 42 | needs: check-for-duplicates 43 | if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }} 44 | name: Run cppcheck 45 | runs-on: ubuntu-22.04 46 | 47 | strategy: 48 | fail-fast: false 49 | 50 | steps: 51 | - name: Install cppcheck 52 | run: sudo apt-get install cppcheck xsltproc -y 53 | 54 | - name: Install sarif tool 55 | run: npm install @microsoft/sarif-multitool 56 | 57 | - name: Fetch conversion XSLT 58 | run: | 59 | wget -O cppcheck-xml2text.xslt https://raw.githubusercontent.com/${{ inputs.cppcheck-xslt-path }}/cppcheck-xml2text.xslt 60 | wget -O cppcheck-merge.xslt https://raw.githubusercontent.com/${{ inputs.cppcheck-xslt-path }}/cppcheck-merge.xslt 61 | 62 | # Checks out a copy of the reference repository 63 | - name: Checkout subject repository 64 | uses: actions/checkout@v4 65 | with: 66 | path: source 67 | submodules: true 68 | 69 | # For a CMake-based project, get the list of files by setting up a build with CMAKE_EXPORT_COMPILE_COMMANDS=ON and 70 | # referencing the compile_commands.json file produced by the tool. This will capture the correct include paths and 71 | # compile definitions based on how the source is actually compiled. 72 | - name: CMake Setup 73 | if: ${{ inputs.cmake-project-options != '' }} 74 | run: | 75 | cmake -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/staging -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=debug ${{ inputs.cmake-project-options }} -S source -B build 76 | echo CPPCHECK_OPTS=--project="$GITHUB_WORKSPACE/build/compile_commands.json" >> $GITHUB_ENV 77 | 78 | # For a Non-CMake project, just pass the base source directory of the repo. This will examine all .c files in the repo, 79 | # but it will not see the macro definitions, and thus may not correctly interpret macro usage. 80 | - name: Non-CMake Setup 81 | if: ${{ inputs.cmake-project-options == '' }} 82 | run: | 83 | echo CPPCHECK_OPTS="$GITHUB_WORKSPACE/source" >> $GITHUB_ENV 84 | 85 | - name: Run general cppcheck 86 | run: cppcheck --force --inline-suppr --xml $CPPCHECK_OPTS 2> cppcheck_err.xml 87 | 88 | # Run strict static analysis for selected portions of source code 89 | - name: Run Strict cppcheck 90 | if: ${{ inputs.strict-dir-list !='' }} 91 | working-directory: ${{ github.workspace }}/source 92 | run: cppcheck --force --inline-suppr --std=c99 --language=c --enable=warning,performance,portability,style --suppress=variableScope --inconclusive --xml ${{ inputs.strict-dir-list }} 2> ../strict_cppcheck_err.xml 93 | 94 | - name: Merge cppcheck results 95 | if: ${{ inputs.strict-dir-list !='' }} 96 | run: | 97 | mv cppcheck_err.xml general_cppcheck_err.xml 98 | xsltproc --stringparam merge_file strict_cppcheck_err.xml cppcheck-merge.xslt general_cppcheck_err.xml > cppcheck_err.xml 99 | 100 | - name: Convert cppcheck results to SARIF 101 | run: npx "@microsoft/sarif-multitool" convert "cppcheck_err.xml" --tool "CppCheck" --output "cppcheck_err.sarif" 102 | 103 | - name: Convert cppcheck results to Markdown 104 | run: xsltproc cppcheck-xml2text.xslt cppcheck_err.xml | tee $GITHUB_STEP_SUMMARY cppcheck_err.txt 105 | 106 | - name: Upload SARIF results 107 | uses: github/codeql-action/upload-sarif@v3 108 | with: 109 | sarif_file: ${{ github.workspace }}/cppcheck_err.sarif 110 | checkout_path: ${{ github.workspace }}/source 111 | category: 'cppcheck' 112 | 113 | - name: Archive static analysis artifacts 114 | uses: actions/upload-artifact@v4 115 | with: 116 | name: cppcheck-errors 117 | path: ./*cppcheck_err.* 118 | 119 | - name: Check for reported errors 120 | run: tail -n 1 cppcheck_err.txt | grep -q '^\*\*0 error(s) reported\*\*$' 121 | -------------------------------------------------------------------------------- /.github/workflows/unit-test-coverage.yml: -------------------------------------------------------------------------------- 1 | name: Unit Test and Coverage 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | # Optional inputs 7 | app-name: 8 | description: Application name, if different from repo name 9 | type: string 10 | required: false 11 | default: ${{ github.event.repository.name }} 12 | max-missed-branches: 13 | description: Maximum number of missed branches 14 | type: number 15 | required: false 16 | default: 0 17 | max-missed-lines: 18 | description: Maximum number of missed lines 19 | type: number 20 | required: false 21 | default: 0 22 | 23 | # Force bash to apply pipefail option so pipeline failures aren't masked 24 | defaults: 25 | run: 26 | shell: bash 27 | 28 | jobs: 29 | # Checks for duplicate actions. Skips push actions if there is a matching or 30 | # duplicate pull-request action. 31 | checks-for-duplicates: 32 | runs-on: ubuntu-latest 33 | # Map a step output to a job output 34 | outputs: 35 | should_skip: ${{ steps.skip_check.outputs.should_skip }} 36 | steps: 37 | - id: skip_check 38 | uses: fkirc/skip-duplicate-actions@master 39 | with: 40 | concurrent_skipping: 'same_content' 41 | skip_after_successful_duplicate: 'true' 42 | do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' 43 | 44 | unit-test-coverage: 45 | needs: checks-for-duplicates 46 | if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' || contains(github.ref, 'main') }} 47 | name: Build, run unit tests and enforce coverage 48 | runs-on: ubuntu-22.04 49 | 50 | steps: 51 | - name: Install coverage tools 52 | run: sudo apt-get install lcov -y 53 | 54 | - name: Set up environment variables 55 | # Apps typically use lowercase targets and uppercase names, this logic is fragile but works 56 | run: | 57 | echo "APP_UPPER=$(echo ${{ inputs.app-name }} | sed 's/[a-z]/\U&/g')" >> $GITHUB_ENV 58 | echo "APP_LOWER=$(echo ${{ inputs.app-name }} | sed 's/[A-Z]/\L&/g')" >> $GITHUB_ENV 59 | 60 | - name: Checkout Bundle Main 61 | uses: actions/checkout@v4 62 | with: 63 | submodules: true 64 | repository: nasa/cFS 65 | 66 | - name: Checkout Repo 67 | uses: actions/checkout@v4 68 | with: 69 | path: apps/${{ env.APP_LOWER }} 70 | 71 | - name: Copy Files 72 | run: | 73 | cp ./cfe/cmake/Makefile.sample Makefile 74 | cp -r ./cfe/cmake/sample_defs sample_defs 75 | 76 | - name: Add Repo To Build 77 | run: | 78 | sed -i "/list(APPEND MISSION_GLOBAL_APPLIST/a list(APPEND MISSION_GLOBAL_APPLIST $APP_LOWER)" sample_defs/targets.cmake 79 | 80 | - name: Make Prep 81 | run: make SIMULATION=native ENABLE_UNIT_TESTS=true OMIT_DEPRECATED=true prep 82 | 83 | - name: Build app build dependencies 84 | run: make -C build/tools/elf2cfetbl 85 | 86 | - name: Build app target 87 | run: | 88 | make -C build/native/default_cpu1/apps/$APP_LOWER 89 | 90 | - name: Capture initial lcov and run test 91 | run: | 92 | lcov --capture --initial --directory build --output-file coverage_base.info 93 | (cd build/native/default_cpu1/apps/$APP_LOWER; ctest --verbose) | tee test_results.txt 94 | 95 | - name: Calculate coverage 96 | run: | 97 | lcov --capture --rc lcov_branch_coverage=1 --directory build --output-file coverage_test.info 98 | lcov --rc lcov_branch_coverage=1 --add-tracefile coverage_base.info --add-tracefile coverage_test.info --output-file coverage_total.info 99 | genhtml coverage_total.info --branch-coverage --output-directory lcov | tee lcov_out.txt 100 | 101 | - name: Confirm minimum coverage 102 | run: | 103 | branch_nums=$(grep -A 3 "Overall coverage rate" lcov_out.txt | grep branches | grep -oP "[0-9]+[0-9]*") 104 | line_nums=$(grep -A 3 "Overall coverage rate" lcov_out.txt | grep lines | grep -oP "[0-9]+[0-9]*") 105 | 106 | branch_diff=$(echo $branch_nums | awk '{ print $4 - $3 }') 107 | line_diff=$(echo $line_nums | awk '{ print $4 - $3 }') 108 | if [ $branch_diff -gt ${{ inputs.max-missed-branches }} ] || [ $line_diff -gt ${{ inputs.max-missed-lines }} ] 109 | then 110 | grep -A 3 "Overall coverage rate" lcov_out.txt 111 | echo "$branch_diff branches missed, ${{ inputs.max-missed-branches }} allowed" 112 | echo "$line_diff lines missed, ${{ inputs.max-missed-lines }} allowed" 113 | exit -1 114 | fi 115 | 116 | - name: Archive results 117 | # Upload if success or failure which supports skipping, unlike always() 118 | if: success() || failure() 119 | uses: actions/upload-artifact@v4 120 | with: 121 | name: Unit test and coverage results 122 | path: | 123 | test_results.txt 124 | lcov_out.txt 125 | lcov 126 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | build 3 | /sample_defs 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "cfe"] 2 | path = cfe 3 | url = https://github.com/nasa/cFE.git 4 | branch = main 5 | [submodule "osal"] 6 | path = osal 7 | url = https://github.com/nasa/osal.git 8 | branch = main 9 | [submodule "psp"] 10 | path = psp 11 | url = https://github.com/nasa/PSP.git 12 | branch = main 13 | [submodule "apps/ci_lab"] 14 | path = apps/ci_lab 15 | url = https://github.com/nasa/ci_lab.git 16 | branch = main 17 | [submodule "apps/sample_app"] 18 | path = apps/sample_app 19 | url = https://github.com/nasa/sample_app.git 20 | branch = main 21 | [submodule "apps/sample_lib"] 22 | path = libs/sample_lib 23 | url = https://github.com/nasa/sample_lib.git 24 | branch = main 25 | [submodule "apps/sch_lab"] 26 | path = apps/sch_lab 27 | url = https://github.com/nasa/sch_lab.git 28 | branch = main 29 | [submodule "apps/to_lab"] 30 | path = apps/to_lab 31 | url = https://github.com/nasa/to_lab.git 32 | branch = main 33 | [submodule "tools/cFS-GroundSystem"] 34 | path = tools/cFS-GroundSystem 35 | url = https://github.com/nasa/cFS-GroundSystem.git 36 | branch = main 37 | [submodule "tools/elf2cfetbl"] 38 | path = tools/elf2cfetbl 39 | url = https://github.com/nasa/elf2cfetbl.git 40 | branch = main 41 | [submodule "tools/tblCRCTool"] 42 | path = tools/tblCRCTool 43 | url = https://github.com/nasa/tblCRCTool.git 44 | branch = main 45 | -------------------------------------------------------------------------------- /.lgtm.yml: -------------------------------------------------------------------------------- 1 | queries: 2 | - include: "*" 3 | - exclude: "cpp/class-many-fields" 4 | - exclude: "cpp/long-switch" 5 | - exclude: "cpp/trivial-switch" 6 | 7 | path_classifiers: 8 | generated: 9 | - "**/Ui_*" 10 | 11 | extraction: 12 | python: 13 | python_setup: 14 | version: "3" 15 | index: 16 | include: "tools/cFS-GroundSystem" 17 | cpp: 18 | index: 19 | build_command: 20 | - "cp cfe/cmake/Makefile.sample Makefile" 21 | - "cp -r cfe/cmake/sample_defs sample_defs" 22 | - "make OMIT_DEPRECATED=true prep" 23 | - "make" 24 | 25 | -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- 1 | # This CITATION.cff file was generated with cffinit. 2 | # Visit https://bit.ly/cffinit to generate yours today! 3 | 4 | cff-version: 1.2.0 5 | title: core Flight System (cFS) 6 | message: >- 7 | If you'd like to cite this software, please feel free to use the metadata from this file. 8 | type: software 9 | authors: 10 | - name: NASA's Goddard Space Flight Center 11 | address: 8800 Greenbelt Road 12 | city: Greenbelt 13 | country: US 14 | post-code: '20771' 15 | alias: NASA/GSFC 16 | repository-code: 'https://github.com/nasa/cFS' 17 | url: 'https://cfs.gsfc.nasa.gov/' 18 | abstract: >- 19 | The Core Flight System (cFS) is a generic flight software 20 | architecture framework used on flagship spacecraft, human 21 | spacecraft, cubesats, and Raspberry Pi. This repository is 22 | a bundle of submodules that make up the cFS framework. 23 | Note the "lab" apps are intended as examples only, and 24 | enable this bundle to build, execute, receive commands, 25 | and send telemetry. This is not a flight distribution, 26 | which is typically made up of the cFE, OSAL, PSP, and a 27 | selection of flight apps that correspond to specific 28 | mission requirements. 29 | keywords: 30 | - Flight Software 31 | - core Flight Executable (cFE) 32 | - Operating System Abstraction Layer (OSAL) 33 | - Platform Support Package (PSP) 34 | - Framework 35 | - System 36 | license: Apache-2.0 37 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. 5 | 6 | ## Our Standards 7 | Examples of behavior that contributes to creating a positive environment include: 8 | * Using welcoming and inclusive language 9 | * Being respectful of differing viewpoints and experiences 10 | * Gracefully accepting constructive criticism 11 | * Focusing on what is best for the community 12 | * Showing empathy towards other community members 13 | 14 | Examples of unacceptable behavior by participants include: 15 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 16 | * Trolling, insulting/derogatory comments, and personal or political attacks 17 | * Public or private harassment 18 | * Publishing others’ private information, such as a physical or electronic address, without explicit permission 19 | * Other conduct which could reasonably be considered inappropriate in a professional setting 20 | 21 | ## Our Responsibilities 22 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 23 | 24 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 25 | 26 | ## Scope 27 | This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 28 | 29 | ## Enforcement 30 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by [contacting the cFS Product Team](README.md#contact-the-cfs-product-team). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 31 | 32 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project’s leadership. 33 | 34 | ## Attribution 35 | This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 36 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Core Flight System Contributing Guide 2 | 3 | So you'd like to contribute to cFS? Below are some guidelines for contributors to follow. Contributions come in all shapes and sizes. We appreciate your help with documentation, unit tests, framework code, continuous-integration, or simply reporting bugs and improvement ideas. We can't promise that we'll accept every suggestion or fix every bug in a timely manner but we'll respond to you as quickly as possible. 4 | 5 | 6 | - [Code of Conduct](#code-of-conduct) 7 | - [Ways to Contribute](#ways-to-contribute) 8 | - [Discussions and Questions](#discussions-and-questions) 9 | - [Security Vulnerabilities](#security-vulnerabilities) 10 | - [Bug Reports](#bug-reports) 11 | - [Before Reporting a Bug](#before-reporting-a-bug) 12 | - [Reporting a Bug](#reporting-a-bug) 13 | - [What Happens to my Bug Report?](#what-happens-to-my-bug-report) 14 | - [New Feature Requests](#new-feature-requests) 15 | - [Before Requesting a New Feature](#before-requesting-a-new-feature) 16 | - [Requesting a New Feature](#requesting-a-new-feature) 17 | - [What Happens to my Feature Request?](#what-happens-to-my-feature-request) 18 | - [Issue Trackers for cFS Components](#issue-trackers-for-cfs-components) 19 | - [cFS-Framework Components](#cfs-framework-components) 20 | - [Lab Apps](#lab-apps) 21 | - [Tools](#tools) 22 | - [Other cFS Apps](#other-cfs-apps) 23 | - [Pull Requests](#pull-requests) 24 | - [Contributor License Agreement (CLA)](#contributor-license-agreement-cla) 25 | - [Before starting your Pull Request](#before-starting-your-pull-request) 26 | - [Creating a Pull Request](#creating-a-pull-request) 27 | - [What Happens to My Pull Request?](#what-happens-to-my-pull-request) 28 | - [Writing High-Quality Code](#writing-high-quality-code) 29 | - [Using GitHub Actions Workflows](#using-github-actions-workflows) 30 | - [View Failed Workflows](#view-failed-workflows) 31 | - [View Workflow Results](#view-workflow-results) 32 | - [Configure Workflows](#configure-workflows) 33 | - [cFS Workflows](#cfs-workflows) 34 | - [Git Commit Guidelines](#git-commit-guidelines) 35 | - [Working with git commits](#working-with-git-commits) 36 | 37 | 41 | 42 | 43 | ## Code of Conduct 44 | 45 | This project and everyone participating in it is governed by the [cFS Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to the [product team](README.md#contact-the-cfs-product-team). 46 | 47 | ## Ways to Contribute 48 | 49 | ### Discussions and Questions 50 | 51 | For discussions, questions, or ideas, [start a new discussion](https://github.com/nasa/cFS/discussions/new) in the cFS repository under the Discussions tab. If you prefer email, you can also [join the cfs community mailing list](README.md#join-the-mailing-list). 52 | 53 | ### Security Vulnerabilities 54 | 55 | Please view our [Security Policy](https://github.com/nasa/cFS/security/policy) for more information. 56 | 57 | ### Bug Reports 58 | 59 | #### Before Reporting a Bug 60 | 1. Perform a cursory search to see if the bug has already been reported. For issues in each submodule, check the issue trackers in the relevant [cFS component/submodule](#IssueTrackersforcFSComponents). If a bug has been reported and the issue is still open, add a comment to the existing issue instead of opening a new one. 61 | 2. Determine which repository the bug should be reported in. If you are not sure, place the [issue in NASA/cFS](https://github.com/nasa/cFS/issues/new?assignees=&labels=&template=bug_report.md&title=). 62 | 63 | #### Reporting a Bug 64 | 65 | If you find a bug in our code don't hesitate to report it: 66 | 67 | 1. Open an issue using the bug report template. 68 | 2. Describe the issue. 69 | 3. Describe the expected behavior if the bug did not occur. 70 | 4. Provide the reproduction steps that someone else can follow to recreate the bug or error on their own. 71 | 5. If applicable, add code snippets or references to the software. 72 | 6. Provide the system the bug was observed on including the hardware, operating system, and versions. 73 | 7. Provide any additional context if applicable. 74 | 8. Provide your full name or GitHub username and your company organization if applicable. 75 | 76 | #### What Happens to my Bug Report? 77 | 78 | 1. The cFS team will label the issue. 79 | 2. A team member will try to reproduce the issue with your provided steps. If the team is able to reproduce the issue, the issue will be left to be implemented by someone. 80 | 81 | ### New Feature Requests 82 | 83 | cFS has a multitude of users from different fields and backgrounds. We appreciate your ideas for enhancements! 84 | 85 | #### Before Requesting a New Feature 86 | 87 | 1. Review the [cFS README](README.md) to see if your feature is in the major future work. 88 | 2. Perform a cursory search to see if the feature has already been requested. For issues in each submodule, check the issue trackers in the relevant [cFS component/submodule](#IssueTrackersforcFSComponents). If a feature request has been reported and the issue is still open, add a comment to the existing issue instead of opening a new one. 89 | 3. Determine which repository the feature should be reported in. If you are not sure, [place the issue in NASA/cFS](https://github.com/nasa/cFS/issues/new?assignees=&labels=&template=feature_request.md&title=). 90 | 91 | #### Requesting a New Feature 92 | 93 | 1. Open an issue using the feature request template. 94 | 2. Describe the feature. 95 | 3. Describe the solution you would like. 96 | 4. Describe alternatives you've considered. 97 | 5. Provide any additional context if applicable. 98 | 6. Provide your full name or GitHub username and your company organization if applicable. 99 | 100 | #### What Happens to my Feature Request? 101 | 102 | 1. The project team will label the issue. 103 | 2. The project team will evaluate the feature request, possibly asking you more questions to understand its purpose and any relevant requirements. If the issue is closed, the team will convey their reasoning and suggest an alternative path forward. 104 | 3. If the feature request is accepted, it will be marked for implementation. 105 | 106 | ### Issue Trackers for cFS Components 107 | 108 | Before you [report bugs](#BugReports) or submit [feature requests](#FeatureRequests), search through the open issues in each submodule to ensure that your ticket is relevant, not redundant, nor in conflict with other open or pull requests issues: 109 | 110 | If your bug or feature hasn't been reported or requested before, create a new issue in the appropriate repository. If you find a similar issue, please add a comment on it with your experience or input. 111 | 112 | Please ensure that your name is associated with your github profile before contributing. 113 | 114 | For issues related to continuous testing workflows or multi-component "epics" start at the "framework bundle" 115 | - [cFS Bundle](https://github.com/nasa/cfs/issues) 116 | 117 | 118 | #### cFS-Framework Components 119 | 120 | - [cFE](https://github.com/nasa/cfe/issues) 121 | - [OSAL](https://github.com/nasa/osal/issues) 122 | - [PSP](https://github.com/nasa/psp/issues) 123 | 124 | #### Lab Apps 125 | 126 | - [ci\_lab](https://github.com/nasa/ci_lab/issues) 127 | - [sample\_app](https://github.com/nasa/sample_app/issues) 128 | - [sample\_lib](https://github.com/nasa/sample_lib/issues) 129 | - [sch\_lab](https://github.com/nasa/sch_lab/issues) 130 | - [to\_lab](https://github.com/nasa/to_lab/issues) 131 | 132 | #### Tools 133 | 134 | - [cFS-GroundSystem](https://github.com/nasa/cFS-GroundSystem/issues) 135 | - [elf2cfetbl](https://github.com/nasa/elf2cfetbl/issues) 136 | - [tblCRCTool](https://github.com/nasa/tblCRCTool/issues) 137 | 138 | #### Other cFS Apps 139 | 140 | - [BP](https://github.com/nasa/BP/issues) 141 | - [CF](https://github.com/nasa/CF/issues) 142 | - [CS](https://github.com/nasa/CS/issues) 143 | - [DS](https://github.com/nasa/DS/issues) 144 | - [FM](https://github.com/nasa/FM/issues) 145 | - [HK](https://github.com/nasa/HK/issues) 146 | - [HS](https://github.com/nasa/HS/issues) 147 | - [LC](https://github.com/nasa/LC/issues) 148 | - [MD](https://github.com/nasa/MD/issues) 149 | - [MM](https://github.com/nasa/MM/issues) 150 | - [SC](https://github.com/nasa/SC/issues) 151 | - [SCH](https://github.com/nasa/SCH/issues) 152 | 153 | 154 | ### Pull Requests 155 | 156 | #### Contributor License Agreement (CLA) 157 | 158 | Before your code can be merged into our repositories, we require a contributor license agreement (CLA) for individual and corporate contributors. You can submit this by downloading, signing, and emailing the appropriate form to [GSFC-SoftwareRelease@mail.nasa.gov](mailto:GSFC-SoftwareRelease@mail.nasa.gov) and copy [cfs-program@lists.nasa.gov](mailto:cfs-program@lists.nasa.gov). 159 | 160 | Currently we have separate forms for the Framework repositories and the Apps. See the sections below to know which one to submit. We plan on combining these in the future. 161 | 162 | ##### cFS-Framework CLA 163 | 164 | For contributions to the cFS-Framework repositories: [cFE](https://github.com/nasa/cFE), [osal](https://github.com/nasa/osal), [psp](https://github.com/nasa/psp), or submodules in the [apps](apps), [libs](libs), and [tools](tools) directories. 165 | 166 | - [cFS-Framework Corporate CLA](cFS_Framework_Corporate_CLA.pdf) 167 | 168 | - [cFS-Framework Individual CLA](cFS_Framework_Individual_CLA.pdf) 169 | 170 | ##### cFS-Apps CLA 171 | 172 | For contributions to the cFS Apps repositories [BP](https://github.com/nasa/bp), [CF](https://github.com/nasa/cf), [CS](https://github.com/nasa/cs), [DS](https://github.com/nasa/ds), [FM](https://github.com/nasa/fm), [HK](https://github.com/nasa/HK/), [HS](https://github.com/nasa/HS/), [LC](https://github.com/nasa/LC/), [MD](https://github.com/nasa/MD/), [MM](https://github.com/nasa/MM/), [SC](https://github.com/nasa/SC), [SCH](https://github.com/nasa/SCH) 173 | 174 | - [cFS-Apps Corporate CLA](cFS_Apps_Corporate_CLA.pdf) 175 | 176 | - [cFS-Apps Individual CLA](cFS_Apps_Individual_CLA.pdf) 177 | 178 | #### Before starting your Pull Request 179 | 180 | Ready to Add Your Code? Follow GitHub's fork-branch-pull request pattern. 181 | 182 | 1. Fork the relevant cFS component (eg. cfe, osal, psp). 183 | 184 | 2. Find the related issue number or create an associated issue that explains the intent of your new code. 185 | 186 | 3. Create a new branch in your fork to work on your fix. We recommend naming your branch `fix-ISSUE_NUMBER-`. 187 | 188 | 3. Add commits to your branch. For information on commit messages, review [How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/) and our [git commit guidelines](#GitCommitGuidelines). 189 | 190 | #### Creating a Pull Request 191 | 192 | We recommend creating your pull-request as a "draft" and to commit early and often so the community can give you feedback at the beginning of the process as opposed to asking you to change hours of hard work at the end. 193 | 194 | 1. For the title, use the title convention `Fix #XYZ, SHORT_DESCRIPTION`. 195 | 2. Describe the contribution. First document which issue number was fixed using the template "Fix #XYZ". Then describe the contribution. 196 | 3. Provide what testing was used to confirm the pull request resolves the link issue. If writing new code, also provide the associated coverage unit tests. 197 | 4. Provide the expected behavior changes of the pull request. 198 | 5. Provide the system the bug was observed on including the hardware, operating system, and versions. 199 | 6. Provide any additional context if applicable. 200 | 7. Provide your full name or GitHub username and your company or organization if applicable. 201 | 8. Verify that the PR passes all workflow checks. If you expect some of these checks to fail. Please note it in the Pull Request text or comments. 202 | 203 | #### What Happens to My Pull Request? 204 | 205 | 1. The cFS team will label and evaluate the pull request in the [weekly configuration control board meeting](https://github.com/nasa/cFS/wiki/The-cFS-CCB-Process). 206 | 2. If the pull request is accepted, it will be merged into cFS. 207 | 208 | ## Writing High-Quality Code 209 | 210 | 1. Follow cFS code conventions (formatting, symbol naming, file naming, etc). Do *not* change or reformat existing code, except to address your changes. 211 | - The Format Check Workflow helps users follow [our coding style](https://github.com/nasa/cFS/blob/main/.clang-format); see [Using GitHub Actions Workflows](#using-github-actions-workflows) to learn more about these. 212 | - Check our [Naming Convention Guide](https://github.com/nasa/cFE/blob/main/docs/cFS_IdentifierNamingConvention.md) provides a simple naming convention guide for cFE/cFS for commands and telemetry that simplifies the EDS to ground telemetry and commands database conversion. 213 | - The [cFE Application Developers Guide](https://github.com/nasa/cFE/blob/main/docs/cFE%20Application%20Developers%20Guide.md) contains code conventions such as naming conventions for header files. 214 | 215 | 2. For new APIs, add unit tests to cover nominal and off-nominal conditions. 216 | 217 | 3. Add or expand stub functions for the unit test codebase when adding or modifying functions. 218 | 219 | 4. If changing existing APIs, update the unit tests to cover these changes and remove tests that are no longer relevant. 220 | 221 | 5. Review the static code analyses results from the Static Analysis and CodeQL Analysis workflows. For more information on how to use these workflows, view [Using GitHub Actions Workflows](#using-github-actions-workflows). 222 | - Push code changes to the appropriate forked repository. 223 | - Go to the Actions tab and enable GitHub Actions Workflow. The CodeQL Analysis and Static Analysis will be triggered for all pushed code. 224 | - Review these workflows for any warnings or errors. 225 | - Once successful, create a pull request. 226 | 227 | ### Using GitHub Actions Workflows 228 | 229 | Several of our GitHub Actions Workflows are used to ensure pushed code and pull requests do not break cFS, create vulnerabilities, and follow our code conventions. Other workflows are used for documentation purposes. 230 | 231 | Most of the workflows in the NASA/cFS repository will run for all branches when code is pushed and a pull request is created, except for the changelog workflow that runs manually. 232 | 233 | All of our workflows will be available for forked repositories once enabled. To enable workflows, navigate to the Actions tab and click "I understand my workflows, go ahead and enable them". 234 | 235 | #### View Failed Workflows 236 | 237 | 1. Navigate to Actions in the selected repository. For newly forked repositories, enable workflows after clicking on Actions. 238 | 2. In the left sidebar, click the workflow you want to view. 239 | 3. From the list of workflow runs, click the name of the run you want to see. 240 | 4. Under Jobs or in the visualization graph, click the failed job. 241 | 5. Any failed steps are automatically expanded to display the results. 242 | 243 | #### View Workflow Results 244 | 245 | 1. Navigate to Actions in the selected repository. For newly forked repositories, enable workflows after clicking on Actions. 246 | 2. In the left sidebar, click the workflow you want to view. 247 | 3. From the list of workflow runs, click the name of the run you want to see. 248 | 4. Scroll to the bottom of the page and download the artifacts. For CodeQL results, navigate to the Security Tab and click Code scanning alerts. CodeQL results will only be available on your forked repository. 249 | 250 | or 251 | 252 | 1. In pull requests, click the Checks tab. 253 | 2. From the list of workflow runs, click the name of the run you want to see. 254 | 4. Scroll to the bottom of the page and download the artifacts. For CodeQL results, expand Code scanning alerts at the bottom of the list of checks and select CodeQL. 255 | 256 | #### Configure Workflows 257 | 258 | 1. Workflows are under [.github/workflows](.github/workflows). 259 | 2. Configure the files as needed. For more information on how to configure GitHub Actions, visit [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions). 260 | 261 | #### cFS Workflows 262 | 263 | The cFS testing workflows are found in [.github/workflows](.github/workflows) you can read a summary in the [that directory's README](.github/workflows/README.md). 264 | 265 | ### Git Commit Guidelines 266 | 267 | 1. Please follow commit message convention. This format links github issues to pull requests with code and helps us to deliver high-quality documentation. The format-check workflow will also alert you when your commits or pull request do not match the format below. 268 | ``` 269 | Fix #XYZ, SHORT_DESCRIPTION 270 | 271 | LONG_DESCRIPTION (optional) 272 | ``` 273 | 274 | 2. Verify there is a single commit message per topic. For a good example, see this multi-topic [pull request](https://github.com/nasa/cFE/pull/1203/commits). 275 | 276 | 3. [Squash](#how-to-squash-commits) or [amend](#how-to-amend-commits) the commit messages as needed. 277 | 278 | 279 | #### Working with git commits 280 | 281 | The following sections are short "How-Tos" on techniques that can help you edit your commits to better match our format guidelines. 282 | 283 | ##### How to Squash Commits 284 | 285 | ###### Interactive Rebase 286 | 287 | 1. Switch to the main branch and ensure you are up to date: 288 | ```sh 289 | git checkout main && git pull 290 | ``` 291 | 2. Checkout your feature branch: 292 | ```sh 293 | git merge feature_branch 294 | ``` 295 | 3. Use rebase to open the vi or other editor that lists the commits: 296 | ```sh 297 | git rebase main -i 298 | ``` 299 | 4. A text editor will open with a file that lists all the commits in your branch, and in front of each commit is the word "pick". It looks something like this: 300 | ```sh 301 | pick 1fc6c95 do something 302 | pick 6b2481b do something else 303 | pick dd1475d changed some things 304 | pick c619268 fixing typos 305 | ``` 306 | 5. For every line except the first, you want to replace the word "pick" with the word "squash" or with "f". "squash" merges the commit into previous commit. "f" is like "squash", but discard this commit's log message. So, if you wish to skip the step where you have to update the commit message then use "f". To edit the first commit message, replace "pick" with "r". For example, it should look like this: 307 | ```sh 308 | pick 1fc6c95 do something 309 | squash 6b2481b do something else 310 | squash dd1475d changed some things 311 | squash c619268 fixing typos 312 | ``` 313 | or 314 | ```sh 315 | r 1fc6c95 do something 316 | f 6b2481b do something else 317 | f dd1475d changed some things 318 | f c619268 fixing typos 319 | ``` 320 | 6. Save and close the file. If you used "pick" and "squash", a new file should pop up in your editor, combining all the commit messages of all the commits. Reword this commit message as you want, and then save and close that file as well. 321 | 322 | 7. Push the commit: 323 | ```sh 324 | git push --force 325 | ``` 326 | 327 | ###### Soft Reset 328 | 329 | Use the "soft" method with caution. Ensure that you reset back to the original baseline. If you have switched branches and pulled from the remote since starting the branch originally, you may inadvertently overwrite other changes. 330 | 331 | 1. To tell Git to reset HEAD to another commit, so index and the working directory will not be altered in any way use a soft reset. All of the files changed between the original HEAD and the commit will be staged. To use a soft reset: 332 | ```sh 333 | git reset --soft main 334 | ``` 335 | 2. Add all changes: 336 | ```sh 337 | git add -A 338 | ``` 339 | 3. Add a commit message: 340 | ```sh 341 | git commit -m "Fix #XYZ, SHORT_DESCRIPTION 342 | 343 | LONG_DESCRIPTION (optional)" 344 | ``` 345 | 4. Push the commit: 346 | ```sh 347 | git push --force 348 | ``` 349 | 350 | ###### Replace Branch 351 | 352 | This method had no chances of inadvertently overwriting other stuff. 353 | 354 | 1. Make a new branch with a new name at the current main: 355 | ```sh 356 | git checkout -b "fix-ISSUE_NUMBER-". 357 | ``` 358 | 2. Merge: 359 | ```sh 360 | git merge --squash ${old_branch} 361 | ``` 362 | 3. Test the result, then commit to write a new commit message summarizing the full change: 363 | ```sh 364 | git commit 365 | ``` 366 | 4. Rename your new branch over your old branch to replace it: 367 | ```sh 368 | git branch -m -f ${new_branch} ${old_branch} 369 | ``` 370 | 5. Push to GitHub: 371 | ```sh 372 | git push --force 373 | ``` 374 | 375 | ##### How to Amend Commits 376 | 377 | 1. To modify your last commit message: 378 | 379 | ```sh 380 | git commit --amend 381 | ``` 382 | 383 | 2. The previous commit message will load an editor session, where you can make changes to the message, save those changes and exit. When you save and close the editor, the editor writes a new commit containing that updated commit message and makes it your new last commit. Push the new changes: 384 | 385 | ```sh 386 | git push --force 387 | ``` 388 | 389 | 1. To change the actual content of your last commit, stage those changes: 390 | 391 | ```sh 392 | git add 393 | ``` 394 | 2. Amend the commit: 395 | 396 | ```sh 397 | git commit --amend 398 | ``` 399 | 3. Now the last commit is replaced by your new and improved commit. Push the commit: 400 | 401 | ```sh 402 | git push --force 403 | ``` 404 | 405 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Build Linux](https://github.com/nasa/cfs/actions/workflows/build-cfs.yml/badge.svg)](https://github.com/nasa/cfs/actions/workflows/build-cfs.yml) 2 | [![Build RTEMS 5](https://github.com/nasa/cFS/actions/workflows/build-cfs-rtems5.yml/badge.svg)](https://github.com/nasa/cFS/actions/workflows/build-cfs-rtems5.yml) 3 | 4 | # Core Flight System - BUNDLE 5 | 6 | The Core Flight System (cFS) is a generic flight software architecture framework used on flagship spacecraft, human spacecraft, cubesats, and Raspberry Pi. This repository is a bundle of submodules that make up the cFS framework. Note the "lab" apps are intended as examples only, and enable this bundle to build, execute, receive commands, and send telemetry. This is not a flight distribution, which is typically made up of the cFE, OSAL, PSP, and a selection of flight apps that correspond to specific mission requirements. 7 | 8 | This bundle has not been fully verified as an operational system, and is provided as a starting point vs an end product. Testing of this bundle consists of building, executing, sending setup commands and verifying receipt of telemetry. Unit testing is also run, but extensive analysis is not performed. All verification and validation per mission requirements is the responsibility of the mission (although attempts are made in the cFS Framework to provide a testing framework to facilitate the process). 9 | 10 | The cFS Framework is a core subset of cFS, with an extensive ecosystem of applications and tools available throughout the community. 11 | 12 | ## Distributions 13 | 14 | This is the open-source version of cFS, released under an Apache 2.0 license. The open source cFS is limited to the framework and common apps, libraries, and tools, which includes and is limited to: cFE, OSAL, PSP, Command Ingest (Lab), Telemetry Output (Lab), Scheduler (Lab), Sample App, Sample Lib, Data Storage, File Manager, HouseKeeping, Health and Safety, Memory Dwell, CFDP File Transfer, CheckSum, Limit Checker, Memory Manager, Stored Command, cFS Ground System, elf2cfetbl, and tblCRCTool. Changes to the open repositories are limited to bug fixes and minor enhancements to those components. 15 | 16 | A Government-use (Distro C) version of cFS with features for a full flight mission is available through a Software User Agreement. For more information about government version features or to explore partnerships, please [contact the cFS team](). 17 | 18 | ## Contact 19 | 20 | cFS/cFE is owned and maintained by NASA Goddard Space Flight Center's Flight Software Systems Branch. 21 | 22 | The cFS team provides training, support, and subject matter expertise to cFS users across industry and the government. New features/developments can also be done by the cFS team which has significant experience in helping flight projects implement mission-ready flight SW using cFS for various classes of missions, including human-rated (class A) missions. A support agreement may be needed. 23 | 24 | To connect with the cFS team, please send an email to [cfs-program@lists.nasa.gov](). 25 | 26 | More information is available on the [cFS Website](). 27 | 28 | ## Table of Contents 29 | 30 | - [References](#references-documentation) 31 | - [Release Notes](#release-notes) 32 | - [Open Source Roadmap](#open-source-roadmap) 33 | - [Upcoming Release](#upcoming-release) 34 | - [Getting Help](#getting-help) 35 | - [Setup](#setup) 36 | - [Build and Run](#build-and-run) 37 | - [Related Capability](#related-capability) 38 | 39 | ## References Documentation 40 | 41 | - [cFE User's Guide]() 42 | - [OSAL User's Guide]() 43 | - [Combined Mission documentation]() 44 | - [cFE App Developer's Guide]() 45 | - [Training documentation]() 46 | - [cFS Overview]() 47 | 48 | ## Release Notes 49 | 50 | See [releases]() for release history and associated artifacts related to the cFS BUNDLE. 51 | 52 | **Aquila: OFFICIAL RELEASE**: 53 | 54 | - Released under Apache 2.0 55 | - Includes cFE 6.7.0 (cFE, PSP, framework apps, and framework tools as marked) and OSAL 5.0.0 56 | - [Version description document, including release notes]() 57 | - [Release artifacts]() 58 | 59 | Other elements listed in [Related Capability](#related-capability) are released under a variety of licenses as detailed in their respective repositories. 60 | 61 | ## Open-Source Roadmap 62 | 63 | The following is a list of features and updates planned for cFS (in no particular order). Have other ideas? Want to partner with us? Please let us know at [cfs-program@lists.nasa.gov](). 64 | 65 | - "Bundler" tool to create custom bundles from known capability developed across the community (essentially an interactive catalog of apps that have been verified against a particular version of cFS) 66 | - VxWorks 7 support, including running applications as real-time processes (RTPs) 67 | - RTEMS 6 support 68 | - Automated build verification execution framework for emulated targets 69 | - Time services refactor/simplication 70 | - Symmetric multi-processing (SMP) APIs 71 | - Electronic Data Sheet (EDS) integration option and improvements to packet layouts for portability/consistency 72 | 73 | ## Upcoming Release 74 | 75 | Note: Official releases will be created through the NASA software release process. The cFS team plans to return to a more regular official release cadence in the near future. 76 | 77 | ### Next major release development features 78 | 79 | - Certification framework with automated build verification tests of framework requirements 80 | - Executable on real/emulated/simulated/ or dockerized targets 81 | - Add PSP coverage testing framework (nasa/psp#184, nasa/psp#174) 82 | - Add PSP and cFE functional testing framework for APIs (nasa/cfe#779) 83 | - Scrub OSAL coverage and functional tests 84 | - Scrub cFE coverage tests 85 | - Add cFE API functional tests 86 | - NOTE: Command verification pending tool open source release 87 | - Documentation (updated traceability, APIs/ICDs, general update) 88 | - Framework for mission customization of core services 89 | - Header customization support (nasa/cFE#726) 90 | - Remove deprecated code 91 | - Cmd/Tlm structure scrub for alignment/padding/consistency 92 | - Library query and reporting and ES resource management (nasa/cFE#28, nasa/cFE#797) 93 | - Type safety enhancements 94 | - Added abstract configuration registry 95 | - RTEMS 5/6 support updates 96 | - Added support for fractional seconds in epoch 97 | - Bug fixes 98 | 99 | ### Known Issues 100 | 101 | Historical version description documents contain references to internal repositories and sourceforge, which is no longer in use. Not all markdown documents have been updated for GitHub. 102 | 103 | See related repositories for current open issues. 104 | 105 | ## Getting Help 106 | 107 | ### Discussions 108 | 109 | You can [start a new discussion]() for discussions, questions, or ideas, in the cFS repository under the Discussions tab. 110 | 111 | ### Join the mailing list 112 | 113 | To **subscribe to our mailing list,** send an email to [cfs-community-join@lists.nasa.gov]() with the word *subscribe* in the subject line. 114 | 115 | The cfs-community mailing list includes cFS users and developers. The cFS Product Team also uses the mailing list to share information on current and future releases, bug findings and fixes, enhancement requests, community meetings, etc. 116 | 117 | If you'd like to unsubscribe, send an email with the word *unsubscribe* to [cfs-community-leave@lists.nasa.gov](). Mailing list requests are typically processed within 5 minutes. 118 | 119 | ### Contact the cFS Product Team 120 | 121 | You can email the cFS Product Team at [cfs-program@lists.nasa.gov]() to explore partnerships and other arrangements for in-depth support. 122 | 123 | ## Setup 124 | 125 | Ensure the following software are installed: Make, CMake, GCC, and Git. To setup the cFS BUNDLE directly from the latest set of interoperable repositories (with your working directory set to where you want to put cFS): 126 | 127 | git clone https://github.com/nasa/cFS.git 128 | cd cFS 129 | git submodule init 130 | git submodule update 131 | 132 | Copy in the default makefile and definitions: 133 | 134 | cp cfe/cmake/Makefile.sample Makefile 135 | cp -r cfe/cmake/sample_defs sample_defs 136 | 137 | ## Build and Run 138 | 139 | The cFS Framework including sample applications will build and run on the pc-linux platform support package (should run on most Linux distributions), via the steps described in [the cFE cmake readme](). Quick-start is below: 140 | 141 | To prep, compile, and run on the host (from cFS directory above) as a normal user (best effort message queue depth and task priorities): 142 | 143 | make distclean 144 | (For a clean build on subsequent runs) 145 | make SIMULATION=native prep 146 | make 147 | make install 148 | cd build/exe/cpu1/ 149 | ./core-cpu1 150 | 151 | Should see startup messages, and CFE_ES_Main entering OPERATIONAL state. Note the code must be executed from the build/exe/cpu1 directory to find the startup script and shared objects. 152 | 153 | Note: The steps above are for a debug, permissive mode build and includes deprecated elements. For a release build, recommendation is `make BUILDTYPE=release OMIT_DEPRECATED=true prep`. Unit tests can be added with `ENABLE_UNIT_TESTS=true` during the prep step, run with `make test`, and coverage reported with `make lcov`. Functional tests can be run by including `ENABLE_UNIT_TESTS=true` during prep and including the cfe_testcase app in the runtime app configuration (.scr file). 154 | 155 | ### Send commands, receive telemetry 156 | 157 | The cFS-GroundSystem tool can be used to send commands and receive telemetry. For details on using and setting up the Ground System, see the [Guide-GroundSystem](https://github.com/nasa/cFS-GroundSystem/blob/main/Guide-GroundSystem.md). Note it depends on PyQt5 and PyZMQ: 158 | 159 | 1. Install PyQt5 and PyZMQ on your system. Some systems may also require installing libcanberra-gtk-module. 160 | 161 | 2. Compile cmdUtil and start the ground system executable 162 | 163 | cd tools/cFS-GroundSystem/Subsystems/cmdUtil 164 | make 165 | cd ../.. 166 | python3 GroundSystem.py 167 | 168 | 3. Select "Start Command System" from main window 169 | 4. Select "Enable Tlm" 170 | 5. Enter IP address of system executing cFS, 127.0.0.1 if running locally 171 | 6. Select "Start Telemetry System" from main window 172 | 173 | Should see telemetry, can send noops and see command counters increment. 174 | 175 | ### Adding Custom Apps 176 | 177 | See the [cFE Application Developer's Guide](https://github.com/nasa/cFE/blob/main/docs/cFE%20Application%20Developers%20Guide.md) for information about creating new apps. It is encouraged to use sample_app or skeleton_app as a starting point. Once the application has been created, it must be added to targets.cmake to be compiled and to the .scr file to be dynamically loaded at runtime (in a dynamically loaded environment). 178 | 179 | ## Related Capability 180 | 181 | - Distributions 182 | - cFS-101: Virtual machine distribution at 183 | - Other Ground station software 184 | - cFS-EDS-GroundStation: Ground station implemented via EDS at 185 | - Other Apps 186 | - CS: Checksum application at 187 | - CF: CFDP application at 188 | - DS: Data Store application at 189 | - FM: File Manager application at 190 | - HK: Housekeeping application at 191 | - HS: Health and Safety application at 192 | - LC: Limit Checker application at 193 | - MD: Memory Dwell application at 194 | - MM: Memory Manager application at 195 | - SBN: Software Bus Network application at 196 | - SC: Stored Commands application at 197 | - SCA: Stored Command Absolute application at 198 | - Skeleton App: A bare-bones application to which you can add your business logic at 199 | - Other Interfaces 200 | - SIL: Simulink Interface Layer at 201 | - ECI: External Code Interface at 202 | - SBN-Client: External code interface to SBN at 203 | - Other Libraries 204 | - cFS_IO_LIB: IO library at 205 | - cFS_LIB: at 206 | - EdsLib: CCSDS SOIS Electronic Data Sheet Tool and Library at 207 | - fs_lib: File services library at 208 | - Other Tools 209 | - CTF: cFS Test Framework at 210 | - CCDD: Command and Data Dictionary Tool at 211 | - Perfutils-java: Java based performance analyzer for cFS at 212 | - gen_sch_tbl: Tool to generated SCH app tables at 213 | - CryptoLib: Software-only CCSDS Space Data Link Security Protocol - Extended Procedures (SDLS-EP) at 214 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | For general cFS vulnerabilities, please [open a cFS framework issue](https://github.com/nasa/cfs/issues/new/choose). Please use the "Bug Report" template and provide as much information as possible. Apply appropriate labels for each report. 6 | 7 | For security related vulnerabilities, follow the general cFS vulnerabilities instructions and tag the issue with the "security" label. 8 | 9 | ## Security Reports 10 | 11 | To submit sensitive security reports or findings, [contact the cFS Product Team](README.md#contact-the-cfs-product-team). 12 | 13 | ## Testing 14 | 15 | **Disclaimer: nasa/cFS is not responsible for any liability incurred as stated under the [Apache License 2.0](https://github.com/nasa/cFS/blob/main/LICENSE).** 16 | 17 | Testing is an important aspect our team values to improve the cFS bundle. Several tools are used for testing: 18 | 19 | ### CodeQL 20 | 21 | The [cFS CodeQL GitHub Actions workflow](https://github.com/nasa/cFS/actions/workflows/codeql-analysis.yml) is available to the public. To review the results, fork the cFS repository and run the CodeQL workflow. 22 | 23 | CodeQL is ran for every push and pull-request on all branches of cFS in GitHub Actions. 24 | 25 | For the CodeQL GitHub Actions setup, visit https://github.com/github/codeql-action. 26 | 27 | ### Cppcheck 28 | 29 | The [cFS Cppcheck GitHub Actions workflow and results](https://github.com/nasa/cFS/actions/workflows/static-analysis.yml) are available to the public. To view the results, select a workflow and download the artifacts. 30 | 31 | Cppcheck is ran for every push on the main branch and every pull request on all branches of cFS in Github Actions. 32 | 33 | For more information about Cppcheck, visit http://cppcheck.sourceforge.net/. 34 | 35 | ### CodeSonar 36 | 37 | CodeSonar results are not available to the public. 38 | 39 | CodeSonar is typically ran on a “once per release” sort of schedule. 40 | 41 | For more information about CodeSonar, visit https://codesecure.com/our-products/codesonar. 42 | 43 | ### Fuzz Testing 44 | 45 | The application used to fuzz test cFS and its results are not available to the public. 46 | 47 | The latest version of cFS is fuzzed nightly using a continuous integration pipeline. 48 | 49 | For more information about AFL used by the Fuzzing cFS application, visit https://github.com/google/AFL. 50 | 51 | ## Additional Support 52 | 53 | For additional support, submit a GitHub issue. 54 | 55 | You can also [join the cfs community mailing list](README.md#join-the-mailing-list) for technical discussions with cFS developers and users. 56 | 57 | If you wish to report a cybersecurity incident or concern, please contact the NASA Security Operations Center either by phone at 1-877-627-2732 or via email address soc@nasa.gov. 58 | -------------------------------------------------------------------------------- /cFS_Apps_Corporate_CLA.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasa/cFS/1b997008051bcc19735d43601e603aae03a1471a/cFS_Apps_Corporate_CLA.pdf -------------------------------------------------------------------------------- /cFS_Apps_Individual_CLA.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasa/cFS/1b997008051bcc19735d43601e603aae03a1471a/cFS_Apps_Individual_CLA.pdf -------------------------------------------------------------------------------- /cFS_Framework_Corporate_CLA.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasa/cFS/1b997008051bcc19735d43601e603aae03a1471a/cFS_Framework_Corporate_CLA.pdf -------------------------------------------------------------------------------- /cFS_Framework_Individual_CLA.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasa/cFS/1b997008051bcc19735d43601e603aae03a1471a/cFS_Framework_Individual_CLA.pdf -------------------------------------------------------------------------------- /tools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # CMake snippet for building the host-side tools. 2 | project(CFETOOLS C) 3 | 4 | add_subdirectory(cFS-GroundSystem/Subsystems/cmdUtil) 5 | add_subdirectory(elf2cfetbl) 6 | add_subdirectory(tblCRCTool) 7 | 8 | --------------------------------------------------------------------------------