diff --git a/.gitignore b/.gitignore index 0f32a7a8..f0f562f0 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ build support/nos3_install.log tmp core.* +.cdskeyfile +.reservedkeyfile +.resetkeyfile diff --git a/Makefile b/Makefile index 95ea8b5b..b7c8c3bf 100644 --- a/Makefile +++ b/Makefile @@ -61,6 +61,11 @@ build-sim: cd $(SIMBUILDDIR) && cmake -DCMAKE_INSTALL_PREFIX=$(SIMBUILDDIR) .. $(MAKE) --no-print-directory -C $(SIMBUILDDIR) install +build-test: + mkdir -p $(FSWBUILDDIR) + cd $(FSWBUILDDIR) && cmake $(PREP_OPTS) -DENABLE_UNIT_TESTS=true ../cfe + $(MAKE) --no-print-directory -C $(FSWBUILDDIR) mission-install + checkout: ./scripts/docker_checkout.sh @@ -118,5 +123,8 @@ stop: stop-gsw: ./scripts/stop_gsw.sh +test-fsw: + cd $(FSWBUILDDIR)/amd64-posix/default_cpu1 && ctest -O ctest.log + igniter: ./scripts/igniter_launch.sh diff --git a/cfg/nos3_defs/targets.cmake b/cfg/nos3_defs/targets.cmake index b670344d..e1871f9f 100644 --- a/cfg/nos3_defs/targets.cmake +++ b/cfg/nos3_defs/targets.cmake @@ -145,7 +145,11 @@ SET(MISSION_CPUNAMES cpu1) SET(cpu1_PROCESSORID 1) SET(cpu1_APPLIST) # Note: Using all ${MISSION_GLOBAL_APPLIST} automatically SET(cpu1_FILELIST cfe_es_startup.scr) -SET(cpu1_SYSTEM amd64-linux-gnu) +if (ENABLE_UNIT_TESTS) + SET(cpu1_SYSTEM amd64-posix) +else() + SET(cpu1_SYSTEM amd64-nos3) +endif() # USER Supplied #SET(cpu2_PROCESSORID 2) diff --git a/cfg/nos3_defs/toolchain-amd64-linux-gnu.cmake b/cfg/nos3_defs/toolchain-amd64-nos3.cmake similarity index 100% rename from cfg/nos3_defs/toolchain-amd64-linux-gnu.cmake rename to cfg/nos3_defs/toolchain-amd64-nos3.cmake diff --git a/cfg/nos3_defs/toolchain-amd64-posix.cmake b/cfg/nos3_defs/toolchain-amd64-posix.cmake new file mode 100644 index 00000000..d5356637 --- /dev/null +++ b/cfg/nos3_defs/toolchain-amd64-posix.cmake @@ -0,0 +1,34 @@ +# This example toolchain file describes the cross compiler to use for +# the target architecture indicated in the configuration file. + +# Basic cross system configuration +SET(CMAKE_SYSTEM_NAME Linux) +SET(CMAKE_SYSTEM_VERSION 1) +SET(CMAKE_SYSTEM_PROCESSOR amd64) + +# Specify the cross compiler executables +# Typically these would be installed in a home directory or somewhere +# in /opt. However in this example the system compiler is used. +SET(CMAKE_C_COMPILER "/usr/bin/gcc") +SET(CMAKE_CXX_COMPILER "/usr/bin/g++") + +# Configure the find commands +SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER) +SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) + +# These variable settings are specific to cFE/OSAL and determines which +# abstraction layers are built when using this toolchain +SET(CFE_SYSTEM_PSPNAME "pc-linux") +SET(OSAL_SYSTEM_OSTYPE "posix") + +#SET(CMAKE_C_FLAGS_INIT "" CACHE STRING "C Flags required by platform") +#SET(CMAKE_SHARED_LINKER_FLAGS "-pg") + +# Build Specific +add_definitions(-DBYTE_ORDER_LE) +add_definitions(-D_LINUX_OS_) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + +set(CI_TRANSPORT udp_tf) +set(TO_TRANSPORT udp) # Note udp_tf used for Transfer Frames required for CryptoLib diff --git a/components/sample b/components/sample index 34260dd8..7845664c 160000 --- a/components/sample +++ b/components/sample @@ -1 +1 @@ -Subproject commit 34260dd8a8d929b6d36c8805f08754aa847d6e97 +Subproject commit 7845664c3ed42e4aa83d04fae1b507099ae21b55 diff --git a/fsw/apps/ds b/fsw/apps/ds index 3f273f6a..d17e750b 160000 --- a/fsw/apps/ds +++ b/fsw/apps/ds @@ -1 +1 @@ -Subproject commit 3f273f6a552c1fb408b989ac0d78743452d3dbc3 +Subproject commit d17e750bec8ec9a2cfbcd32f5633dafaf919bc40 diff --git a/fsw/apps/hwlib b/fsw/apps/hwlib index cf82b544..9c4dc2a1 160000 --- a/fsw/apps/hwlib +++ b/fsw/apps/hwlib @@ -1 +1 @@ -Subproject commit cf82b54413a007e79f534234733f113359660eb3 +Subproject commit 9c4dc2a169f220c515629e5e8cc1a60929605035 diff --git a/fsw/apps/sc b/fsw/apps/sc index 37e919b7..bb3e6945 160000 --- a/fsw/apps/sc +++ b/fsw/apps/sc @@ -1 +1 @@ -Subproject commit 37e919b76b1a34fc93917d636dfc5f238de72945 +Subproject commit bb3e6945830b7e6cd7a3d25fa00969ac2c4f7be6 diff --git a/fsw/osal b/fsw/osal index 570ad091..9c9b9f6d 160000 --- a/fsw/osal +++ b/fsw/osal @@ -1 +1 @@ -Subproject commit 570ad0913daf57ad2a62c92f6a0daef5a94f72ba +Subproject commit 9c9b9f6dd75b7b3adaf9021040db3d112ef709e5 diff --git a/fsw/psp b/fsw/psp index 1159205e..cd5546b9 160000 --- a/fsw/psp +++ b/fsw/psp @@ -1 +1 @@ -Subproject commit 1159205edc17db5806ec89c6c2d97125d294c836 +Subproject commit cd5546b9b873fb50a5a7154d4072356dc6ba042e diff --git a/scripts/docker_debug.sh b/scripts/docker_debug.sh index 87c541a7..05f479db 100755 --- a/scripts/docker_debug.sh +++ b/scripts/docker_debug.sh @@ -9,4 +9,4 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) source $SCRIPT_DIR/env.sh mkdir -p $BASE_DIR/fsw/build -$DFLAGS_CPUS -v $BASE_DIR:$BASE_DIR -v $USER_NOS3_DIR:$USER_NOS3_DIR -w $BASE_DIR --name "nos3_debug" $DBOX bash +$DFLAGS_CPUS -v $BASE_DIR:$BASE_DIR -v $USER_NOS3_DIR:$USER_NOS3_DIR -w $BASE_DIR --sysctl fs.mqueue.msg_max=10000 --ulimit rtprio=99 --cap-add=sys_nice --name "nos3_debug" $DBOX bash