Make elf output names compatible to symbolize.py
Change the name of elf output files of SP builds to follow the
{SP_NAME}_{UUID}.elf pattern. This allows symbolize.py to find the
relevant elf file on disk when analyzing stack dumps.
Signed-off-by: Jelle Sels <jelle.sels@arm.com>
Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
Change-Id: Id8135c6a37ecf02ab7a27f56b39663bccb250948
diff --git a/environments/sp/component.cmake b/environments/sp/component.cmake
index 56db858..2a4a502 100644
--- a/environments/sp/component.cmake
+++ b/environments/sp/component.cmake
@@ -5,21 +5,14 @@
#
#-------------------------------------------------------------------------------
-if (NOT DEFINED TGT)
- message(FATAL_ERROR "mandatory parameter TGT is not defined.")
-endif()
+# Check mandatory variables.
+foreach(_var IN ITEMS TGT TRACE_PREFIX SP_HEAP_SIZE SP_STACK_SIZE SP_UUID_CANON)
+ if (NOT DEFINED ${_var})
+ message(FATAL_ERROR "Mandatory parameter '${_var}' missing.")
+ endif()
+endforeach()
-if (NOT DEFINED TRACE_PREFIX)
- message(FATAL_ERROR "mandatory parameter TRACE_PREFIX is not defined.")
-endif()
-
-if (NOT DEFINED SP_HEAP_SIZE)
- message(FATAL_ERROR "mandatory parameter SP_HEAP_SIZE is not defined.")
-endif()
-
-if (NOT DEFINED SP_STACK_SIZE)
- message(FATAL_ERROR "mandatory parameter SP_STACK_SIZE is not defined.")
-endif()
+ts_add_uuid_to_exe_name(TGT "${TGT}" UUID "${SP_UUID_CANON}" )
target_sources(${TGT} PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/entry.S"