Remove OP-TEE dependency of SP heap

Remove OPTEE_ prefix from OPTEE_SP_HEAP_SIZE definition and move it to
the CMake file of the deployment. This is a preparation for having
generic format SPs.

Signed-off-by: Imre Kis <imre.kis@arm.com>
Change-Id: I73028dcbdf27a44285a1cd250cd242865bf6d119
diff --git a/environments/opteesp/component.cmake b/environments/opteesp/component.cmake
index 1b7c418..86b1d19 100644
--- a/environments/opteesp/component.cmake
+++ b/environments/opteesp/component.cmake
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2020-2022, Arm Limited and Contributors. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -25,9 +25,14 @@
 set(TRACE_PREFIX "SP" CACHE STRING "Trace prefix")
 set(TRACE_LEVEL "TRACE_LEVEL_ERROR" CACHE STRING "Trace level")
 
+if (NOT DEFINED SP_HEAP_SIZE)
+	message(FATAL_ERROR "SP_HEAP_SIZE is not defined")
+endif()
+
 target_compile_definitions(${TGT} PRIVATE
 	TRACE_LEVEL=${TRACE_LEVEL}
 	TRACE_PREFIX="${TRACE_PREFIX}"
+	SP_HEAP_SIZE=${SP_HEAP_SIZE}
 )
 
 include(../../../external/newlib/newlib.cmake)
diff --git a/environments/opteesp/include/optee_sp_internal_api.h b/environments/opteesp/include/optee_sp_internal_api.h
index d275caa..1ffd4c1 100644
--- a/environments/opteesp/include/optee_sp_internal_api.h
+++ b/environments/opteesp/include/optee_sp_internal_api.h
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: BSD-3-Clause */
 /*
- * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved.
  */
 
 #ifndef OPTEE_SP_INTERNAL_API_H_
@@ -13,7 +13,6 @@
  * The SP code base should also contain a header file named
  * "optee_sp_user_defines.h" for passing the following definitions to the SP dev
  * kit:
- * * OPTEE_SP_HEAP_SIZE: Heap size in bytes
  * * OPTEE_SP_UUID: UUID of the SP as an sp_uuid structure
  * * OPTEE_SP_STACK_SIZE: Stack size in bytes
  * * OPTEE_SP_FLAGS: SP attributes (currently none available, set to zero)