Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #710, Specify ProcessorID in targets.cmake #773

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -48,7 +48,11 @@ include_directories(${CMAKE_BINARY_DIR}/${CFE_CORE_TARGET}/inc)

# 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