Skip to content

Commit d6b7277

Browse files
author
Joseph Martin
committed
Sample app runs now
1 parent fcdb59f commit d6b7277

16 files changed

+65
-87
lines changed

.github/workflows/codeql-build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ jobs:
1010
name: Codeql Analysis
1111
uses: nasa/cFS/.github/workflows/codeql-reusable.yml@main
1212
with:
13-
component-path: apps/sample_app
13+
component-path: apps/bpacc_fun
1414
prep: 'make prep; make -C build/tools/elf2cfetbl'
15-
make: 'make -C build/native/default_cpu1/apps/sample_app'
15+
make: 'make -C build/native/default_cpu1/apps/bpacc_fun'

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ endif()
2020
add_cfe_app(bpacc_fun ${APP_SRC_FILES})
2121

2222
target_include_directories(bpacc_fun PUBLIC fsw/inc)
23-
# Include the public API from sample_lib to demonstrate how
23+
# Include the public API from BPAccel to demonstrate how
2424
# to call library-provided functions
25-
add_cfe_app_dependency(bpacc_fun sample_lib)
25+
#add_cfe_app_dependency(bpacc_fun bpaccel)
2626

2727
# Add table
2828
add_cfe_tables(bpacc_fun fsw/tables/bpacc_fun_tbl.c)

README.md

