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 7b93466 commit 640f84c
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 @@ -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 640f84c

Please sign in to comment.