Skip to content

Commit

Permalink
Merge pull request #773 from jphickey/fix-710-specify-processorid
Browse files Browse the repository at this point in the history
Fix #710, Specify ProcessorID in targets.cmake
  • Loading branch information
astrogeco authored Jul 15, 2020
2 parents 9205e1d + 2868acc commit 1039f28
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 6 additions & 2 deletions cmake/sample_defs/targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
# This file indicates the architecture and configuration of the
# target boards that will run core flight software.
#
# The following variables are defined per board, where <x> is the
# CPU number starting with 1:
# The following variables are defined per board, where <x> is a
# sequential index number starting with 1:
#
# TGT<x>_NAME : the user-friendly name of the cpu. Should be simple
# word with no punctuation. This MUST be specified.
# TGT<x>_PROCESSORID : the default numeric ID for this processor at
# runtime. If not specified, then the sequential index number is
# used. This translates to the numeric value returned by
# CFE_PSP_GetProcessorId() at runtime.
# TGT<x>_APPLIST : list of applications to build and install on the CPU.
# These are built as dynamically-loaded applications and installed
# as files in the non-volatile storage of the target, and loaded
Expand Down
6 changes: 5 additions & 1 deletion cmake/target/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})

# The CPU ID and name are defined by the build scripts for this target
if (DEFINED TGTID)
add_definitions(-DCFE_CPU_ID_VALUE=${TGTID})
if (DEFINED TGT${TGTID}_PROCESSORID)
add_definitions(-DCFE_CPU_ID_VALUE=${TGT${TGTID}_PROCESSORID})
else()
add_definitions(-DCFE_CPU_ID_VALUE=${TGTID})
endif()
endif()
if (DEFINED SPACECRAFT_ID)
add_definitions(-DCFE_SPACECRAFT_ID_VALUE=${SPACECRAFT_ID})
Expand Down

0 comments on commit 1039f28

Please sign in to comment.