platform: Added deprecation warnings for AN539

This patch modifies the cmake configuration
for AN539 to display the deprecation warning at build-time.

It also adds a LOG_MESSAGE entry on the spm_hal which
displays a run-time notification.

The Deprecated Platforms section of the documentation is
updated to reflect this status change.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Change-Id: I1cddb70427ec314562197bca65aeb15172418c39
diff --git a/docs/contributing/platform_deprecation.rst b/docs/contributing/platform_deprecation.rst
index 29e2e83..71cda15 100644
--- a/docs/contributing/platform_deprecation.rst
+++ b/docs/contributing/platform_deprecation.rst
@@ -54,9 +54,9 @@
 |                              | after     |                                   |
 |                              | release   |                                   |
 +==============================+===========+===================================+
-|                              |           |                                   |
+|    mps2/an539                | 1.2       |   N.A                             |
 +------------------------------+-----------+-----------------------------------+
 
 --------------
 
-*Copyright (c) 2020, Arm Limited. All rights reserved.*
\ No newline at end of file
+*Copyright (c) 2020, Arm Limited. All rights reserved.*
diff --git a/platform/ext/target/mps2/an539/CMakeLists.txt b/platform/ext/target/mps2/an539/CMakeLists.txt
index a25b28f..dd7c2e6 100644
--- a/platform/ext/target/mps2/an539/CMakeLists.txt
+++ b/platform/ext/target/mps2/an539/CMakeLists.txt
@@ -8,6 +8,9 @@
 cmake_policy(SET CMP0076 NEW)
 set(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR})
 
+
+message(DEPRECATION "${TFM_PLATFORM} has been marked for deprecation.")
+
 #========================= Platform region defs ===============================#
 
 target_include_directories(platform_region_defs
diff --git a/platform/ext/target/mps2/an539/spm_hal.c b/platform/ext/target/mps2/an539/spm_hal.c
index c22fcd3..3864710 100644
--- a/platform/ext/target/mps2/an539/spm_hal.c
+++ b/platform/ext/target/mps2/an539/spm_hal.c
@@ -13,6 +13,8 @@
 #include "region_defs.h"
 #include "platform_description.h"
 #include "region.h"
+#include "tfm_hal_platform.h"
+#include "interface/include/log/tfm_log.h"
 
 /* Debug configuration flags */
 #define SPNIDEN_SEL_STATUS (0x01u << 7)
@@ -342,3 +344,12 @@
 {
     NVIC_DisableIRQ(irq_line);
 }
+
+enum tfm_hal_status_t tfm_hal_platform_init(void)
+{
+    __enable_irq();
+    stdio_init();
+    LOG_MSG("\033[1;34m[Platform] AN539 is marked for deprecation!\033[0m\r\n");
+
+    return TFM_HAL_SUCCESS;
+}