Skip to content

Commit 6b9c267

Browse files
authored
Merge pull request #1150 from nasa/integration-candidate
cFE Integration candidate: 2021-02-02
2 parents fcaa1d0 + 557d92b commit 6b9c267

File tree

99 files changed

+4552
-3898
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+4552
-3898
lines changed

.github/workflows/codeql-build.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: "CodeQL Analysis"
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
env:
8+
SIMULATION: native
9+
ENABLE_UNIT_TESTS: true
10+
OMIT_DEPRECATED: true
11+
BUILDTYPE: release
12+
13+
jobs:
14+
15+
CodeQL-Build:
16+
runs-on: ubuntu-18.04
17+
timeout-minutes: 15
18+
19+
steps:
20+
# Checks out a copy of your repository on the ubuntu-latest machine
21+
- name: Checkout bundle
22+
uses: actions/checkout@v2
23+
with:
24+
repository: nasa/cFS
25+
submodules: true
26+
27+
- name: Checkout submodule
28+
uses: actions/checkout@v2
29+
with:
30+
path: cfe
31+
32+
- name: Check versions
33+
run: git submodule
34+
35+
- name: Initialize CodeQL
36+
uses: github/codeql-action/init@v1
37+
with:
38+
languages: c
39+
queries: +security-extended, security-and-quality
40+
41+
# Setup the build system
42+
- name: Set up for build
43+
run: |
44+
cp ./cfe/cmake/Makefile.sample Makefile
45+
cp -r ./cfe/cmake/sample_defs sample_defs
46+
make prep
47+
48+
# Build the code
49+
- name: Build
50+
run: |
51+
make cfe-core
52+
make native/default_cpu1/cfe-core/unit-test/
53+
make native/default_cpu1/cfe-core/ut-stubs/
54+
55+
- name: Perform CodeQL Analysis
56+
uses: github/codeql-action/analyze@v1

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
static-analysis:
1313
name: Run cppcheck
1414
runs-on: ubuntu-18.04
15+
timeout-minutes: 15
1516