+5-17
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
1-
![Static Analysis](https://github.com/nasa/sample_app/workflows/Static%20Analysis/badge.svg)
2-
![Format Check](https://github.com/nasa/sample_app/workflows/Format%20Check/badge.svg)
1+
![Static Analysis](https://github.com/nasa/bpacc_fun/workflows/Static%20Analysis/badge.svg)
2+
![Format Check](https://github.com/nasa/bpacc_fun/workflows/Format%20Check/badge.svg)
33

4-
# Core Flight System : Framework : App : Sample
4+
# Core Flight System : Framework : App : BPACC Functional
55

6-
This repository contains a sample application (sample_app), which is a framework component of the Core Flight System.
6+
This repository contains the BPAccel Functional Test App
77

8-
This sample application is a non-flight example application implementation for the cFS Bundle. It is intended to be located in the `apps/sample_app` subdirectory of a cFS Mission Tree. The Core Flight System is bundled at <https://github.com/nasa/cFS> (which includes sample_app as a submodule), which includes build and execution instructions.
9-
10-
sample_app is an example for how to build and link an application in cFS. See also the skeleton_app (<https://github.com/nasa/skeleton_app>) if you are looking for a bare-bones application to which to add your business logic.
11-
12-
## Known issues
13-
14-
As a sample application, extensive testing is not performed prior to release and only minimal functionality is included. Note discrepancies likely exist between this application and the example detailed in the application developer guide.
15-
16-
## Getting Help
17-
18-
For best results, submit issues:questions or issues:help wanted requests at <https://github.com/nasa/cFS>.
19-
20-
Official cFS page: <http://cfs.gsfc.nasa.gov>
8+
This application is a non-flight example application implementation used for exercising BPAccel and BP7 HW Acceleration efforts in a cFS context.

SECURITY.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,33 @@
22

33
## Reporting a Vulnerability
44

5-
To report a vulnerability for the sample_app subsystem please [submit an issue](https://github.com/nasa/sample_app/issues/new/choose).
5+
To report a vulnerability for the bpacc_fun subsystem please [submit an issue](https://github.com/nasa/bpacc_fun/issues/new/choose).
66

77
For general cFS vulnerabilities please [open a cFS framework issue](https://github.com/nasa/cfs/issues/new/choose) and see our [top-level security policy](https://github.com/nasa/cFS/security/policy) for additional information.
88

99
In either case please use the "Bug Report" template and provide as much information as possible. Apply appropriate labels for each report. For security related reports, tag the issue with the "security" label.
1010

1111
## Testing
1212

13-
**Disclaimer: nasa/sample_app is not responsible for any liability incurred under the [Apache License 2.0](https://github.com/nasa/sample_app/blob/main/LICENSE).**
13+
**Disclaimer: nasa/bpacc_fun is not responsible for any liability incurred under the [Apache License 2.0](https://github.com/nasa/bpacc_fun/blob/main/LICENSE).**
1414

15-
Testing is an important aspect our team values to improve sample_app.
15+
Testing is an important aspect our team values to improve bpacc_fun.
1616

1717
To view tools used for the cFS bundle, see our [top-level security policy](https://github.com/nasa/cFS/security/policy).
1818

1919
### CodeQL
2020

21-
The [sample_app CodeQL GitHub Actions workflow](https://github.com/nasa/sample_app/actions/workflows/codeql-build.yml) is available to the public. To review the results, fork the sample_app repository and run the CodeQL workflow.
21+
The [bpacc_fun CodeQL GitHub Actions workflow](https://github.com/nasa/bpacc_fun/actions/workflows/codeql-build.yml) is available to the public. To review the results, fork the bpacc_fun repository and run the CodeQL workflow.
2222

23-
CodeQL is ran for every push and pull-request on all branches of sample_app in GitHub Actions.
23+
CodeQL is ran for every push and pull-request on all branches of bpacc_fun in GitHub Actions.
2424

2525
For the CodeQL GitHub Actions setup, visit https://github.com/github/codeql-action.
2626

2727
### Cppcheck
2828

29-
The [sample_app Cppcheck GitHub Actions workflow and results](https://github.com/nasa/sample_app/actions/workflows/static-analysis.yml) are available to the public. To view the results, select a workflow and download the artifacts.
29+
The [bpacc_fun Cppcheck GitHub Actions workflow and results](https://github.com/nasa/bpacc_fun/actions/workflows/static-analysis.yml) are available to the public. To view the results, select a workflow and download the artifacts.
3030

31-
Cppcheck is ran for every push on the main branch and every pull request on all branches of sample_app in Github Actions.
31+
Cppcheck is ran for every push on the main branch and every pull request on all branches of bpacc_fun in Github Actions.
3232

3333
For more information about Cppcheck, visit http://cppcheck.sourceforge.net/.
3434

arch_build.cmake

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
###########################################################
22
#
3-
# SAMPLE_APP platform build setup
3+
# BPACC_FUN platform build setup
44
#
55
# This file is evaluated as part of the "prepare" stage
66
# and can be used to set up prerequisites for the build,
77
# such as generating header files
88
#
99
###########################################################
1010

11-
# The list of header files that control the SAMPLE_APP configuration
12-
set(SAMPLE_APP_PLATFORM_CONFIG_FILE_LIST
13-
sample_app_internal_cfg.h
14-
sample_app_platform_cfg.h
15-
sample_app_perfids.h
16-
sample_app_msgids.h
11+
# The list of header files that control the BPACC_FUN configuration
12+
set(BPACC_FUN_PLATFORM_CONFIG_FILE_LIST
13+
bpacc_fun_internal_cfg.h
14+
bpacc_fun_platform_cfg.h
15+
bpacc_fun_perfids.h
16+
bpacc_fun_msgids.h
1717
)
1818

1919
# Create wrappers around the all the config header files
2020
# This makes them individually overridable by the missions, without modifying
2121
# the distribution default copies
22-
foreach(SAMPLE_APP_CFGFILE ${SAMPLE_APP_PLATFORM_CONFIG_FILE_LIST})
23-
get_filename_component(CFGKEY "${SAMPLE_APP_CFGFILE}" NAME_WE)
24-
if (DEFINED SAMPLE_APP_CFGFILE_SRC_${CFGKEY})
25-
set(DEFAULT_SOURCE GENERATED_FILE "${SAMPLE_APP_CFGFILE_SRC_${CFGKEY}}")
22+
foreach(BPACC_FUN_CFGFILE ${BPACC_FUN_PLATFORM_CONFIG_FILE_LIST})
23+
get_filename_component(CFGKEY "${BPACC_FUN_CFGFILE}" NAME_WE)
24+
if (DEFINED BPACC_FUN_CFGFILE_SRC_${CFGKEY})
25+
set(DEFAULT_SOURCE GENERATED_FILE "${BPACC_FUN_CFGFILE_SRC_${CFGKEY}}")
2626
else()
27-
set(DEFAULT_SOURCE FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${SAMPLE_APP_CFGFILE}")
27+
set(DEFAULT_SOURCE FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${BPACC_FUN_CFGFILE}")
2828
endif()
2929
generate_config_includefile(
30-
FILE_NAME "${SAMPLE_APP_CFGFILE}"
30+
FILE_NAME "${BPACC_FUN_CFGFILE}"
3131
${DEFAULT_SOURCE}
3232
)
3333
endforeach()

config/default_bpacc_fun_msgdefs.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#define BPACC_FUN_MSGDEFS_H
2828

2929
#include "common_types.h"
30-
#include "bpacc_fun_app_fcncodes.h"
30+
#include "default_bpacc_fun_fcncodes.h"
3131

3232
typedef struct BPACC_FUN_DisplayParam_Payload
3333
{
File renamed without changes.

fsw/src/bpacc_fun_app.c

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ void BPACC_FUN_Main(void)
7474
CFE_ES_PerfLogExit(BPACC_FUN_PERF_ID);
7575

7676
/* Pend on receipt of command packet */
77+
printf("CFE_SB_ReceiveBuffer PEND FOREVER\n");
7778
status = CFE_SB_ReceiveBuffer(&SBBufPtr, BPACC_FUN_Data.CommandPipe, CFE_SB_PEND_FOREVER);
7879

7980
/*

fsw/src/bpacc_fun_cmds.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
#include "bpacc_fun_utils.h"
3434
#include "bpacc_fun_msg.h"
3535

36-
// /* The bpaccel_lib module provides the BPACC_FUN_Function() prototype */
37-
// #include "bpaccel_lib.h"
36+
//#include bpaccel.h
3837

3938
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
4039
/* */
@@ -138,8 +137,7 @@ CFE_Status_t BPACC_FUN_ProcessCmd(const BPACC_FUN_ProcessCmd_t *Msg)
138137
return status;
139138
}
140139

141-
/* Invoke a function provided by BPACC_FUN_LIB */
142-
BPACC_FUN_LIB_Function();
140+
/* Call BPAccel Here */
143141

144142
return CFE_SUCCESS;
145143
}

mission_build.cmake

+26-26
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
11
###########################################################
22
#
3-
# SAMPLE_APP mission build setup
3+
# BPACC_FUN_APP mission build setup
44
#
55
# This file is evaluated as part of the "prepare" stage
66
# and can be used to set up prerequisites for the build,
77
# such as generating header files
88
#
99
###########################################################
1010

11-
# The list of header files that control the SAMPLE_APP configuration
12-
set(SAMPLE_APP_MISSION_CONFIG_FILE_LIST
13-
sample_app_fcncodes.h
14-
sample_app_interface_cfg.h
15-
sample_app_mission_cfg.h
16-
sample_app_perfids.h
17-
sample_app_msg.h
18-
sample_app_msgdefs.h
19-
sample_app_msgstruct.h
20-
sample_app_tbl.h
21-
sample_app_tbldefs.h
22-
sample_app_tblstruct.h
23-
sample_app_topicids.h
11+
# The list of header files that control the BPACC_FUN_APP configuration
12+
set(BPACC_FUN_APP_MISSION_CONFIG_FILE_LIST
13+
bpacc_fun_fcncodes.h
14+
bpacc_fun_interface_cfg.h
15+
bpacc_fun_mission_cfg.h
16+
bpacc_fun_perfids.h
17+
bpacc_fun_msg.h
18+
bpacc_fun_msgdefs.h
19+
bpacc_fun_msgstruct.h
20+
bpacc_fun_tbl.h
21+
bpacc_fun_tbldefs.h
22+
bpacc_fun_tblstruct.h
23+
bpacc_fun_topicids.h
2424
)
2525

2626
if (CFE_EDS_ENABLED_BUILD)
2727

2828
# In an EDS-based build, these files come generated from the EDS tool
29-
set(SAMPLE_APP_CFGFILE_SRC_sample_app_interface_cfg "sample_app_eds_designparameters.h")
30-
set(SAMPLE_APP_CFGFILE_SRC_sample_app_tbldefs "sample_app_eds_typedefs.h")
31-
set(SAMPLE_APP_CFGFILE_SRC_sample_app_tblstruct "sample_app_eds_typedefs.h")
32-
set(SAMPLE_APP_CFGFILE_SRC_sample_app_msgdefs "sample_app_eds_typedefs.h")
33-
set(SAMPLE_APP_CFGFILE_SRC_sample_app_msgstruct "sample_app_eds_typedefs.h")
34-
set(SAMPLE_APP_CFGFILE_SRC_sample_app_fcncodes "sample_app_eds_cc.h")
29+
set(BPACC_FUN_APP_CFGFILE_SRC_bpacc_fun_interface_cfg "bpacc_fun_eds_designparameters.h")
30+
set(BPACC_FUN_APP_CFGFILE_SRC_bpacc_fun_tbldefs "bpacc_fun_eds_typedefs.h")
31+
set(BPACC_FUN_APP_CFGFILE_SRC_bpacc_fun_tblstruct "bpacc_fun_eds_typedefs.h")
32+
set(BPACC_FUN_APP_CFGFILE_SRC_bpacc_fun_msgdefs "bpacc_fun_eds_typedefs.h")
33+
set(BPACC_FUN_APP_CFGFILE_SRC_bpacc_fun_msgstruct "bpacc_fun_eds_typedefs.h")
34+
set(BPACC_FUN_APP_CFGFILE_SRC_bpacc_fun_fcncodes "bpacc_fun_eds_cc.h")
3535

3636
endif(CFE_EDS_ENABLED_BUILD)
3737

3838
# Create wrappers around the all the config header files
3939
# This makes them individually overridable by the missions, without modifying
4040
# the distribution default copies
41-
foreach(SAMPLE_APP_CFGFILE ${SAMPLE_APP_MISSION_CONFIG_FILE_LIST})
42-
get_filename_component(CFGKEY "${SAMPLE_APP_CFGFILE}" NAME_WE)
43-
if (DEFINED SAMPLE_APP_CFGFILE_SRC_${CFGKEY})
44-
set(DEFAULT_SOURCE GENERATED_FILE "${SAMPLE_APP_CFGFILE_SRC_${CFGKEY}}")
41+
foreach(BPACC_FUN_APP_CFGFILE ${BPACC_FUN_APP_MISSION_CONFIG_FILE_LIST})
42+
get_filename_component(CFGKEY "${BPACC_FUN_APP_CFGFILE}" NAME_WE)
43+
if (DEFINED BPACC_FUN_APP_CFGFILE_SRC_${CFGKEY})
44+
set(DEFAULT_SOURCE GENERATED_FILE "${BPACC_FUN_APP_CFGFILE_SRC_${CFGKEY}}")
4545
else()
46-
set(DEFAULT_SOURCE FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${SAMPLE_APP_CFGFILE}")
46+
set(DEFAULT_SOURCE FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${BPACC_FUN_APP_CFGFILE}")
4747
endif()
4848
generate_config_includefile(
49-
FILE_NAME "${SAMPLE_APP_CFGFILE}"
49+
FILE_NAME "${BPACC_FUN_APP_CFGFILE}"
5050
${DEFAULT_SOURCE}
5151
)
5252
endforeach()

unit-test/coveragetest/bpacc_fun_coveragetest_common.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/**
2020
* @file
2121
*
22-
* Common definitions for all sample_app coverage tests
22+
* Common definitions for all bpacc_fun coverage tests
2323
*/
2424

2525
#ifndef BPACC_FUN_COVERAGETEST_COMMON_H

unit-test/coveragetest/coveragetest_bpacc_fun_app.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
************************************************************************/
1818

1919
/*
20-
** File: coveragetest_sample_app.c
20+
** File: coveragetest_bpacc_fun_app.c
2121
**
2222
** Purpose:
2323
** Coverage Unit Test cases for the BPACC_FUN Application
@@ -35,7 +35,6 @@
3535
/*
3636
* Includes
3737
*/
38-
#include "sample_lib.h" /* For BPACC_FUN_LIB_Function */
3938
#include "bpacc_fun_coveragetest_common.h"
4039

4140
/*

unit-test/coveragetest/coveragetest_bpacc_fun_cmds.c

-7
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
* Includes
3737
*/
3838

39-
//#include "sample_lib.h" /* For BPACC_FUN_LIB_Function */
4039
#include "bpacc_fun_coveragetest_common.h"
4140
#include "bpacc_fun.h"
4241
#include "bpacc_fun_dispatch.h"
@@ -154,12 +153,6 @@ void Test_BPACC_FUN_APP_ProcessCmd(void)
154153
*/
155154
UtAssert_STUB_COUNT(CFE_TBL_GetAddress, 1);
156155

157-
/*
158-
* Confirm that the BPACC_FUN_LIB_Function() call was done
159-
* NOTE: This stub is provided by the sample_lib library
160-
*/
161-
UtAssert_STUB_COUNT(BPACC_FUN_LIB_Function, 1);
162-
163156
/*
164157
* Configure the CFE_TBL_GetAddress function to return an error.
165158
* Exercise the error return path.

unit-test/coveragetest/coveragetest_bpacc_fun_utils.c

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
/*
3636
* Includes
3737
*/
38-
#include "sample_lib.h" /* For SAMPLE_LIB_Function */
3938
#include "bpacc_fun_coveragetest_common.h"
4039

4140
/*

unit-test/stubs/bpacc_fun_dispatch_stubs.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
/**
2020
* @file
2121
*
22-
* Auto-Generated stub implementations for functions defined in sample_app_dispatch header
22+
* Auto-Generated stub implementations for functions defined in bpacc_fun_dispatch header
2323
*/
2424

25-
#include "sample_app_dispatch.h"
25+
#include "bpacc_fun_dispatch.h"
2626
#include "utgenstub.h"
2727

2828
/*

unit-test/stubs/bpacc_fun_stubs.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
/**
2020
* @file
2121
*
22-
* Auto-Generated stub implementations for functions defined in sample_app header
22+
* Auto-Generated stub implementations for functions defined in bpacc_fun header
2323
*/
2424

25-
#include "bpacc_fun_app.h"
25+
#include "bpacc_fun.h"
2626
#include "utgenstub.h"
2727

2828
/*

0 commit comments

Comments
 (0)