Skip to content

Commit

Permalink
Fix nasa#710, allow setting of processor ID in targets.cmake
Browse files Browse the repository at this point in the history
Add support for a TGTx_PROCESSOR_ID directive, which allows
one to set the default value returned by CFE_PSP_GetProcessorId()
function, rather than assuming the index value from CMake.
  • Loading branch information
jphickey committed Jul 9, 2020
1 parent a47abba commit fe47a3e
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit fe47a3e

Please sign in to comment.