1617
strategy:
1718
fail-fast: false

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Travis-CI: [![Build Status](https://travis-ci.com/nasa/cFE.svg)](https://travis-ci.com/nasa/cFE)
1+
![Static Analysis](https://github.com/nasa/cfe/workflows/Static%20Analysis/badge.svg)
22

33
# Core Flight System : Framework : Core Flight Executive
44

@@ -10,6 +10,34 @@ The detailed cFE user's guide can be viewed at <https://github.com/nasa/cFS/blob
1010

1111
## Version History
1212

13+
### Development Build: 6.8.0-rc1+dev348
14+
15+
- Corrects reference to PSP header file location. Build now succesfully completes the build succeeds again when using `add_psp_module()` in custom CMakeLists file.
16+
- Replace "send" with "write" in names for commands that write files. For example, `CFE_SB_**SEND**_ROUTING_INFO_CC` is now `CFE_SB_**WRITE**_ROUTING_INFO_CC`. Updates function names, command code names and comments.
17+
- Removes incorrectly implemented deferred return code of `-1` for `CFE_SB_ReceiveBuffer` from software bus setup in `UT_InitData`.
18+
- Implements more informative **assert messages** by making `SETUP, TEARDOWN, ASSERT` print `0x%lx` while `ASSERT_EQ` now prints both `%lf` and `0x%lx` format for the inputs
19+
- Updates continuous-integration badges in `ReadMe.md`. The badges now reflect the success status of different runs.
20+
- Remove `Test_SB_Cmds_SubRptUnexpCmdCode` which was a duplicate of `Test_SB_Cmds_CmdUnexpCmdCode` and did not implement any new tests.
21+
- Initializes status in `CFE_ES_WaitForSystemState` and adds missing success test case so the function doesn't return an uninitialized `Status`.
22+
- Removes the `HkPacket` and `TblRegPacket` message initializations from `CFE_TBL_EarlyInit` since they are initialized in `CFE_TBL_InitData`. Moves the `NotifyMsg` message initialization to `CFE_TBL_InitData` and sets the message ID each time it's sent from `CFE_TBL_SendNotificationMsg`. Possibly results in small performance improvement since the message isn't initialized every call.
23+
- Removes unimplemented `CFE_ES_AppGetList` and `CFE_ES_AppDumpAllInfo` prototypes.
24+
- Adds a 15-minute timeout to continuous integration workflows to prevent excess resource utilization.
25+
- Makes debug subscription events only print the Pipe ID, not a name, in the debug events.
26+
- Updates the documentation and verification for `CFE_PLATFORM_SB_HIGHEST_VALID_MSGID` to allows the full range of values.
27+
- Clarifies the difference between "restart" and "reload" in API/cmd and user's guide documentation for `CFE_ES_RESTART_APP_CC`.
28+
- Switches throttle indexes to use `CFE_SB_RouteId_Atom_t` and combines helper function given that msgid was removed due to being a resource hog. Resolves static analysis warning.
29+
- `CFE_ES_RestartApp` now checks for file existence as part of command processing and does not remove the app if the file doesn't exist (just avoids one error case). it also rejects the command and increments command error counter if file is missing.
30+
- Removes `CFE_PLATFORM_SB_MAX_PIPE_DEPTH` in favor of `OS_QUEUE_MAX_DEPTH`. This depth parameter in command is now checked prior to attempting OSAL call.
31+
- Filters pointer now `const` in API and reports truncation when registering filters with `CFE_EVS_Register`.
32+
- Removes the ability to disable the log by not defining `CFE_PLATFORM_EVS_LOG_ON` so users are no longer able to disable log completely. For minimum memory use define `CFE_PLATFORM_EVS_LOG_MAX = 1`. Note: This could remove control based on LogEnabled, panic on reset area fail and limp along if "sem create" fails.
33+
- Removes the remnants of the table service exclusion logic and documentation: `EXCLUDE_CFE_TBL` no longer available, even if defined, table services will still start.
34+
- Set ES and EVS pipe message limit to defaults as opposed to the custom, unjustified, `CFE_SB_SubscribeEx`. This change might queue additional HK messages, but SCH loads after ES anyways.
35+
- Replaces `CFE_SB_Default_Qos` with `CFE_SB_DEFAULT_QOS` macro that avoids global variable exposure. Removes SB-internal defines that are not implemented nor used.
36+
- Explicity `memset` the task data to zero at the start of EarlyInit. Standardize the global typdef/variable names.
37+
- Moves all functions, macros, types, and other definitions related to resource IDs and generic resource management into a separate module, like `CFE MSG`, `SBR`, etc. This allows a mission to elect "strict" implementations of these objects, where every ID type is unique, and assigning between them or `uint32` results in a compiler error. **API now has separate types for each resource type (Apps, Tasks, Libs, Counters, etc).** The user can elect at the mission level whether this is a simple typedef (all uint32, all interchangeable) or a wrapper type (separate/strict type, cannot be interchanged). The former is backward compatible but the latter is not - must use proper types.
38+
- Adds Code QL analysis to continuous integration workflow.
39+
- See <https://github.com/nasa/cFE/pull/1150>
40+
1341
### Development Build: 6.8.0-rc1+dev290
1442

1543
- Documentation: Add Security.md with instructions to report vulnerability

cmake/arch_build.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ endfunction(initialize_globals)
6262
function(add_psp_module MOD_NAME MOD_SRC_FILES)
6363

6464
# Include the PSP shared directory so it can get to cfe_psp_module.h
65-
include_directories(${MISSION_SOURCE_DIR}/psp/fsw/shared)
65+
include_directories(${MISSION_SOURCE_DIR}/psp/fsw/shared/inc)
6666
add_definitions(-D_CFE_PSP_MODULE_)
6767

6868
# Create the module

cmake/mission_defaults.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ set(MISSION_CORE_MODULES
1616
"psp"
1717
"msg"
1818
"sbr"
19+
"resourceid"
1920
)
2021

2122
# The "MISSION_GLOBAL_APPLIST" is a set of apps/libs that will be built

cmake/sample_defs/cpu1_platform_cfg.h

Lines changed: 16 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -130,49 +130,29 @@
130130
*/
131131
#define CFE_PLATFORM_SB_BUF_MEMORY_BYTES 524288
132132

133-
134-
/**
135-
** \cfesbcfg Maximum depth allowed when creating an SB pipe
136-
**
137-
** \par Description:
138-
** The value of this constant dictates the maximum pipe depth that an
139-
** application may request. The pipe depth is given as a paramter in the
140-
** #CFE_SB_CreatePipe API.
141-
**
142-
** \par Limits
143-
** This parameter has a lower limit of 1. There are no restrictions on the
144-
** upper limit however, the maximum pipe depth is system dependent and should
145-
** be verified. Pipe Depth values that are checked against this configuration
146-
** are defined by a 16 bit data word.
147-
*/
148-
#define CFE_PLATFORM_SB_MAX_PIPE_DEPTH 256
149-
150-
151133
/**
152134
** \cfesbcfg Highest Valid Message Id
153135
**
154136
** \par Description:
155-
** The value of this constant dictates the size of the SB message map. The SB
156-
** message map is a lookup table that provides the routing table index for
157-
** fast access into the routing table. The default setting of 0x1FFF was chosen
158-
** to save memory. This reduces the message map from 128Kbytes to 16Kbytes.
159-
** See CFE_FSW_DCR 504 for more details.
160-
**
161-
** If this value is different in a distributed architecture some platforms may not
162-
** be able to subscribe to messages generated on other platforms since the message id
163-
** would exceed the mapping table's highest index. Care would have to be taken to ensure the
164-
** constrained platform did not subscribe to message Ids that exceed
165-
** CFE_PLATFORM_SB_HIGHEST_VALID_MSGID
137+
** The value of this constant dictates the range of valid message ID's, from 0
138+
** to CFE_PLATFORM_SB_HIGHEST_VALID_MSGID (inclusive).
166139
**
167-
** The recommended case to to have this value the same across all mission platforms
140+
** Altough this can be defined differently across platforms, each platform can
141+
** only publish/subscribe to message ids within their allowable range. Typically
142+
** this value is set the same across all mission platforms to avoid this complexity.
168143
**
169144
** \par Limits
170-
** This parameter has a lower limit of 1 and an upper limit of 0xFFFF. Note
171-
** for current implementations, V2/Extended headers assign 0xFFFFFFFF as the invalid
172-
** message ID value, and default headers assigns 0xFFFF as the invalid value. This
173-
** means for default headers, 0xFFFF is invalid even if you set the value
174-
** below to it's maximum of 0xFFFF.
175-
** The allocated message table is this size + 1 (could change based on implementaiton).
145+
** CFE_SB_INVALID_MSG is set to the maxumum representable number of type CFE_SB_MsgId_t.
146+
** CFE_PLATFORM_SB_HIGHEST_VALID_MSGID lower limit is 1, up to CFE_SB_INVALID_MSG_ID - 1.
147+
**
148+
** When using the direct message map implementation for software bus routing, this
149+
** value is used to size the map where a value of 0x1FFF results in a 16 KBytes map
150+
** and 0xFFFF is 128 KBytes.
151+
**
152+
** When using the hash implementation for software bus routing, a multiple of the
153+
** CFE_PLATFORM_SB_MAX_MSG_IDS is used to size the message map. In that case
154+
** the range selected here does not impact message map memory use, so it's
155+
** resonable to use up to the full range supported by the message ID implementation.
176156
*/
177157
#define CFE_PLATFORM_SB_HIGHEST_VALID_MSGID 0x1FFF
178158

@@ -1455,20 +1435,6 @@
14551435
#define CFE_PLATFORM_EVS_MAX_EVENT_FILTERS 8
14561436

14571437

1458-
/**
1459-
** \cfeevscfg Enable or Disable EVS Local Event Log
1460-
**
1461-
** \par Description:
1462-
** The CFE_PLATFORM_EVS_LOG_ON configuration parameter must be defined to enable EVS
1463-
** event logging. In order to disable the local event log this definition needs
1464-
** to be commented out.
1465-
**
1466-
** \par Limits
1467-
** Not Applicable
1468-
*/
1469-
#define CFE_PLATFORM_EVS_LOG_ON
1470-
1471-
14721438
/**
14731439
** \cfeevscfg Default Event Log Filename
14741440
**

docs/src/cfe_es.dox

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,16 @@
366366
/**
367367
\page cfeesugapprestart Restarting an Application
368368

369-
The #CFE_ES_RESTART_APP_CC command is used to restart an application.
370-
This command stops and restarts an application using the parameters
371-
defined when the application was originally started, either through
369+
The #CFE_ES_RESTART_APP_CC command is used to restart an application
370+
using the same file name as the last start.
371+
372+
This command checks for file existence, the application is running,
373+
and the application is not a core app. If valid, the application restart
374+
is requested.
375+
376+
When requested, ES stops the application, unloads the object file, loads the object file
377+
using the previous file name, and restarts an application using the parameters
378+
defined when the application was previously started, either through
372379
the startup script or by way of the #CFE_ES_START_APP_CC command.
373380

374381
Next: \ref cfeesugappreload <BR>
@@ -379,12 +386,11 @@
379386
/**
380387
\page cfeesugappreload Reloading an Application
381388

382-
The #CFE_ES_RELOAD_APP_CC command is used to reload an application.
383-
This command stops the application, unloads the object file, loads
384-
the new object file specified in the command and starts the application
385-
again using the parameters defined when the application was originally
386-
started, either through the startup script or by way of the
387-
#CFE_ES_START_APP_CC command.
389+
The #CFE_ES_RELOAD_APP_CC command is used to reload an application
390+
using a new file name.
391+
392+
This command performes
393+
the same actions as #CFE_ES_RESTART_APP_CC only using the new file.
388394

389395
Next: \ref cfeesugapplist <BR>
390396
Prev: \ref cfeesugapprestart <BR>

docs/src/cfe_sb.dox

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
The Pipe IDs are specific to a particular processor (that is, the same ID number
105105
may refer to a different pipe on each processor). The pipe information for all
106106
pipes that have been created, may be requested at anytime by sending the
107-
\link #CFE_SB_SEND_PIPE_INFO_CC 'Send Pipe Info' SB command \endlink. The software
107+
\link #CFE_SB_WRITE_PIPE_INFO_CC 'Write Pipe Info' SB command \endlink. The software
108108
bus also provides a set of figures regarding capacity, current utilization and high
109109
water marks relevant to pipes. This information may be requested by sending the
110110
command to \link #CFE_SB_SEND_SB_STATS_CC dump the SB statistics packet \endlink.
@@ -445,12 +445,10 @@
445445
Quality of Service (QOS) for off-board routing and is of the type #CFE_SB_Qos_t. This structure
446446
has two members named priority and reliability. The Quality parameter is currently unused by
447447
the software bus. It is a placeholder to be used with the future software bus capability of
448-
inter-processor communication. Although currently the software bus does not read the Quality
449-
values, it would be best to set this parameter to the value defined as #CFE_SB_Default_Qos.
450-
This value is set internally by the software bus with values of zero for priority and
451-
reliability. The values of zero will correspond to low priority and low reliability. Setting
452-
the QOS value to the #CFE_SB_Default_Qos will ensure seamless integration when the software
453-
bus is expanded to support inter-processor communication.
448+
inter-processor communication. Although currently the software bus does not implement quality
449+
of service.
450+
451+
A default quality of services is provided via the #CFE_SB_DEFAULT_QOS macro.
454452

455453
Next: \ref cfesbugknwnprob <BR>
456454
Prev: \ref cfesbugroutcntrl <BR>
@@ -569,9 +567,8 @@
569567
</B><TR><TD WIDTH="5%"> &nbsp; <TD WIDTH="95%">
570568
The QOS parameter is currently unused by the software bus. It is a placeholder to be
571569
used with the future software bus capability of inter-processor communication. Setting
572-
the QOS value to the SB defined #CFE_SB_Default_Qos (QOS.Priority=0,QOS.Reliability=0)
573-
will ensure seamless integration when the software bus is expanded to support
574-
inter-processor communication.
570+
the QOS as #CFE_SB_DEFAULT_QOS will ensure seamless integration when the software bus
571+
is expanded to support inter-processor communication.
575572
<TR><TD COLSPAN=2 WIDTH="100%"> <B>(Q)
576573
Can I confirm my software bus buffer was delivered?
577574
</B><TR><TD WIDTH="5%"> &nbsp; <TD WIDTH="95%">

docs/src/cfe_tbl.dox

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -22,45 +22,11 @@
2222
<LI> \subpage cfetblugregistry <BR>
2323
<LI> \subpage cfetblugtelemetry <BR>
2424
<LI> \subpage cfetblugprocreset <BR>
25-
<LI> \subpage cfetblugdecouple <BR>
2625
<LI> \subpage cfetblugfaq <BR>
2726
</UL>
2827

2928
**/
3029

31-
/**
32-
\page cfetblugdecouple How To Remove cFE Table Services
33-
34-
It is possible to build the CFE without including Table Services. This is only applicable if
35-
the mission does not intend to use any CFS applications that require CFE type table services, or
36-
if the mission intends to provide custom table services. If CFE Table Services are removed, the
37-
CFE makefile will no longer try to make the Table Services application and the link makefile will
38-
no longer include the Table Services object module in the CFE-CORE. Even if excluded from the build,
39-
the Table Services source and header files will remain in the CFE source tree.
40-
41-
If EXCLUDE_CFE_TBL is defined (typically in the applicable *_platform_config.h file) Executive
42-
services will not load or shut down table services. Note this option does not effect the build
43-
and link of table services.
44-
45-
To remove table services from the build completely, remove "tbl" from the CFE_CORE_MODULES
46-
in the cfe/fsw/cfe-core CMakeLists.txt directory (note this option also needs EXCLUDE_CFE_TBL defined
47-
or executive services will try to load it).
48-
49-
Removing Table Services reduces the size of the CFE-CORE load file and also reduces the amount
50-
of RAM memory required to load the cFE. Each development environment will have unique savings.
51-
The numbers from an example default linux build are as follows:
52-
53-
Size of core cFE binary load file with Table Services: 963K
54-
Size of core cFE binary load file w/o building Table services: 871K
55-
56-
RAM used after loading cFE with Table Services: 153K
57-
RAM used after loading cFE w/o loading Table Services: 144M
58-
59-
Next: \ref cfetblugfaq <BR>
60-
Prev: \ref cfetblugprocreset <BR>
61-
Up To: \ref cfetblovr
62-
**/
63-
6430
/**
6531
\page cfetblugmanage Managing Tables
6632

@@ -344,7 +310,7 @@
344310
contents of the table are automatically loaded into the table and the Application is notified that the
345311
table does not require additional initialization.
346312

347-
Next: \ref cfetblugdecouple <BR>
313+
Next: \ref cfetblugfaq <BR>
348314
Prev: \ref cfetblugtelemetry <BR>
349315
Up To: \ref cfetblovr
350316
**/
@@ -441,7 +407,7 @@
441407

442408
</TABLE>
443409

444-
Prev: \ref cfetblugdecouple <BR>
410+
Prev: \ref cfetblugprocreset <BR>
445411
Up To: \ref cfetblovr
446412
**/
447413

0 commit comments

Comments
 (0)