aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorAndrzej Głąbek <andrzej.glabek@nordicsemi.no>2021-03-02 18:50:02 +0100
committerAnton Komlev <Anton.Komlev@arm.com>2021-03-17 10:41:48 +0100
commit78b0da388bacd81c3d081f3676397c7c588c8bd2 (patch)
tree6bdc9bea9d1af53436b06d54220c98338a943f87 /platform
parent28659c498c3bdbbc610959e7518bece5aaf72a19 (diff)
downloadtrusted-firmware-m-78b0da388bacd81c3d081f3676397c7c588c8bd2.tar.gz
platform: Add deprecation warnings for nRF5340 PDK
Indicate that the nRF5340 PDK (nordic_nrf/nrf5340pdk_nrf5340_cpuapp) platform is deprecated by issuing a corresponding cmake warning at build time and a run-time log message when the platform is initialized. Add also the platform to the List of Deprecated Platforms in the Platform deprecation and removal section of the TF-M documentation. Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no> Change-Id: Ibe657cf03d8973703418ac260a8d20d7fa1a85d7
Diffstat (limited to 'platform')
-rw-r--r--platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/CMakeLists.txt7
-rw-r--r--platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/plat_init.c22
2 files changed, 29 insertions, 0 deletions
diff --git a/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/CMakeLists.txt b/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/CMakeLists.txt
index ee8932da79..97a2a3f945 100644
--- a/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/CMakeLists.txt
+++ b/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/CMakeLists.txt
@@ -9,6 +9,8 @@ cmake_policy(SET CMP0076 NEW)
set(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR})
set(NRF_BOARD_SELECTED True)
+message(DEPRECATION "${TFM_PLATFORM} has been marked for deprecation.")
+
add_subdirectory(../common/nrf5340 nrf5340)
target_include_directories(platform_region_defs
@@ -22,6 +24,11 @@ target_include_directories(platform_s
../common/nrf5340/partition
)
+target_sources(platform_s
+ PRIVATE
+ plat_init.c
+)
+
target_include_directories(platform_ns
PUBLIC
.
diff --git a/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/plat_init.c b/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/plat_init.c
new file mode 100644
index 0000000000..aae89db7eb
--- /dev/null
+++ b/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/plat_init.c
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ */
+
+#include "tfm_hal_platform.h"
+#include "cmsis.h"
+#include "uart_stdout.h"
+#include "log/tfm_log.h"
+
+enum tfm_hal_status_t tfm_hal_platform_init(void)
+{
+ __enable_irq();
+ stdio_init();
+
+ LOG_MSG("\033[1;34m[Platform] nRF5340 PDK is marked for deprecation!"
+ "\033[0m\r\n");
+
+ return TFM_HAL_SUCCESS;
+}