Skip to content

Commit

Permalink
[#176] Created posix and nos3 toolchains and use targets.cmake to det…
Browse files Browse the repository at this point in the history
…ect if building unit tests;
  • Loading branch information
jlucas9 committed Jul 1, 2024
1 parent ab4b58d commit 9c7b61b
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ test-fsw:
mkdir -p $(FSWBUILDDIR)
cd $(FSWBUILDDIR) && cmake $(PREP_OPTS) -DENABLE_UNIT_TESTS=true ../cfe
$(MAKE) --no-print-directory -C $(FSWBUILDDIR) mission-install
cd $(FSWBUILDDIR)/amd64-linux-gnu/default_cpu1 && ctest -O ctest.log
cd $(FSWBUILDDIR)/amd64-posix/default_cpu1 && ctest -O ctest.log

igniter:
./scripts/igniter_launch.sh
6 changes: 5 additions & 1 deletion cfg/nos3_defs/targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
File renamed without changes.
34 changes: 34 additions & 0 deletions cfg/nos3_defs/toolchain-amd64-posix.cmake
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion fsw/osal
Submodule osal updated 30 files
+1 −1 src/os/nos/inc/NOS-time.h
+1 −1 src/os/nos/src/NOS-time.c
+6 −7 src/os/nos/src/os-impl-tasks.c
+0 −2 src/tests/bin-sem-flush-test/bin-sem-flush-test.c
+0 −2 src/tests/bin-sem-test/bin-sem-test.c
+0 −2 src/tests/bin-sem-timeout-test/bin-sem-timeout-test.c
+0 −2 src/tests/condvar-test/condvar-test.c
+0 −2 src/tests/count-sem-test/count-sem-test.c
+0 −2 src/tests/count-sem-timeout-test/count-sem-timeout-test.c
+0 −2 src/tests/file-api-test/file-api-test.c
+0 −2 src/tests/file-sys-add-fixed-map-api-test/file-sys-add-fixed-map-api-test.c
+0 −2 src/tests/idmap-api-test/idmap-api-test.c
+0 −2 src/tests/mutex-test/mutex-test.c
+0 −2 src/tests/network-api-test/network-api-test.c
+0 −2 src/tests/osal-core-test/osal-core-test.c
+0 −2 src/tests/queue-test/queue-test.c
+0 −2 src/tests/select-test/select-test.c
+0 −2 src/tests/sem-speed-test/sem-speed-test.c
+0 −2 src/tests/shell-test/shell-test.c
+0 −2 src/tests/symbol-api-test/symbol-api-test.c
+0 −2 src/tests/time-base-api-test/time-base-api-test.c
+0 −2 src/tests/timer-add-api-test/timer-add-api-test.c
+0 −2 src/tests/timer-test/timer-test.c
+0 −1 src/unit-tests/oscore-test/ut_oscore_misc_test.c
+0 −1 src/unit-tests/osfile-test/ut_osfile_test.c
+0 −1 src/unit-tests/osfilesys-test/ut_osfilesys_test.c
+0 −1 src/unit-tests/osloader-test/ut_osloader_test.c
+0 −1 src/unit-tests/osnetwork-test/ut_osnetwork_test.c
+0 −1 src/unit-tests/ostimer-test/ut_ostimer_test.c
+0 −19 ut_assert/inc/utnos3.h

0 comments on commit 9c7b61b

Please sign in to comment.