aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Moreno Berengue <marc.morenoberengue@arm.com>2018-01-25 15:21:22 +0000
committerAshutosh Singh <ashutosh.singh@arm.com>2018-02-14 16:54:50 +0000
commita1f296f55a09c522b33f205c8d3d841c123190ca (patch)
tree06a1056af7e9b2d727e879fe79b8cf840d93fc8c
parent4036a8a7339ea6a7226a802fbbe7e52eb5576155 (diff)
downloadtrusted-firmware-m-a1f296f55a09c522b33f205c8d3d841c123190ca.tar.gz
Platform: Reorganize and rename sse_200_mps2 folder
This patch reorganizes and renames sse_200_mps2 folder to be able to add new MPS2 subsystems. The patch applies the following changes: - renames sse_200_mps2 to mps2 in order to be able to add new MPS2 subsystems - create the an521 folder to add all SMM-SSE-200 files. AN521 is the name of Soft Macro Model (SMM) SSE-200 subsytem for MPS2 - refactor smm_mps2.h file to make it generic across all mps2 subsystems. - updates cmake files to use the new paths - removes unnecessary include files in cmake setting files - removes unnecessary files for mps2 and an521 Change-Id: I1ceb1e371fdfb90ac4aa1e3403868a3f01ada2e6 Signed-off-by: Marc Moreno <marc.morenoberengue@arm.com>
-rw-r--r--CommonConfig.cmake6
-rw-r--r--ConfigCoreTest.cmake7
-rw-r--r--ConfigDefault.cmake7
-rw-r--r--ConfigRegression.cmake7
-rw-r--r--app/CMakeLists.txt30
-rw-r--r--bl2/ext/mcuboot/CMakeLists.txt35
-rw-r--r--bl2/ext/mcuboot/scripts/assemble.py4
-rw-r--r--cmake/Common/BoardAN521.cmake (renamed from cmake/Common/BoardSSE200.cmake)0
-rw-r--r--docs/user_guides/tfm_integration_guide.md19
-rw-r--r--platform/ext/Mps2AN521.cmake98
-rw-r--r--platform/ext/Mps2SSE200.cmake117
-rw-r--r--platform/ext/target/common/flash_memory_mapped.c (renamed from platform/ext/target/sse_200_mps2/mps2/mps2_board/mps2_flash.c)0
-rw-r--r--platform/ext/target/mps2/an521/RTE_Device.h (renamed from platform/ext/target/sse_200_mps2/sse_200/RTE_Device.h)48
-rw-r--r--platform/ext/target/mps2/an521/armclang/mps2_an521_bl2.sct (renamed from platform/ext/target/sse_200_mps2/sse_200/armclang/sse_200_bl2.sct)0
-rw-r--r--platform/ext/target/mps2/an521/armclang/mps2_an521_ns.sct (renamed from platform/ext/target/sse_200_mps2/sse_200/armclang/sse_200_ns.sct)0
-rw-r--r--platform/ext/target/mps2/an521/armclang/mps2_an521_s.sct (renamed from platform/ext/target/sse_200_mps2/sse_200/armclang/sse_200_s.sct)0
-rw-r--r--platform/ext/target/mps2/an521/armclang/startup_cmsdk_mps2_an521_bl2.s (renamed from platform/ext/target/sse_200_mps2/sse_200/armclang/startup_cmsdk_sse_200_bl2.s)0
-rw-r--r--platform/ext/target/mps2/an521/armclang/startup_cmsdk_mps2_an521_ns.s (renamed from platform/ext/target/sse_200_mps2/sse_200/armclang/startup_cmsdk_sse_200_ns.s)0
-rw-r--r--platform/ext/target/mps2/an521/armclang/startup_cmsdk_mps2_an521_s.s (renamed from platform/ext/target/sse_200_mps2/sse_200/armclang/startup_cmsdk_sse_200_s.s)0
-rw-r--r--platform/ext/target/mps2/an521/cmsis_core/cmsis.h (renamed from platform/ext/target/sse_200_mps2/cmsis_core/cmsis.h)12
-rw-r--r--platform/ext/target/mps2/an521/cmsis_core/mps2_an521.h (renamed from platform/ext/target/sse_200_mps2/cmsis_core/mps2_sse_200.h)10
-rw-r--r--platform/ext/target/mps2/an521/cmsis_core/platform_irq.h (renamed from platform/ext/target/sse_200_mps2/cmsis_core/platform_irq.h)8
-rw-r--r--platform/ext/target/mps2/an521/cmsis_core/platform_regs.h (renamed from platform/ext/target/sse_200_mps2/cmsis_core/platform_regs.h)8
-rw-r--r--platform/ext/target/mps2/an521/cmsis_core/system_cmsdk_mps2_an521.c (renamed from platform/ext/target/sse_200_mps2/cmsis_core/system_cmsdk_mps2_sse_200.c)4
-rw-r--r--platform/ext/target/mps2/an521/cmsis_core/system_cmsdk_mps2_an521.h (renamed from platform/ext/target/sse_200_mps2/cmsis_core/system_cmsdk_mps2_sse_200.h)8
-rw-r--r--platform/ext/target/mps2/an521/cmsis_drivers/Driver_MPC.c (renamed from platform/ext/target/sse_200_mps2/sse_200/cmsis_drivers/Driver_MPC.c)0
-rw-r--r--platform/ext/target/mps2/an521/cmsis_drivers/Driver_PPC.c (renamed from platform/ext/target/sse_200_mps2/sse_200/cmsis_drivers/Driver_PPC.c)0
-rw-r--r--platform/ext/target/mps2/an521/cmsis_drivers/Driver_USART.c (renamed from platform/ext/target/sse_200_mps2/sse_200/cmsis_drivers/Driver_USART.c)0
-rw-r--r--platform/ext/target/mps2/an521/device_cfg.h (renamed from platform/ext/target/sse_200_mps2/sse_200/device_cfg.h)19
-rw-r--r--platform/ext/target/mps2/an521/dummy_crypto_keys.c (renamed from platform/ext/target/sse_200_mps2/dummy_crypto_keys.c)4
-rw-r--r--platform/ext/target/mps2/an521/native_drivers/arm_uart_drv.c (renamed from platform/ext/target/sse_200_mps2/sse_200/native_drivers/arm_uart_drv.c)0
-rw-r--r--platform/ext/target/mps2/an521/native_drivers/arm_uart_drv.h (renamed from platform/ext/target/sse_200_mps2/sse_200/native_drivers/arm_uart_drv.h)0
-rw-r--r--platform/ext/target/mps2/an521/native_drivers/mpc_sie200_drv.c (renamed from platform/ext/target/sse_200_mps2/sse_200/native_drivers/mpc_sie200_drv.c)0
-rw-r--r--platform/ext/target/mps2/an521/native_drivers/mpc_sie200_drv.h (renamed from platform/ext/target/sse_200_mps2/sse_200/native_drivers/mpc_sie200_drv.h)0
-rw-r--r--platform/ext/target/mps2/an521/native_drivers/ppc_sse200_drv.c (renamed from platform/ext/target/sse_200_mps2/sse_200/native_drivers/ppc_sse200_drv.c)0
-rw-r--r--platform/ext/target/mps2/an521/native_drivers/ppc_sse200_drv.h (renamed from platform/ext/target/sse_200_mps2/sse_200/native_drivers/ppc_sse200_drv.h)0
-rw-r--r--platform/ext/target/mps2/an521/native_drivers/timer_cmsdk/timer_cmsdk.c (renamed from platform/ext/target/sse_200_mps2/sse_200/native_drivers/timer_cmsdk/timer_cmsdk.c)0
-rw-r--r--platform/ext/target/mps2/an521/native_drivers/timer_cmsdk/timer_cmsdk.h (renamed from platform/ext/target/sse_200_mps2/sse_200/native_drivers/timer_cmsdk/timer_cmsdk.h)0
-rw-r--r--platform/ext/target/mps2/an521/partition/flash_layout.h (renamed from platform/ext/target/sse_200_mps2/sse_200/partition/flash_layout.h)0
-rw-r--r--platform/ext/target/mps2/an521/partition/region_defs.h (renamed from platform/ext/target/sse_200_mps2/sse_200/partition/region_defs.h)0
-rw-r--r--platform/ext/target/mps2/an521/retarget/platform_retarget.h (renamed from platform/ext/target/sse_200_mps2/sse_200/retarget/platform_retarget.h)8
-rw-r--r--platform/ext/target/mps2/an521/retarget/platform_retarget_dev.c (renamed from platform/ext/target/sse_200_mps2/sse_200/retarget/platform_retarget_dev.c)5
-rw-r--r--platform/ext/target/mps2/an521/retarget/platform_retarget_dev.h (renamed from platform/ext/target/sse_200_mps2/sse_200/retarget/platform_retarget_dev.h)8
-rw-r--r--platform/ext/target/mps2/an521/retarget/platform_retarget_pins.h (renamed from platform/ext/target/sse_200_mps2/sse_200/retarget/platform_retarget_pins.h)8
-rw-r--r--platform/ext/target/mps2/an521/target_cfg.c (renamed from platform/ext/target/sse_200_mps2/target_cfg.c)0
-rw-r--r--platform/ext/target/mps2/an521/target_cfg.h (renamed from platform/ext/target/sse_200_mps2/target_cfg.h)0
-rw-r--r--platform/ext/target/mps2/smm_mps2.h (renamed from platform/ext/target/sse_200_mps2/mps2/mps2_board/smm_mps2.h)18
-rw-r--r--platform/ext/target/sse_200_mps2/mps2/mps2_board/mps2_leds.c87
-rw-r--r--platform/ext/target/sse_200_mps2/mps2/mps2_board/mps2_leds.h80
-rw-r--r--platform/ext/target/sse_200_mps2/mps2/mps2_board/mps2_time.c82
-rw-r--r--platform/ext/target/sse_200_mps2/mps2/mps2_board/mps2_time.h70
-rw-r--r--platform/ext/target/sse_200_mps2/sse_200/partition/region_limits.h31
-rw-r--r--secure_fw/CMakeLists.txt32
-rw-r--r--secure_fw/core/CMakeLists.inc24
-rw-r--r--secure_fw/services/secure_storage/CMakeLists.inc24
-rw-r--r--secure_fw/spm/CMakeLists.inc22
-rw-r--r--test/test_services/CMakeLists.inc23
57 files changed, 327 insertions, 646 deletions
diff --git a/CommonConfig.cmake b/CommonConfig.cmake
index e1deb20b34..75960c456a 100644
--- a/CommonConfig.cmake
+++ b/CommonConfig.cmake
@@ -83,11 +83,11 @@ endif()
##Secure side
config_setting_shared_flags(tfm_s)
-embedded_set_target_linker_file(TARGET tfm_s PATH "${CMAKE_CURRENT_LIST_DIR}/platform/ext/target/sse_200_mps2/sse_200/armclang/sse_200_s.sct")
+embedded_set_target_linker_file(TARGET tfm_s PATH "${CMAKE_CURRENT_LIST_DIR}/platform/ext/target/mps2/an521/armclang/mps2_an521_s.sct")
##Non secure side
config_setting_shared_flags(tfm_ns)
-embedded_set_target_linker_file(TARGET tfm_ns PATH "${CMAKE_CURRENT_LIST_DIR}/platform/ext/target/sse_200_mps2/sse_200/armclang/sse_200_ns.sct")
+embedded_set_target_linker_file(TARGET tfm_ns PATH "${CMAKE_CURRENT_LIST_DIR}/platform/ext/target/mps2/an521/armclang/mps2_an521_ns.sct")
##TF-M storage
config_setting_shared_flags(tfm_storage)
@@ -105,4 +105,4 @@ config_setting_shared_flags(tfm_non_secure_tests)
##BL2
config_setting_shared_flags(mcuboot)
-set(MBEDTLS_C_FLAGS_BL2 "-D__ARM_FEATURE_CMSE=3 -D__thumb2__ -fshort-enums -mfpu=none -fshort-wchar -funsigned-char -mcmse -DMBEDTLS_CONFIG_FILE=\\\\\\\"config-boot.h\\\\\\\" -I${CMAKE_CURRENT_LIST_DIR}/bl2/ext/mcuboot/include") \ No newline at end of file
+set(MBEDTLS_C_FLAGS_BL2 "-D__ARM_FEATURE_CMSE=3 -D__thumb2__ -fshort-enums -mfpu=none -fshort-wchar -funsigned-char -mcmse -DMBEDTLS_CONFIG_FILE=\\\\\\\"config-boot.h\\\\\\\" -I${CMAKE_CURRENT_LIST_DIR}/bl2/ext/mcuboot/include")
diff --git a/ConfigCoreTest.cmake b/ConfigCoreTest.cmake
index 09f1c92fd1..7faeafcd60 100644
--- a/ConfigCoreTest.cmake
+++ b/ConfigCoreTest.cmake
@@ -7,15 +7,18 @@
#This file holds information of a specific build configuration of this project.
+#Select platform specific build system settings file.
+set(PLATFORM_CMAKE_FILE "${CMAKE_CURRENT_LIST_DIR}/platform/ext/Mps2AN521.cmake")
+
#Include board specific config (CPU, etc...)
-include("Common/BoardSSE200")
+include("Common/BoardAN521")
#Use any ARMCLANG version found on PATH. Note: Only versions supported by the
#build system will work. A file cmake/Common/CompilerArmClangXY.cmake
#must be present with a matching version.
include("Common/FindArmClang")
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/cmake/Common/${ARMCLANG_MODULE}.cmake")
- message(FATAL_ERROR "ERROR: Unsupported ARMCLANG compiler version found on PATH.")
+ message(FATAL_ERROR "ERROR: Unsupported ARMCLANG compiler version found on PATH.")
endif()
include("Common/${ARMCLANG_MODULE}")
diff --git a/ConfigDefault.cmake b/ConfigDefault.cmake
index 83b4bf47b4..7aa18e0425 100644
--- a/ConfigDefault.cmake
+++ b/ConfigDefault.cmake
@@ -7,15 +7,18 @@
#This file holds information of a specific build configuration of this project.
+#Select platform specific build system settings file.
+set(PLATFORM_CMAKE_FILE "${CMAKE_CURRENT_LIST_DIR}/platform/ext/Mps2AN521.cmake")
+
#Include board specific config (CPU, etc...)
-include("Common/BoardSSE200")
+include("Common/BoardAN521")
#Use any ARMCLANG version found on PATH. Note: Only versions supported by the
#build system will work. A file cmake/Common/CompilerArmClangXY.cmake
#must be present with a matching version.
include("Common/FindArmClang")
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/cmake/Common/${ARMCLANG_MODULE}.cmake")
- message(FATAL_ERROR "ERROR: Unsupported ARMCLANG compiler version found on PATH.")
+ message(FATAL_ERROR "ERROR: Unsupported ARMCLANG compiler version found on PATH.")
endif()
include("Common/${ARMCLANG_MODULE}")
diff --git a/ConfigRegression.cmake b/ConfigRegression.cmake
index e8b6133da4..7e65ab1e84 100644
--- a/ConfigRegression.cmake
+++ b/ConfigRegression.cmake
@@ -7,15 +7,18 @@
#This file holds information of a specific build configuration of this project.
+#Select platform specific build system settings file.
+set(PLATFORM_CMAKE_FILE "${CMAKE_CURRENT_LIST_DIR}/platform/ext/Mps2AN521.cmake")
+
#Include board specific config (CPU, etc...)
-include("Common/BoardSSE200")
+include("Common/BoardAN521")
#Use any ARMCLANG version found on PATH. Note: Only versions supported by the
#build system will work. A file cmake/Common/CompilerArmClangXY.cmake
#must be present with a matching version.
include("Common/FindArmClang")
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/cmake/Common/${ARMCLANG_MODULE}.cmake")
- message(FATAL_ERROR "ERROR: Unsupported ARMCLANG compiler version found on PATH.")
+ message(FATAL_ERROR "ERROR: Unsupported ARMCLANG compiler version found on PATH.")
endif()
include("Common/${ARMCLANG_MODULE}")
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index 7a6a7189b2..46dfd262e9 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -41,19 +41,23 @@ set(NS_APP_SRC "${CMSIS_5_DIR}/CMSIS/RTOS2/RTX/Config/RTX_Config.c"
"${INTERFACE_DIR}/src/tfm_ns_lock_rtx.c"
)
-set(MPS2_SSE200_BUILD_CMSIS_CORE On)
-set(MPS2_SSE200_BUILD_RETARGET On)
-set(MPS2_SSE200_BUILD_NATIVE_DRIVERS On)
-set(MPS2_SSE200_BUILD_MPS2_TIME Off)
-set(MPS2_SSE200_BUILD_STARTUP On)
-set(MPS2_SSE200_BUILD_TARGET_CFG Off)
-set(MPS2_SSE200_BUILD_TARGET_HARDWARE_KEYS Off)
-set(MPS2_SSE200_BUILD_CMSIS_DRIVERS On)
-set(MPS2_SSE200_BUILD_UART_STDOUT Off)
-set(MPS2_SSE200_BUILD_MPS2_BOARD_LEDS On)
-set(MPS2_SSE200_BUILD_MPS2_BOARD_TIME On)
-set(MPS2_SSE200_BUILD_MPS2_BOARD_FLASH Off)
-include(${TFM_ROOT_DIR}/platform/ext/Mps2SSE200.cmake)
+set(BUILD_CMSIS_CORE On)
+set(BUILD_RETARGET On)
+set(BUILD_NATIVE_DRIVERS On)
+set(BUILD_TIME Off)
+set(BUILD_STARTUP On)
+set(BUILD_TARGET_CFG Off)
+set(BUILD_TARGET_HARDWARE_KEYS Off)
+set(BUILD_CMSIS_DRIVERS On)
+set(BUILD_UART_STDOUT Off)
+set(BUILD_FLASH Off)
+if(NOT DEFINED PLATFORM_CMAKE_FILE)
+ message (FATAL_ERROR "Platform specific CMake is not defined. Please set PLATFORM_CMAKE_FILE.")
+elseif(NOT EXISTS ${PLATFORM_CMAKE_FILE})
+ message (FATAL_ERROR "Platform specific CMake \"${PLATFORM_CMAKE_FILE}\" file does not exist. Please fix value of PLATFORM_CMAKE_FILE.")
+else()
+ include(${PLATFORM_CMAKE_FILE})
+endif()
#Set include directories.
embedded_target_include_directories(TARGET ${PROJECT_NAME} PATH ${TFM_ROOT_DIR}/common/sct ABSOLUTE APPEND)
diff --git a/bl2/ext/mcuboot/CMakeLists.txt b/bl2/ext/mcuboot/CMakeLists.txt
index b98a66e122..0b9f2790db 100644
--- a/bl2/ext/mcuboot/CMakeLists.txt
+++ b/bl2/ext/mcuboot/CMakeLists.txt
@@ -1,5 +1,5 @@
#------------------------------------------------------------------------------
-# Copyright (c) 2017, Arm Limited. All rights reserved.
+# Copyright (c) 2017-2018, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -38,19 +38,24 @@ endif()
set(MCUBOOT_DIR ${CMAKE_CURRENT_LIST_DIR})
get_filename_component(TFM_ROOT_DIR "${MCUBOOT_DIR}/../../.." ABSOLUTE)
-set(MPS2_SSE200_BUILD_CMSIS_CORE On)
-set(MPS2_SSE200_BUILD_RETARGET On)
-set(MPS2_SSE200_BUILD_NATIVE_DRIVERS On)
-set(MPS2_SSE200_BUILD_STARTUP On)
-set(MPS2_SSE200_BUILD_TARGET_CFG Off)
-set(MPS2_SSE200_BUILD_TARGET_HARDWARE_KEYS Off)
-set(MPS2_SSE200_BUILD_CMSIS_DRIVERS On)
-set(MPS2_SSE200_BUILD_MPS2_TIME Off)
-set(MPS2_SSE200_BUILD_UART_STDOUT On)
-set(MPS2_SSE200_BUILD_MPS2_BOARD_LEDS Off)
-set(MPS2_SSE200_BUILD_MPS2_BOARD_TIME On)
-set(MPS2_SSE200_BUILD_MPS2_BOARD_FLASH On)
-include(${TFM_ROOT_DIR}/platform/ext/Mps2SSE200.cmake)
+set(BUILD_CMSIS_CORE On)
+set(BUILD_RETARGET On)
+set(BUILD_NATIVE_DRIVERS On)
+set(BUILD_STARTUP On)
+set(BUILD_TARGET_CFG Off)
+set(BUILD_TARGET_HARDWARE_KEYS Off)
+set(BUILD_CMSIS_DRIVERS On)
+set(BUILD_TIME Off)
+set(BUILD_UART_STDOUT On)
+set(BUILD_FLASH On)
+if(NOT DEFINED PLATFORM_CMAKE_FILE)
+ message (FATAL_ERROR "Platform specific CMake is not defined. Please set PLATFORM_CMAKE_FILE.")
+elseif(NOT EXISTS ${PLATFORM_CMAKE_FILE})
+ message (FATAL_ERROR "Platform specific CMake \"${PLATFORM_CMAKE_FILE}\" file does not exist. Please fix value of PLATFORM_CMAKE_FILE.")
+else()
+ include(${PLATFORM_CMAKE_FILE})
+endif()
+
#Append all our source files to global lists.
list(APPEND ALL_SRC_C "${MCUBOOT_DIR}/bl2_main.c"
@@ -94,7 +99,7 @@ embedded_include_directories(PATH ${TFM_ROOT_DIR}/bl2/ext/mcuboot/bootutil/inclu
embedded_include_directories(PATH ${MBEDTLS_INSTALL_DIR}/include ABSOLUTE APPEND)
#Define linker file
-embedded_set_target_linker_file(TARGET mcuboot PATH "${TFM_ROOT_DIR}/platform/ext/target/sse_200_mps2/sse_200/armclang/sse_200_bl2.sct")
+embedded_set_target_linker_file(TARGET mcuboot PATH "${TFM_ROOT_DIR}/platform/ext/target/mps2/an521/armclang/mps2_an521_bl2.sct")
add_executable(${PROJECT_NAME} ${MCUBOOT_SRC} ${ALL_SRC_ASM_BL2} ${ALL_SRC_C} ${ALL_SRC_CXX})
diff --git a/bl2/ext/mcuboot/scripts/assemble.py b/bl2/ext/mcuboot/scripts/assemble.py
index 15239644ed..c2c5d18589 100644
--- a/bl2/ext/mcuboot/scripts/assemble.py
+++ b/bl2/ext/mcuboot/scripts/assemble.py
@@ -1,7 +1,7 @@
#! /usr/bin/env python3
#
# Copyright 2017 Linaro Limited
-# Copyright (c) 2017, Arm Limited.
+# Copyright (c) 2017-2018, Arm Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -44,7 +44,7 @@ class Assembly():
sizes = {}
scriptsDir = os.path.dirname(os.path.abspath(__file__))
- path = '../../../../platform/ext/target/sse_200_mps2/sse_200/partition/flash_layout.h'
+ path = '../../../../platform/ext/target/mps2/an521/partition/flash_layout.h'
configFile = os.path.join(scriptsDir, path)
with open(configFile, 'r') as fd:
diff --git a/cmake/Common/BoardSSE200.cmake b/cmake/Common/BoardAN521.cmake
index e4135e5cca..e4135e5cca 100644
--- a/cmake/Common/BoardSSE200.cmake
+++ b/cmake/Common/BoardAN521.cmake
diff --git a/docs/user_guides/tfm_integration_guide.md b/docs/user_guides/tfm_integration_guide.md
index d5c74f96db..c26a639418 100644
--- a/docs/user_guides/tfm_integration_guide.md
+++ b/docs/user_guides/tfm_integration_guide.md
@@ -8,12 +8,15 @@ Follow the [Build instructions](tfm_build_instruction.md).
Explained in the [Build instructions](tfm_build_instruction.md).
## How to add a new platform
-The SSE-200 sybsystem on the MPS2 board is the hardware platform currently
-supported by TF-M. The files related to the platform being used are contained
-under the `platform` subfolder, in particular inside `platform/target`. The TF-M
-current implementation has the `platform/target/sse_200_mps2` platform, and
-a `platform/target/common` folder which is used to store source and header files
-which are platform generic.
+The Soft Macro Model (SMM) SSE-200 subsystem for MPS2 board (AN521) is the
+hardware platform currently supported by TF-M. The files related to the platform
+being used are contained under the `platform` subfolder, in particular inside
+`platform/target`. The TF-M current implementation has the
+`platform/target/mps2/an521` platform, and a `platform/target/common` folder
+which is used to store source and header files which are platform generic.
+More information about SMM-SSE-200 subsystem for MPS2 board (AN521) can be
+found in:
+[MPS2 homepage](https://developer.arm.com/products/system-design/development-boards/fpga-prototyping-boards/mps2)
#### generic drivers and startup/scatter files
The addition of a new platform means the creation of a new subfolder inside
@@ -25,7 +28,7 @@ board specific drivers which are used by the board platform to interact with the
external world, for example during tests, that have to be provided, e.g. to
blink LEDs or count time in the MPS2 board. When a new platform is added, the
files being built by the build systems need to be updated manually, as the
-platform folder being used is currently hardcoded to `sse_200_mps2`.
+platform folder being used is currently hardcoded to `mps2/an521`.
`Note: Currently SST and BL2 bootloader use different flash interface`
@@ -90,4 +93,4 @@ to be able to run the tests.
--------------
-*Copyright (c) 2017, Arm Limited. All rights reserved.*
+*Copyright (c) 2017-2018, Arm Limited. All rights reserved.*
diff --git a/platform/ext/Mps2AN521.cmake b/platform/ext/Mps2AN521.cmake
new file mode 100644
index 0000000000..dea5de879f
--- /dev/null
+++ b/platform/ext/Mps2AN521.cmake
@@ -0,0 +1,98 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2018, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+#This file gathers all MPS2/AN521 specific files in the application.
+
+set(PLATFORM_DIR ${CMAKE_CURRENT_LIST_DIR})
+
+embedded_include_directories(PATH "${PLATFORM_DIR}/cmsis" ABSOLUTE)
+embedded_include_directories(PATH "${PLATFORM_DIR}/target/mps2" ABSOLUTE)
+embedded_include_directories(PATH "${PLATFORM_DIR}/target/mps2/an521" ABSOLUTE)
+embedded_include_directories(PATH "${PLATFORM_DIR}/target/mps2/an521/cmsis_core" ABSOLUTE)
+embedded_include_directories(PATH "${PLATFORM_DIR}/target/mps2/an521/retarget" ABSOLUTE)
+embedded_include_directories(PATH "${PLATFORM_DIR}/target/mps2/an521/native_drivers" ABSOLUTE)
+embedded_include_directories(PATH "${PLATFORM_DIR}/target/mps2/an521/partition" ABSOLUTE)
+
+#Gather all source files we need.
+if (NOT DEFINED BUILD_CMSIS_CORE)
+ message(FATAL_ERROR "Configuration variable BUILD_CMSIS_CORE (true|false) is undefined!")
+elseif(BUILD_CMSIS_CORE)
+ list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/mps2/an521/cmsis_core/system_cmsdk_mps2_an521.c")
+endif()
+
+if (NOT DEFINED BUILD_RETARGET)
+ message(FATAL_ERROR "Configuration variable BUILD_RETARGET (true|false) is undefined!")
+elseif(BUILD_RETARGET)
+ list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/mps2/an521/retarget/platform_retarget_dev.c")
+endif()
+
+if (NOT DEFINED BUILD_UART_STDOUT)
+ message(FATAL_ERROR "Configuration variable BUILD_UART_STDOUT (true|false) is undefined!")
+elseif(BUILD_UART_STDOUT)
+ LIST(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/common/uart_stdout.c")
+ embedded_include_directories(PATH "${PLATFORM_DIR}/target/common" ABSOLUTE)
+ set(BUILD_NATIVE_DRIVERS true)
+ set(BUILD_CMSIS_DRIVERS true)
+endif()
+
+if (NOT DEFINED BUILD_NATIVE_DRIVERS)
+ message(FATAL_ERROR "Configuration variable BUILD_NATIVE_DRIVERS (true|false) is undefined!")
+elseif(BUILD_NATIVE_DRIVERS)
+ list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/mps2/an521/native_drivers/arm_uart_drv.c")
+
+ list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/target/mps2/an521/native_drivers/mpc_sie200_drv.c"
+ "${PLATFORM_DIR}/target/mps2/an521/native_drivers/ppc_sse200_drv.c"
+ )
+endif()
+
+if (NOT DEFINED BUILD_TIME)
+ message(FATAL_ERROR "Configuration variable BUILD_TIME (true|false) is undefined!")
+elseif(BUILD_TIME)
+ LIST(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/mps2/an521/native_drivers/timer_cmsdk/timer_cmsdk.c")
+ embedded_include_directories(PATH "${PLATFORM_DIR}/target/mps2/an521/native_drivers/timer_cmsdk" ABSOLUTE)
+endif()
+
+if (NOT DEFINED BUILD_STARTUP)
+ message(FATAL_ERROR "Configuration variable BUILD_STARTUP (true|false) is undefined!")
+elseif(BUILD_STARTUP)
+ if(CMAKE_C_COMPILER_ID STREQUAL "ARMCLANG")
+ list(APPEND ALL_SRC_ASM_S "${PLATFORM_DIR}/target/mps2/an521/armclang/startup_cmsdk_mps2_an521_s.s")
+ list(APPEND ALL_SRC_ASM_NS "${PLATFORM_DIR}/target/mps2/an521/armclang/startup_cmsdk_mps2_an521_ns.s")
+ list(APPEND ALL_SRC_ASM_BL2 "${PLATFORM_DIR}/target/mps2/an521/armclang/startup_cmsdk_mps2_an521_bl2.s")
+ else()
+ message(FATAL_ERROR "No startup file is available for compiler '${CMAKE_C_COMPILER_ID}'.")
+ endif()
+endif()
+
+if (NOT DEFINED BUILD_TARGET_CFG)
+ message(FATAL_ERROR "Configuration variable BUILD_TARGET_CFG (true|false) is undefined!")
+elseif(BUILD_TARGET_CFG)
+ list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/mps2/an521/target_cfg.c")
+endif()
+
+if (NOT DEFINED BUILD_TARGET_HARDWARE_KEYS)
+ message(FATAL_ERROR "Configuration variable BUILD_TARGET_HARDWARE_KEYS (true|false) is undefined!")
+elseif(BUILD_TARGET_HARDWARE_KEYS)
+ LIST(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/mps2/an521/dummy_crypto_keys.c")
+endif()
+
+if (NOT DEFINED BUILD_CMSIS_DRIVERS)
+ message(FATAL_ERROR "Configuration variable BUILD_CMSIS_DRIVERS (true|false) is undefined!")
+elseif(BUILD_CMSIS_DRIVERS)
+ LIST(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/target/mps2/an521/cmsis_drivers/Driver_MPC.c"
+ "${PLATFORM_DIR}/target/mps2/an521/cmsis_drivers/Driver_PPC.c")
+ LIST(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/mps2/an521/cmsis_drivers/Driver_USART.c")
+ embedded_include_directories(PATH "${PLATFORM_DIR}/target/mps2/an521/cmsis_drivers" ABSOLUTE)
+ embedded_include_directories(PATH "${PLATFORM_DIR}/driver" ABSOLUTE)
+endif()
+
+if (NOT DEFINED BUILD_FLASH)
+ message(FATAL_ERROR "Configuration variable BUILD_FLASH (true|false) is undefined!")
+elseif(BUILD_FLASH)
+ list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/common/flash_memory_mapped.c")
+ embedded_include_directories(PATH "${PLATFORM_DIR}/target/common" ABSOLUTE)
+endif()
diff --git a/platform/ext/Mps2SSE200.cmake b/platform/ext/Mps2SSE200.cmake
deleted file mode 100644
index 919a1ab094..0000000000
--- a/platform/ext/Mps2SSE200.cmake
+++ /dev/null
@@ -1,117 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2017, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-#This file gathers all MPS2/SSE2 specific files in the application.
-
-set(PLATFORM_DIR ${CMAKE_CURRENT_LIST_DIR})
-
-set(BOARD_ID "mps2")
-set(SUBYSTEM_ID "sse_200")
-
-embedded_include_directories(PATH "${PLATFORM_DIR}/cmsis" ABSOLUTE)
-embedded_include_directories(PATH "${PLATFORM_DIR}/driver" ABSOLUTE)
-embedded_include_directories(PATH "${PLATFORM_DIR}/target/sse_200_mps2" ABSOLUTE)
-embedded_include_directories(PATH "${PLATFORM_DIR}/target/sse_200_mps2/cmsis_core" ABSOLUTE)
-embedded_include_directories(PATH "${PLATFORM_DIR}/target/sse_200_mps2/mps2/specific_drivers" ABSOLUTE)
-embedded_include_directories(PATH "${PLATFORM_DIR}/target/sse_200_mps2/mps2/mps2_board" ABSOLUTE)
-embedded_include_directories(PATH "${PLATFORM_DIR}/target/sse_200_mps2/sse_200" ABSOLUTE)
-embedded_include_directories(PATH "${PLATFORM_DIR}/target/sse_200_mps2/sse_200/retarget" ABSOLUTE)
-embedded_include_directories(PATH "${PLATFORM_DIR}/target/sse_200_mps2/sse_200/native_drivers" ABSOLUTE)
-embedded_include_directories(PATH "${PLATFORM_DIR}/target/sse_200_mps2/sse_200/partition" ABSOLUTE)
-
-#Gather all source files we need.
-if (NOT DEFINED MPS2_SSE200_BUILD_CMSIS_CORE)
- message(FATAL_ERROR "Configuration variable MPS2_SSE200_BUILD_CMSIS_CORE (true|false) is undefined!")
-elseif(MPS2_SSE200_BUILD_CMSIS_CORE)
- list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/sse_200_mps2/cmsis_core/system_cmsdk_mps2_sse_200.c")
-endif()
-
-if (NOT DEFINED MPS2_SSE200_BUILD_RETARGET)
- message(FATAL_ERROR "Configuration variable MPS2_SSE200_BUILD_RETARGET (true|false) is undefined!")
-elseif(MPS2_SSE200_BUILD_RETARGET)
- list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/sse_200_mps2/sse_200/retarget/platform_retarget_dev.c")
-endif()
-
-if (NOT DEFINED MPS2_SSE200_BUILD_UART_STDOUT)
- message(FATAL_ERROR "Configuration variable MPS2_SSE200_BUILD_UART_STDOUT (true|false) is undefined!")
-elseif(MPS2_SSE200_BUILD_UART_STDOUT)
- LIST(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/common/uart_stdout.c")
- embedded_include_directories(PATH "${PLATFORM_DIR}/target/common" ABSOLUTE)
- set(MPS2_SSE200_BUILD_NATIVE_DRIVERS true)
- set(MPS2_SSE200_BUILD_CMSIS_DRIVERS true)
-endif()
-
-if (NOT DEFINED MPS2_SSE200_BUILD_NATIVE_DRIVERS)
- message(FATAL_ERROR "Configuration variable MPS2_SSE200_BUILD_NATIVE_DRIVERS (true|false) is undefined!")
-elseif(MPS2_SSE200_BUILD_NATIVE_DRIVERS)
- list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/sse_200_mps2/sse_200/native_drivers/arm_uart_drv.c")
-
- list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/target/sse_200_mps2/sse_200/native_drivers/mpc_sie200_drv.c"
- "${PLATFORM_DIR}/target/sse_200_mps2/sse_200/native_drivers/ppc_sse200_drv.c"
- )
-endif()
-
-if (NOT DEFINED MPS2_SSE200_BUILD_MPS2_TIME)
- message(FATAL_ERROR "Configuration variable MPS2_SSE200_BUILD_MPS2_TIME (true|false) is undefined!")
-elseif(MPS2_SSE200_BUILD_MPS2_TIME)
- LIST(APPEND ALL_SRC_C "${PLATFORM_DIR}//target/sse_200_mps2/sse_200/native_drivers/timer_cmsdk/timer_cmsdk.c")
- embedded_include_directories(PATH "${PLATFORM_DIR}//target/sse_200_mps2/sse_200/native_drivers/timer_cmsdk" ABSOLUTE)
-endif()
-
-if (NOT DEFINED MPS2_SSE200_BUILD_STARTUP)
- message(FATAL_ERROR "Configuration variable MPS2_SSE200_BUILD_STARTUP (true|false) is undefined!")
-elseif(MPS2_SSE200_BUILD_STARTUP)
- if(CMAKE_C_COMPILER_ID STREQUAL "ARMCLANG")
- list(APPEND ALL_SRC_ASM_S "${PLATFORM_DIR}/target/sse_200_mps2/sse_200/armclang/startup_cmsdk_sse_200_s.s")
- list(APPEND ALL_SRC_ASM_NS "${PLATFORM_DIR}/target/sse_200_mps2/sse_200/armclang/startup_cmsdk_sse_200_ns.s")
- list(APPEND ALL_SRC_ASM_BL2 "${PLATFORM_DIR}/target/sse_200_mps2/sse_200/armclang/startup_cmsdk_sse_200_bl2.s")
- else()
- message(FATAL_ERROR "No startup file is available for compiler '${CMAKE_C_COMPILER_ID}'.")
- endif()
-endif()
-
-if (NOT DEFINED MPS2_SSE200_BUILD_TARGET_CFG)
- message(FATAL_ERROR "Configuration variable MPS2_SSE200_BUILD_TARGET_CFG (true|false) is undefined!")
-elseif(MPS2_SSE200_BUILD_TARGET_CFG)
- list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/sse_200_mps2/target_cfg.c")
-endif()
-
-if (NOT DEFINED MPS2_SSE200_BUILD_TARGET_HARDWARE_KEYS)
- message(FATAL_ERROR "Configuration variable MPS2_SSE200_BUILD_TARGET_HARDWARE_KEYS (true|false) is undefined!")
-elseif(MPS2_SSE200_BUILD_TARGET_HARDWARE_KEYS)
- LIST(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/sse_200_mps2/dummy_crypto_keys.c")
-endif()
-
-if (NOT DEFINED MPS2_SSE200_BUILD_CMSIS_DRIVERS)
- message(FATAL_ERROR "Configuration variable MPS2_SSE200_BUILD_CMSIS_DRIVERS (true|false) is undefined!")
-elseif(MPS2_SSE200_BUILD_CMSIS_DRIVERS)
- LIST(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/target/sse_200_mps2/sse_200/cmsis_drivers/Driver_MPC.c"
- "${PLATFORM_DIR}/target/sse_200_mps2/sse_200/cmsis_drivers/Driver_PPC.c")
- LIST(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/sse_200_mps2/sse_200/cmsis_drivers/Driver_USART.c")
- embedded_include_directories(PATH "${PLATFORM_DIR}/target/sse_200_mps2/sse_200/cmsis_drivers" ABSOLUTE)
- embedded_include_directories(PATH "${PLATFORM_DIR}/driver" ABSOLUTE)
-endif()
-
-if (NOT DEFINED MPS2_SSE200_BUILD_MPS2_BOARD_LEDS)
- message(FATAL_ERROR "Configuration variable MPS2_SSE200_BUILD_MPS2_BOARD_LEDS (true|false) is undefined!")
-elseif(MPS2_SSE200_BUILD_MPS2_BOARD_LEDS)
- LIST(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/sse_200_mps2/mps2/mps2_board/mps2_leds.c")
- embedded_include_directories(PATH "${PLATFORM_DIR}/target/sse_200_mps2/mps2/mps2_board" ABSOLUTE)
-endif()
-
-if (NOT DEFINED MPS2_SSE200_BUILD_MPS2_BOARD_TIME)
- message(FATAL_ERROR "Configuration variable MPS2_SSE200_BUILD_MPS2_BOARD_TIME (true|false) is undefined!")
-elseif(MPS2_SSE200_BUILD_MPS2_BOARD_TIME)
- LIST(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/sse_200_mps2/mps2/mps2_board/mps2_time.c")
- embedded_include_directories(PATH "${PLATFORM_DIR}/target/sse_200_mps2/mps2/mps2_board" ABSOLUTE)
-endif()
-
-if (NOT DEFINED MPS2_SSE200_BUILD_MPS2_BOARD_FLASH)
- message(FATAL_ERROR "Configuration variable MPS2_SSE200_BUILD_MPS2_BOARD_FLASH (true|false) is undefined!")
-elseif(MPS2_SSE200_BUILD_MPS2_BOARD_FLASH)
- list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/sse_200_mps2/mps2/mps2_board/mps2_flash.c")
-endif()
diff --git a/platform/ext/target/sse_200_mps2/mps2/mps2_board/mps2_flash.c b/platform/ext/target/common/flash_memory_mapped.c
index 6d38f05e3c..6d38f05e3c 100644
--- a/platform/ext/target/sse_200_mps2/mps2/mps2_board/mps2_flash.c
+++ b/platform/ext/target/common/flash_memory_mapped.c
diff --git a/platform/ext/target/sse_200_mps2/sse_200/RTE_Device.h b/platform/ext/target/mps2/an521/RTE_Device.h
index 723a5cdfd4..860a49feab 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/RTE_Device.h
+++ b/platform/ext/target/mps2/an521/RTE_Device.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2017 ARM Limited
+ * Copyright (c) 2016-2018 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,47 +21,47 @@
// <e> SPI (Serial Peripheral Interface) [Driver_SPI0]
// <i> Configuration settings for Driver_SPI0 in component ::Drivers:SPI
-#define RTE_SPI0 1
+#define RTE_SPI0 0
// </e> SPI (Serial Peripheral Interface) [Driver_SPI0]
// <e> SPI (Serial Peripheral Interface) [Driver_SPI1]
// <i> Configuration settings for Driver_SPI1 in component ::Drivers:SPI
-#define RTE_SPI1 1
+#define RTE_SPI1 0
// </e> SPI (Serial Peripheral Interface) [Driver_SPI1]
// <e> SPI (Serial Peripheral Interface) [Driver_SPI2]
// <i> Configuration settings for Driver_SPI2 in component ::Drivers:SPI
-#define RTE_SPI2 1
+#define RTE_SPI2 0
// </e> SPI (Serial Peripheral Interface) [Driver_SPI2]
// <e> SPI (Serial Peripheral Interface) [Driver_SPI3]
// <i> Configuration settings for Driver_SPI3 in component ::Drivers:SPI
-#define RTE_SPI3 1
+#define RTE_SPI3 0
// </e> SPI (Serial Peripheral Interface) [Driver_SPI3]
// <e> SPI (Serial Peripheral Interface) [Driver_SPI4]
// <i> Configuration settings for Driver_SPI4 in component ::Drivers:SPI
-#define RTE_SPI4 1
+#define RTE_SPI4 0
// </e> SPI (Serial Peripheral Interface) [Driver_SPI4]
// <e> I2C (Inter-integrated Circuit Interface 2) [Driver_I2C0]
// <i> Configuration settings for Driver_I2C0 in component ::Drivers:I2C
-#define RTE_I2C0 1
+#define RTE_I2C0 0
// </e> I2C (Inter-integrated Circuit Interface 2) [Driver_I2C0]
// <e> I2C (Inter-integrated Circuit Interface 2) [Driver_I2C1]
// <i> Configuration settings for Driver_I2C1 in component ::Drivers:I2C
-#define RTE_I2C1 1
+#define RTE_I2C1 0
// </e> I2C (Inter-integrated Circuit Interface 2) [Driver_I2C1]
// <e> I2C (Inter-integrated Circuit Interface 2) [Driver_I2C2]
// <i> Configuration settings for Driver_I2C2 in component ::Drivers:I2C
-#define RTE_I2C2 1
+#define RTE_I2C2 0
// </e> I2C (Inter-integrated Circuit Interface 2) [Driver_I2C2]
// <e> I2C (Inter-integrated Circuit Interface 2) [Driver_I2C3]
// <i> Configuration settings for Driver_I2C3 in component ::Drivers:I2C
-#define RTE_I2C3 1
+#define RTE_I2C3 0
// </e> I2C (Inter-integrated Circuit Interface 2) [Driver_I2C3]
// <e> USART (Universal synchronous - asynchronous receiver transmitter) [Driver_USART0]
@@ -76,37 +76,37 @@
// <e> USART (Universal synchronous - asynchronous receiver transmitter) [Driver_USART2]
// <i> Configuration settings for Driver_USART2 in component ::Drivers:USART
-#define RTE_USART2 1
+#define RTE_USART2 0
// </e> USART (Universal synchronous - asynchronous receiver transmitter) [Driver_USART2]
// <e> USART (Universal synchronous - asynchronous receiver transmitter) [Driver_USART3]
// <i> Configuration settings for Driver_USART3 in component ::Drivers:USART
-#define RTE_USART3 1
+#define RTE_USART3 0
// </e> USART (Universal synchronous - asynchronous receiver transmitter) [Driver_USART3]
// <e> USART (Universal synchronous - asynchronous receiver transmitter) [Driver_USART4]
// <i> Configuration settings for Driver_USART4 in component ::Drivers:USART
-#define RTE_USART4 1
+#define RTE_USART4 0
// </e> USART (Universal synchronous - asynchronous receiver transmitter) [Driver_USART4]
// <e> MPC (Memory Protection Controller) [Driver_ISRAM0_MPC]
// <i> Configuration settings for Driver_ISRAM0_MPC in component ::Drivers:MPC
-#define RTE_ISRAM0_MPC 1
+#define RTE_ISRAM0_MPC 0
// </e> MPC (Memory Protection Controller) [Driver_ISRAM0_MPC]
// <e> MPC (Memory Protection Controller) [Driver_ISRAM1_MPC]
// <i> Configuration settings for Driver_ISRAM1_MPC in component ::Drivers:MPC
-#define RTE_ISRAM1_MPC 1
+#define RTE_ISRAM1_MPC 0
// </e> MPC (Memory Protection Controller) [Driver_ISRAM1_MPC]
// <e> MPC (Memory Protection Controller) [Driver_ISRAM2_MPC]
// <i> Configuration settings for Driver_ISRAM2_MPC in component ::Drivers:MPC
-#define RTE_ISRAM2_MPC 1
+#define RTE_ISRAM2_MPC 0
// </e> MPC (Memory Protection Controller) [Driver_ISRAM2_MPC]
// <e> MPC (Memory Protection Controller) [Driver_ISRAM3_MPC]
// <i> Configuration settings for Driver_ISRAM3_MPC in component ::Drivers:MPC
-#define RTE_ISRAM3_MPC 1
+#define RTE_ISRAM3_MPC 0
// </e> MPC (Memory Protection Controller) [Driver_ISRAM3_MPC]
// <e> MPC (Memory Protection Controller) [Driver_SRAM1_MPC]
@@ -121,12 +121,12 @@
// <e> MPC (Memory Protection Controller) [Driver_SRAM3_MPC]
// <i> Configuration settings for Driver_SRAM3_MPC in component ::Drivers:MPC
-#define RTE_CODE_SRAM3_MPC 1
+#define RTE_CODE_SRAM3_MPC 0
// </e> MPC (Memory Protection Controller) [Driver_SRAM3_MPC]
// <e> PPC (Peripheral Protection Controller) [Driver_AHB_PPCEXP0]
// <i> Configuration settings for Driver_AHB_PPCEXP0 in component ::Drivers:MPC
-#define RTE_AHB_PPCEXP0 1
+#define RTE_AHB_PPCEXP0 0
// </e> PPC (Peripheral Protection Controller) [Driver_AHB_PPCEXP0]
// <e> PPC (Peripheral Protection Controller) [Driver_AHB_PPCEXP1]
@@ -146,22 +146,22 @@
// <e> PPC (Peripheral Protection Controller) [Driver_APB_PPC0]
// <i> Configuration settings for Driver_APB_PPC0 in component ::Drivers:MPC
-#define RTE_APB_PPC0 1
+#define RTE_APB_PPC0 0
// </e> PPC (Peripheral Protection Controller) [Driver_APB_PPC0]
// <e> PPC (Peripheral Protection Controller) [Driver_APB_PPC1]
// <i> Configuration settings for Driver_APB_PPC1 in component ::Drivers:MPC
-#define RTE_APB_PPC1 1
+#define RTE_APB_PPC1 0
// </e> PPC (Peripheral Protection Controller) [Driver_APB_PPC1]
// <e> PPC (Peripheral Protection Controller) [Driver_APB_PPCEXP0]
// <i> Configuration settings for Driver_APB_PPCEXP0 in component ::Drivers:MPC
-#define RTE_APB_PPCEXP0 1
+#define RTE_APB_PPCEXP0 0
// </e> PPC (Peripheral Protection Controller) [Driver_APB_PPCEXP0]
// <e> PPC (Peripheral Protection Controller) [Driver_APB_PPCEXP1]
// <i> Configuration settings for Driver_APB_PPCEXP1 in component ::Drivers:MPC
-#define RTE_APB_PPCEXP1 1
+#define RTE_APB_PPCEXP1 0
// </e> PPC (Peripheral Protection Controller) [Driver_APB_PPCEXP1]
// <e> PPC (Peripheral Protection Controller) [Driver_APB_PPCEXP2]
@@ -171,7 +171,7 @@
// <e> PPC (Peripheral Protection Controller) [Driver_APB_PPCEXP3]
// <i> Configuration settings for Driver_APB_PPCEXP3 in component ::Drivers:MPC
-#define RTE_APB_PPCEXP3 1
+#define RTE_APB_PPCEXP3 0
// </e> PPC (Peripheral Protection Controller) [Driver_APB_PPCEXP3]
#endif /* __RTE_DEVICE_H */
diff --git a/platform/ext/target/sse_200_mps2/sse_200/armclang/sse_200_bl2.sct b/platform/ext/target/mps2/an521/armclang/mps2_an521_bl2.sct
index a8ce7d9ea0..a8ce7d9ea0 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/armclang/sse_200_bl2.sct
+++ b/platform/ext/target/mps2/an521/armclang/mps2_an521_bl2.sct
diff --git a/platform/ext/target/sse_200_mps2/sse_200/armclang/sse_200_ns.sct b/platform/ext/target/mps2/an521/armclang/mps2_an521_ns.sct
index 302945ffa0..302945ffa0 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/armclang/sse_200_ns.sct
+++ b/platform/ext/target/mps2/an521/armclang/mps2_an521_ns.sct
diff --git a/platform/ext/target/sse_200_mps2/sse_200/armclang/sse_200_s.sct b/platform/ext/target/mps2/an521/armclang/mps2_an521_s.sct
index 46c7ee8362..46c7ee8362 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/armclang/sse_200_s.sct
+++ b/platform/ext/target/mps2/an521/armclang/mps2_an521_s.sct
diff --git a/platform/ext/target/sse_200_mps2/sse_200/armclang/startup_cmsdk_sse_200_bl2.s b/platform/ext/target/mps2/an521/armclang/startup_cmsdk_mps2_an521_bl2.s
index 250a02d5f5..250a02d5f5 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/armclang/startup_cmsdk_sse_200_bl2.s
+++ b/platform/ext/target/mps2/an521/armclang/startup_cmsdk_mps2_an521_bl2.s
diff --git a/platform/ext/target/sse_200_mps2/sse_200/armclang/startup_cmsdk_sse_200_ns.s b/platform/ext/target/mps2/an521/armclang/startup_cmsdk_mps2_an521_ns.s
index 188188dddc..188188dddc 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/armclang/startup_cmsdk_sse_200_ns.s
+++ b/platform/ext/target/mps2/an521/armclang/startup_cmsdk_mps2_an521_ns.s
diff --git a/platform/ext/target/sse_200_mps2/sse_200/armclang/startup_cmsdk_sse_200_s.s b/platform/ext/target/mps2/an521/armclang/startup_cmsdk_mps2_an521_s.s
index 40d23474fb..40d23474fb 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/armclang/startup_cmsdk_sse_200_s.s
+++ b/platform/ext/target/mps2/an521/armclang/startup_cmsdk_mps2_an521_s.s
diff --git a/platform/ext/target/sse_200_mps2/cmsis_core/cmsis.h b/platform/ext/target/mps2/an521/cmsis_core/cmsis.h
index f5dfea483c..8c82e5a472 100644
--- a/platform/ext/target/sse_200_mps2/cmsis_core/cmsis.h
+++ b/platform/ext/target/mps2/an521/cmsis_core/cmsis.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited
+ * Copyright (c) 2017-2018 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-#ifndef __MPS2_SSE_200_CMSIS_H__
-#define __MPS2_SSE_200_CMSIS_H__
+#ifndef __MPS2_AN521_CMSIS_H__
+#define __MPS2_AN521_CMSIS_H__
-/* Corelink SSE 200 Core for MPS2 */
-#include "mps2_sse_200.h"
+/* SMM-SSE-200 for for MPS2+ */
+#include "mps2_an521.h"
-#endif /*__MPS2_SSE_200_CMSIS_H__ */
+#endif /*__MPS2_AN521_CMSIS_H__ */
diff --git a/platform/ext/target/sse_200_mps2/cmsis_core/mps2_sse_200.h b/platform/ext/target/mps2/an521/cmsis_core/mps2_an521.h
index 771fb95d72..ee6581b9a6 100644
--- a/platform/ext/target/sse_200_mps2/cmsis_core/mps2_sse_200.h
+++ b/platform/ext/target/mps2/an521/cmsis_core/mps2_an521.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2017 ARM Limited
+ * Copyright (c) 2016-2018 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef __MPS2_SSE_200_H__
-#define __MPS2_SSE_200_H__
+#ifndef __MPS2_AN521_H__
+#define __MPS2_AN521_H__
#include "platform_irq.h" /* Platform IRQ numbers */
@@ -30,9 +30,9 @@
#define __DSP_PRESENT 0U /* no DSP extension present */
#include <core_cm33.h> /* Processor and core peripherals */
-#include "system_cmsdk_mps2_sse_200.h" /* System Header */
+#include "system_cmsdk_mps2_an521.h" /* System Header */
#include "platform_regs.h" /* Platform registers */
#include "platform_retarget.h" /* Peripherals base addresses */
-#endif /* __MPS2_SSE_200_H__ */
+#endif /* __MPS2_AN521_H__ */
diff --git a/platform/ext/target/sse_200_mps2/cmsis_core/platform_irq.h b/platform/ext/target/mps2/an521/cmsis_core/platform_irq.h
index 640f9fa24b..a27571499a 100644
--- a/platform/ext/target/sse_200_mps2/cmsis_core/platform_irq.h
+++ b/platform/ext/target/mps2/an521/cmsis_core/platform_irq.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2017 ARM Limited
+ * Copyright (c) 2016-2018 ARM Limited
*
* Licensed under the Apache License Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef __ARM_LTD_SSE_200_IRQN_H__
-#define __ARM_LTD_SSE_200_IRQN_H__
+#ifndef __ARM_LTD_AN521_IRQN_H__
+#define __ARM_LTD_AN521_IRQN_H__
typedef enum _IRQn_Type {
NonMaskableInt_IRQn = -14, /* Non Maskable Interrupt */
@@ -153,4 +153,4 @@ typedef enum _IRQn_Type {
GPIO3_3_IRQn = 123,
}IRQn_Type;
-#endif /* __ARM_LTD_SSE_200_IRQN_H__ */
+#endif /* __ARM_LTD_AN521_IRQN_H__ */
diff --git a/platform/ext/target/sse_200_mps2/cmsis_core/platform_regs.h b/platform/ext/target/mps2/an521/cmsis_core/platform_regs.h
index 0a965507e6..3d9b3f723e 100644
--- a/platform/ext/target/sse_200_mps2/cmsis_core/platform_regs.h
+++ b/platform/ext/target/mps2/an521/cmsis_core/platform_regs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2017 ARM Limited
+ * Copyright (c) 2016-2018 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef __ARM_LTD_SSE_200_REGS_H__
-#define __ARM_LTD_SSE_200_REGS_H__
+#ifndef __ARM_LTD_AN521_REGS_H__
+#define __ARM_LTD_AN521_REGS_H__
#include <stdint.h>
@@ -332,4 +332,4 @@ struct nspctrl_def {
/* End of ARM AHB PPCEXP3 peripherals definition */
-#endif /* __ARM_LTD_SSE_200_REGS_H__ */
+#endif /* __ARM_LTD_AN521_REGS_H__ */
diff --git a/platform/ext/target/sse_200_mps2/cmsis_core/system_cmsdk_mps2_sse_200.c b/platform/ext/target/mps2/an521/cmsis_core/system_cmsdk_mps2_an521.c
index c815daad1b..c4d42fc8c9 100644
--- a/platform/ext/target/sse_200_mps2/cmsis_core/system_cmsdk_mps2_sse_200.c
+++ b/platform/ext/target/mps2/an521/cmsis_core/system_cmsdk_mps2_an521.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2017 ARM Limited
+ * Copyright (c) 2016-2018 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
#include "cmsis.h"
/*
- * MPS2 SSE-200 has different frequencies for system core clock (20MHz) and
+ * MPS2 AN521 has different frequencies for system core clock (20MHz) and
* peripherals clock (25MHz).
*/
#define XTAL (40000000UL)
diff --git a/platform/ext/target/sse_200_mps2/cmsis_core/system_cmsdk_mps2_sse_200.h b/platform/ext/target/mps2/an521/cmsis_core/system_cmsdk_mps2_an521.h
index bcdb1edcec..0bd1727f6c 100644
--- a/platform/ext/target/sse_200_mps2/cmsis_core/system_cmsdk_mps2_sse_200.h
+++ b/platform/ext/target/mps2/an521/cmsis_core/system_cmsdk_mps2_an521.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2017 ARM Limited
+ * Copyright (c) 2016-2018 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef __SYSTEM_CMSDK_MPS2_SSE_200_H__
-#define __SYSTEM_CMSDK_MPS2_SSE_200_H__
+#ifndef __SYSTEM_CMSDK_MPS2_AN521_H__
+#define __SYSTEM_CMSDK_MPS2_AN521_H__
#include <stdint.h>
@@ -40,4 +40,4 @@ void SystemCoreClockUpdate(void);
}
#endif
-#endif /* __SYSTEM_CMSDK_MPS2_SSE_200_H__ */
+#endif /* __SYSTEM_CMSDK_MPS2_AN521_H__ */
diff --git a/platform/ext/target/sse_200_mps2/sse_200/cmsis_drivers/Driver_MPC.c b/platform/ext/target/mps2/an521/cmsis_drivers/Driver_MPC.c
index b0e62dddd3..b0e62dddd3 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/cmsis_drivers/Driver_MPC.c
+++ b/platform/ext/target/mps2/an521/cmsis_drivers/Driver_MPC.c
diff --git a/platform/ext/target/sse_200_mps2/sse_200/cmsis_drivers/Driver_PPC.c b/platform/ext/target/mps2/an521/cmsis_drivers/Driver_PPC.c
index 9787d05b1a..9787d05b1a 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/cmsis_drivers/Driver_PPC.c
+++ b/platform/ext/target/mps2/an521/cmsis_drivers/Driver_PPC.c
diff --git a/platform/ext/target/sse_200_mps2/sse_200/cmsis_drivers/Driver_USART.c b/platform/ext/target/mps2/an521/cmsis_drivers/Driver_USART.c
index 489708ee4b..489708ee4b 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/cmsis_drivers/Driver_USART.c
+++ b/platform/ext/target/mps2/an521/cmsis_drivers/Driver_USART.c
diff --git a/platform/ext/target/sse_200_mps2/sse_200/device_cfg.h b/platform/ext/target/mps2/an521/device_cfg.h
index 62f19a0b95..d4b68bdf47 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/device_cfg.h
+++ b/platform/ext/target/mps2/an521/device_cfg.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2017 ARM Limited
+ * Copyright (c) 2016-2018 ARM Limited
*
* Licensed under the Apache License Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,22 +27,11 @@
*/
/* ARM Memory Protection Controller (MPC) */
-#define MPC_ISRAM0_S
-#define MPC_ISRAM1_S
-#define MPC_ISRAM2_S
-#define MPC_ISRAM3_S
#define MPC_CODE_SRAM1_S
#define MPC_CODE_SRAM2_S
-#define MPC_CODE_SRAM3_S
/* ARM Peripheral Protection Controllers (PPC) */
-#define AHB_PPCEXP0_S
-#define APB_PPC0_S
-#define APB_PPC1_S
-#define APB_PPCEXP0_S
-#define APB_PPCEXP1_S
#define APB_PPCEXP2_S
-#define APB_PPCEXP3_S
/* ARM UART */
#define DEFAULT_UART_BAUDRATE 9600
@@ -50,12 +39,6 @@
#define ARM_UART0_NS
#define ARM_UART1_S
#define ARM_UART1_NS
-#define ARM_UART2_S
-#define ARM_UART2_NS
-#define ARM_UART3_S
-#define ARM_UART3_NS
-#define ARM_UART4_S
-#define ARM_UART4_NS
/* CMSDK Timers */
#define CMSDK_TIMER0_S
diff --git a/platform/ext/target/sse_200_mps2/dummy_crypto_keys.c b/platform/ext/target/mps2/an521/dummy_crypto_keys.c
index 05a3fca617..80a8f28d58 100644
--- a/platform/ext/target/sse_200_mps2/dummy_crypto_keys.c
+++ b/platform/ext/target/mps2/an521/dummy_crypto_keys.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited
+ * Copyright (c) 2017-2018 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
#define TFM_KEY_LEN_BYTES 16
static uint8_t sample_tfm_key[TFM_KEY_LEN_BYTES] =
- {0x00, 0x001, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, \
+ {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, \
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F};
enum tfm_plat_errno_t plat_get_crypto_huk(uint8_t* key, uint32_t size)
diff --git a/platform/ext/target/sse_200_mps2/sse_200/native_drivers/arm_uart_drv.c b/platform/ext/target/mps2/an521/native_drivers/arm_uart_drv.c
index d61ae483ac..d61ae483ac 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/native_drivers/arm_uart_drv.c
+++ b/platform/ext/target/mps2/an521/native_drivers/arm_uart_drv.c
diff --git a/platform/ext/target/sse_200_mps2/sse_200/native_drivers/arm_uart_drv.h b/platform/ext/target/mps2/an521/native_drivers/arm_uart_drv.h
index 64d82000d7..64d82000d7 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/native_drivers/arm_uart_drv.h
+++ b/platform/ext/target/mps2/an521/native_drivers/arm_uart_drv.h
diff --git a/platform/ext/target/sse_200_mps2/sse_200/native_drivers/mpc_sie200_drv.c b/platform/ext/target/mps2/an521/native_drivers/mpc_sie200_drv.c
index e842681cd6..e842681cd6 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/native_drivers/mpc_sie200_drv.c
+++ b/platform/ext/target/mps2/an521/native_drivers/mpc_sie200_drv.c
diff --git a/platform/ext/target/sse_200_mps2/sse_200/native_drivers/mpc_sie200_drv.h b/platform/ext/target/mps2/an521/native_drivers/mpc_sie200_drv.h
index 02bd1d9198..02bd1d9198 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/native_drivers/mpc_sie200_drv.h
+++ b/platform/ext/target/mps2/an521/native_drivers/mpc_sie200_drv.h
diff --git a/platform/ext/target/sse_200_mps2/sse_200/native_drivers/ppc_sse200_drv.c b/platform/ext/target/mps2/an521/native_drivers/ppc_sse200_drv.c
index 8db96e24a6..8db96e24a6 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/native_drivers/ppc_sse200_drv.c
+++ b/platform/ext/target/mps2/an521/native_drivers/ppc_sse200_drv.c
diff --git a/platform/ext/target/sse_200_mps2/sse_200/native_drivers/ppc_sse200_drv.h b/platform/ext/target/mps2/an521/native_drivers/ppc_sse200_drv.h
index c09650bac5..c09650bac5 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/native_drivers/ppc_sse200_drv.h
+++ b/platform/ext/target/mps2/an521/native_drivers/ppc_sse200_drv.h
diff --git a/platform/ext/target/sse_200_mps2/sse_200/native_drivers/timer_cmsdk/timer_cmsdk.c b/platform/ext/target/mps2/an521/native_drivers/timer_cmsdk/timer_cmsdk.c
index 1037f2da04..1037f2da04 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/native_drivers/timer_cmsdk/timer_cmsdk.c
+++ b/platform/ext/target/mps2/an521/native_drivers/timer_cmsdk/timer_cmsdk.c
diff --git a/platform/ext/target/sse_200_mps2/sse_200/native_drivers/timer_cmsdk/timer_cmsdk.h b/platform/ext/target/mps2/an521/native_drivers/timer_cmsdk/timer_cmsdk.h
index 52d9d5c986..52d9d5c986 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/native_drivers/timer_cmsdk/timer_cmsdk.h
+++ b/platform/ext/target/mps2/an521/native_drivers/timer_cmsdk/timer_cmsdk.h
diff --git a/platform/ext/target/sse_200_mps2/sse_200/partition/flash_layout.h b/platform/ext/target/mps2/an521/partition/flash_layout.h
index a0cc0d025d..a0cc0d025d 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/partition/flash_layout.h
+++ b/platform/ext/target/mps2/an521/partition/flash_layout.h
diff --git a/platform/ext/target/sse_200_mps2/sse_200/partition/region_defs.h b/platform/ext/target/mps2/an521/partition/region_defs.h
index 6123e6fda7..6123e6fda7 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/partition/region_defs.h
+++ b/platform/ext/target/mps2/an521/partition/region_defs.h
diff --git a/platform/ext/target/sse_200_mps2/sse_200/retarget/platform_retarget.h b/platform/ext/target/mps2/an521/retarget/platform_retarget.h
index c0141cba50..f62d50779f 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/retarget/platform_retarget.h
+++ b/platform/ext/target/mps2/an521/retarget/platform_retarget.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2017 ARM Limited
+ * Copyright (c) 2016-2018 ARM Limited
*
* Licensed under the Apache License Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,8 +19,8 @@
* \brief This file defines all the peripheral base addresses for MPS2/SSE-200 platform.
*/
-#ifndef __ARM_LTD_SSE_200_RETARGET_H__
-#define __ARM_LTD_SSE_200_RETARGET_H__
+#ifndef __ARM_LTD_AN521_RETARGET_H__
+#define __ARM_LTD_AN521_RETARGET_H__
#include "platform_regs.h" /* Platform registers */
#include "platform_irq.h" /* IRQ numbers */
@@ -132,4 +132,4 @@
#define MPC_CODE_SRAM3_RANGE_BASE_S 0x38200000
#define MPC_CODE_SRAM3_RANGE_LIMIT_S 0x383FFFFF
-#endif /* __ARM_LTD_SSE_200_RETARGET_H__ */
+#endif /* __ARM_LTD_AN521_RETARGET_H__ */
diff --git a/platform/ext/target/sse_200_mps2/sse_200/retarget/platform_retarget_dev.c b/platform/ext/target/mps2/an521/retarget/platform_retarget_dev.c
index e7033c28e0..a7c70da250 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/retarget/platform_retarget_dev.c
+++ b/platform/ext/target/mps2/an521/retarget/platform_retarget_dev.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2017 ARM Limited
+ * Copyright (c) 2016-2018 ARM Limited
*
* Licensed under the Apache License Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,8 +25,7 @@
#include "platform_retarget_dev.h"
#include "platform_retarget.h"
-#include "system_cmsdk_mps2_sse_200.h"
-#include "mps2_time.h" /* Import mps2_sleepus function */
+#include "system_cmsdk_mps2_an521.h"
/* ARM UART driver structures */
#ifdef ARM_UART0_S
diff --git a/platform/ext/target/sse_200_mps2/sse_200/retarget/platform_retarget_dev.h b/platform/ext/target/mps2/an521/retarget/platform_retarget_dev.h
index 8837558083..772a5af371 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/retarget/platform_retarget_dev.h
+++ b/platform/ext/target/mps2/an521/retarget/platform_retarget_dev.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2017 ARM Limited
+ * Copyright (c) 2016-2018 ARM Limited
*
* Licensed under the Apache License Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,8 +23,8 @@
* driver structures.
*/
-#ifndef __ARM_LTD_SSE_200_RETARGET_DEV_H__
-#define __ARM_LTD_SSE_200_RETARGET_DEV_H__
+#ifndef __ARM_LTD_AN521_RETARGET_DEV_H__
+#define __ARM_LTD_AN521_RETARGET_DEV_H__
#include "device_cfg.h"
@@ -160,4 +160,4 @@ extern struct mpc_sie200_dev_t MPC_CODE_SRAM2_DEV_S;
extern struct mpc_sie200_dev_t MPC_CODE_SRAM3_DEV_S;
#endif
-#endif /* __ARM_LTD_SSE_200_RETARGET_DEV_H__ */
+#endif /* __ARM_LTD_AN521_RETARGET_DEV_H__ */
diff --git a/platform/ext/target/sse_200_mps2/sse_200/retarget/platform_retarget_pins.h b/platform/ext/target/mps2/an521/retarget/platform_retarget_pins.h
index 6664877d34..d2b7e438aa 100644
--- a/platform/ext/target/sse_200_mps2/sse_200/retarget/platform_retarget_pins.h
+++ b/platform/ext/target/mps2/an521/retarget/platform_retarget_pins.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2017 ARM Limited
+ * Copyright (c) 2016-2018 ARM Limited
*
* Licensed under the Apache License Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,8 +19,8 @@
* \brief This file defines all the pins for this platform.
*/
-#ifndef __ARM_LTD_SSE_200_RETARGET_PINS_H__
-#define __ARM_LTD_SSE_200_RETARGET_PINS_H__
+#ifndef __ARM_LTD_AN521_RETARGET_PINS_H__
+#define __ARM_LTD_AN521_RETARGET_PINS_H__
/* AHB GPIO pin names */
enum arm_gpio_pin_name_t {
@@ -135,4 +135,4 @@ enum arm_gpio_pin_name_t {
#define BT_UART_TX AHB_GPIO1_8
#define BT_BOOT AHB_GPIO1_9
-#endif /* __ARM_LTD_SSE_200_RETARGET_PINS_H__ */
+#endif /* __ARM_LTD_AN521_RETARGET_PINS_H__ */
diff --git a/platform/ext/target/sse_200_mps2/target_cfg.c b/platform/ext/target/mps2/an521/target_cfg.c
index 65904d6231..65904d6231 100644
--- a/platform/ext/target/sse_200_mps2/target_cfg.c
+++ b/platform/ext/target/mps2/an521/target_cfg.c
diff --git a/platform/ext/target/sse_200_mps2/target_cfg.h b/platform/ext/target/mps2/an521/target_cfg.h
index e41f7a2525..e41f7a2525 100644
--- a/platform/ext/target/sse_200_mps2/target_cfg.h
+++ b/platform/ext/target/mps2/an521/target_cfg.h
diff --git a/platform/ext/target/sse_200_mps2/mps2/mps2_board/smm_mps2.h b/platform/ext/target/mps2/smm_mps2.h
index 8570c2a897..fb907fefa7 100644
--- a/platform/ext/target/sse_200_mps2/mps2/mps2_board/smm_mps2.h
+++ b/platform/ext/target/mps2/smm_mps2.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 ARM Limited
+ * Copyright (c) 2016-2018 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -157,20 +157,12 @@ struct arm_mps2_scc_t {
* revision number */
};
-/* Peripheral memory map */
-#define MPS2_FPGAIO_BASE_NS 0x40302000 /* FPGAIO Base Address */
-#define MPS2_SCC_BASE_NS 0x40300000 /* SCC Base Address */
-
-/* Secure Peripheral memory map */
-#define MPS2_FPGAIO_BASE_S 0x50302000 /* FPGAIO Base Address */
-#define MPS2_SCC_BASE_S 0x50300000 /* SCC Base Address */
-
/* Peripheral declaration */
-#define MPS2_FPGAIO ((struct arm_mps2_fpgaio_t*) MPS2_FPGAIO_BASE_NS)
-#define MPS2_SCC ((struct arm_mps2_scc_t*) MPS2_SCC_BASE_NS)
+#define MPS2_FPGAIO ((struct arm_mps2_fpgaio_t*) MPS2_IO_FPGAIO_BASE_NS)
+#define MPS2_SCC ((struct arm_mps2_scc_t*) MPS2_IO_SCC_BASE_NS)
/* Secure Peripheral declaration */
-#define SEC_MPS2_FPGAIO ((struct arm_mps2_fpgaio_t*) MPS2_FPGAIO_BASE_S)
-#define SEC_MPS2_SCC ((struct arm_mps2_scc_t*) MPS2_SCC_BASE_S)
+#define SEC_MPS2_FPGAIO ((struct arm_mps2_fpgaio_t*) MPS2_IO_FPGAIO_BASE_S)
+#define SEC_MPS2_SCC ((struct arm_mps2_scc_t*) MPS2_IO_SCC_BASE_S)
#endif /* __SMM_MPS2_H__ */
diff --git a/platform/ext/target/sse_200_mps2/mps2/mps2_board/mps2_leds.c b/platform/ext/target/sse_200_mps2/mps2/mps2_board/mps2_leds.c
deleted file mode 100644
index b86dfb2f6e..0000000000
--- a/platform/ext/target/sse_200_mps2/mps2/mps2_board/mps2_leds.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2016 ARM Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "mps2_leds.h"
-#include "smm_mps2.h"
-
-#define MPS2_FPGAIO_NBR_LEDS 2U /* Number of available MPS2 FPGAIO LEDs */
-#define MPS2_SCC_NBR_LEDS 8U /* Number of available MPS2 SCC LEDs */
-
-uint32_t mps2_get_nbr_leds(enum mps2_led_t led_type)
-{
- switch(led_type) {
- case MPS2_FPGAIO_LED:
- return MPS2_FPGAIO_NBR_LEDS;
- case MPS2_SCC_LED:
- return MPS2_SCC_NBR_LEDS;
- /* default: The default is not defined intentionally to force the
- * compiler to check that all enumeration values are
- * covered in the switch.*/
- }
-}
-
-void mps2_set_leds(enum mps2_led_t led_type, uint32_t leds_val)
-{
- switch(led_type) {
- case MPS2_FPGAIO_LED:
- MPS2_FPGAIO->LED = ((1U << (MPS2_FPGAIO_NBR_LEDS)) - 1U) & leds_val;
- break;
- case MPS2_SCC_LED:
- MPS2_SCC->LEDS = ((1U << (MPS2_SCC_NBR_LEDS)) - 1U) & leds_val;
- break;
- /* default: The default is not defined intentionally to force the
- * compiler to check that all enumeration values are
- * covered in the switch.*/
- }
-}
-
-void mps2_led_on(enum mps2_led_t led_type, enum mps2_led_name_t led_id)
-{
- switch(led_type) {
- case MPS2_FPGAIO_LED:
- if (led_id < MPS2_FPGAIO_NBR_LEDS) {
- MPS2_FPGAIO->LED |= (1U << led_id);
- }
- break;
- case MPS2_SCC_LED:
- if (led_id < MPS2_SCC_NBR_LEDS) {
- MPS2_SCC->LEDS |= (1U << led_id);
- }
- break;
- /* default: The default is not defined intentionally to force the
- * compiler to check that all enumeration values are
- * covered in the switch.*/
- }
-}
-
-void mps2_led_off(enum mps2_led_t led_type, enum mps2_led_name_t led_id)
-{
- switch(led_type) {
- case MPS2_FPGAIO_LED:
- if (led_id < MPS2_FPGAIO_NBR_LEDS) {
- MPS2_FPGAIO->LED &= ~(1U << led_id);
- }
- break;
- case MPS2_SCC_LED:
- if (led_id < MPS2_SCC_NBR_LEDS) {
- MPS2_SCC->LEDS &= ~(1U << led_id);
- }
- break;
- /* default: The default is not defined intentionally to force the
- * compiler to check that all enumeration values are
- * covered in the switch.*/
- }
-}
diff --git a/platform/ext/target/sse_200_mps2/mps2/mps2_board/mps2_leds.h b/platform/ext/target/sse_200_mps2/mps2/mps2_board/mps2_leds.h
deleted file mode 100644
index 5fca92c369..0000000000
--- a/platform/ext/target/sse_200_mps2/mps2/mps2_board/mps2_leds.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2016 ARM Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __MPS2_BOARD_LEDS_H__
-#define __MPS2_BOARD_LEDS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-
-enum mps2_led_t {
- MPS2_FPGAIO_LED,
- MPS2_SCC_LED
-};
-
-enum mps2_led_name_t {
- MPS2_FPGAIO_USER_LED0,
- MPS2_FPGAIO_USER_LED1,
- MPS2_SCC_LED1,
- MPS2_SCC_LED2,
- MPS2_SCC_LED3,
- MPS2_SCC_LED4,
- MPS2_SCC_LED5,
- MPS2_SCC_LED6,
- MPS2_SCC_LED7,
- MPS2_SCC_LED8
-};
-
-/**
- * \brief Gets number of available FPGA LEDs.
- *
- * \param[in] led_type FPGA LEDs type (\ref mps2_led_t).
- *
- * \return Number of available LEDs.
- */
-uint32_t mps2_get_nbr_leds(enum mps2_led_t led_type);
-
-/**
- * \brief Sets FPGA LEDs state.
- *
- * \param[in] led_type FPGA LEDs type (\ref mps2_led_t).
- * \param[in] leds_val FPGA LEDs value.
-*/
-void mps2_set_leds(enum mps2_led_t led_type, uint32_t leds_val);
-
-/**
- * \brief Switchs on the given FPGA LED.
- *
- * \param[in] led_type FPGA LEDs type (\ref mps2_led_t).
- * \param[in] led_id FPGA LED Id (\ref mps2_led_name_t).
-*/
-void mps2_led_on(enum mps2_led_t led_type, enum mps2_led_name_t led_id);
-
-/**
- * \brief Switchs off the given FPGA LED.
- *
- * \param[in] led_type FPGA LEDs type (\ref mps2_led_t).
- * \param[in] led_id FPGA LED Id (\ref mps2_led_name_t).
-*/
-void mps2_led_off(enum mps2_led_t led_type, enum mps2_led_name_t led_id);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* __MPS2_BOARD_LEDS_H__ */
diff --git a/platform/ext/target/sse_200_mps2/mps2/mps2_board/mps2_time.c b/platform/ext/target/sse_200_mps2/mps2/mps2_board/mps2_time.c
deleted file mode 100644
index 661fb2857c..0000000000
--- a/platform/ext/target/sse_200_mps2/mps2/mps2_board/mps2_time.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2017 ARM Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "mps2_time.h"
-#include "smm_mps2.h"
-
-#define TICKS_PER_US (SystemCoreClock / 1000000U)
-#define TICKS_PER_MS (SystemCoreClock / 1000U)
-
-uint32_t mps2_get_ticks(enum mps2_clk_t clk)
-{
- switch (clk) {
- case MPS2_CLK_1HZ:
- return MPS2_FPGAIO->CLK1HZ;
- case MPS2_CLK_100HZ:
- return MPS2_FPGAIO->CLK100HZ;
- case MPS2_CLK_25MHZ:
- return MPS2_FPGAIO->COUNTER;
- /* default: Compiler check */
- }
-}
-
-void mps2_sleepms(uint32_t msec)
-{
- uint32_t end;
- uint32_t start;
-
- start = MPS2_FPGAIO->COUNTER;
- end = start + (msec * TICKS_PER_MS);
-
- if (end >= start) {
- while (MPS2_FPGAIO->COUNTER >= start && MPS2_FPGAIO->COUNTER < end){};
- } else {
- while (MPS2_FPGAIO->COUNTER >= start){};
- while (MPS2_FPGAIO->COUNTER < end){};
- }
-}
-
-void mps2_sleepus(uint32_t usec)
-{
- uint32_t end;
- uint32_t start;
-
- start = MPS2_FPGAIO->COUNTER;
- end = start + (usec * TICKS_PER_US);
-
- if (end >= start) {
- while (MPS2_FPGAIO->COUNTER >= start && MPS2_FPGAIO->COUNTER < end){};
- } else {
- while (MPS2_FPGAIO->COUNTER >= start){};
- while (MPS2_FPGAIO->COUNTER < end){};
- }
-}
-
-void mps2_sleeps(uint32_t sec)
-{
- uint32_t end;
- uint32_t start;
-
- start = MPS2_FPGAIO->CLK1HZ;
- end = start + sec;
-
- if (end >= start) {
- while (MPS2_FPGAIO->CLK1HZ >= start && MPS2_FPGAIO->CLK1HZ < end){};
- } else {
- while (MPS2_FPGAIO->CLK1HZ >= start){};
- while (MPS2_FPGAIO->CLK1HZ < end){};
- }
-}
diff --git a/platform/ext/target/sse_200_mps2/mps2/mps2_board/mps2_time.h b/platform/ext/target/sse_200_mps2/mps2/mps2_board/mps2_time.h
deleted file mode 100644
index 516c8372bd..0000000000
--- a/platform/ext/target/sse_200_mps2/mps2/mps2_board/mps2_time.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2017 ARM Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __MPS2_TIME_H__
-#define __MPS2_TIME_H__
-
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Enum to define clocks in the system */
-enum mps2_clk_t {
- MPS2_CLK_1HZ = 0, /*!< 1Hz ticker */
- MPS2_CLK_100HZ, /*!< 100Hz ticker */
- MPS2_CLK_25MHZ /*!< 25MHz ticker */
-};
-
-/**
- * \brief Return number of ticks of a clock
- *
- * \param[in] clk Clock to get ticks from
- *
- * \return Value of the counter
- */
-uint32_t mps2_get_ticks(enum mps2_clk_t clk);
-
-/**
- * \brief Sleep function to delay milliseconds.
- *
- * \param[in] msec Time to sleep in msec
- *
- * \note Maximum measurable time with current implementation is 171s
- */
-void mps2_sleepms(uint32_t msec);
-
-/**
- * \brief Sleep function to delay microseconds.
- *
- * \param[in] usec Time to sleep in usec
- *
- * \note Maximum measurable time with current implementation is 171s
- */
-void mps2_sleepus(uint32_t usec);
-
-/**
- * \brief Sleep function to delay in seconds.
- *
- * \param[in] sec Time to sleep in seconds
- */
-void mps2_sleeps(uint32_t sec);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* __MPS2_TIME_H__ */
diff --git a/platform/ext/target/sse_200_mps2/sse_200/partition/region_limits.h b/platform/ext/target/sse_200_mps2/sse_200/partition/region_limits.h
deleted file mode 100644
index ed6a0d364d..0000000000
--- a/platform/ext/target/sse_200_mps2/sse_200/partition/region_limits.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2017 ARM Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef REGION_LIMITS_H
-#define REGION_LIMITS_H
-
-#define TOTAL_ROM_SIZE (0x00400000) /* 4 MB */
-#define TOTAL_RAM_SIZE (0x00200000) /* 2 MB */
-
-/* Use SRAM1 memory to store Code data */
-#define S_ROM_ALIAS_BASE (0x10000000)
-#define NS_ROM_ALIAS_BASE (0x00000000)
-
-/* Use SRAM2 memory to store RW data as Internal RAM has issues in the FPGA */
-#define S_RAM_ALIAS_BASE (0x38000000)
-#define NS_RAM_ALIAS_BASE (0x28000000)
-
-#endif /*REGION_LIMITS_H*/
diff --git a/secure_fw/CMakeLists.txt b/secure_fw/CMakeLists.txt
index 1b11430979..efc4e55b31 100644
--- a/secure_fw/CMakeLists.txt
+++ b/secure_fw/CMakeLists.txt
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2017, Arm Limited. All rights reserved.
+# Copyright (c) 2017-2018, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -33,19 +33,23 @@ include(${SECURE_FW_DIR}/spm/CMakeLists.inc)
include(${SECURE_FW_DIR}/core/CMakeLists.inc)
include(${SECURE_FW_DIR}/ns_callable/CMakeLists.inc)
-set(MPS2_SSE200_BUILD_CMSIS_CORE On)
-set(MPS2_SSE200_BUILD_RETARGET On)
-set(MPS2_SSE200_BUILD_NATIVE_DRIVERS On)
-set(MPS2_SSE200_BUILD_STARTUP On)
-set(MPS2_SSE200_BUILD_TARGET_CFG On)
-set(MPS2_SSE200_BUILD_TARGET_HARDWARE_KEYS On)
-set(MPS2_SSE200_BUILD_CMSIS_DRIVERS On)
-set(MPS2_SSE200_BUILD_MPS2_TIME Off)
-set(MPS2_SSE200_BUILD_UART_STDOUT On)
-set(MPS2_SSE200_BUILD_MPS2_BOARD_LEDS Off)
-set(MPS2_SSE200_BUILD_MPS2_BOARD_TIME On)
-set(MPS2_SSE200_BUILD_MPS2_BOARD_FLASH Off)
-include(${TFM_ROOT_DIR}/platform/ext/Mps2SSE200.cmake)
+set(BUILD_CMSIS_CORE On)
+set(BUILD_RETARGET On)
+set(BUILD_NATIVE_DRIVERS On)
+set(BUILD_STARTUP On)
+set(BUILD_TARGET_CFG On)
+set(BUILD_TARGET_HARDWARE_KEYS On)
+set(BUILD_CMSIS_DRIVERS On)
+set(BUILD_TIME Off)
+set(BUILD_UART_STDOUT On)
+set(BUILD_FLASH Off)
+if(NOT DEFINED PLATFORM_CMAKE_FILE)
+ message (FATAL_ERROR "Platform specific CMake is not defined. Please set PLATFORM_CMAKE_FILE.")
+elseif(NOT EXISTS ${PLATFORM_CMAKE_FILE})
+ message (FATAL_ERROR "Platform specific CMake \"${PLATFORM_CMAKE_FILE}\" file does not exist. Please fix value of PLATFORM_CMAKE_FILE.")
+else()
+ include(${PLATFORM_CMAKE_FILE})
+endif()
embedded_target_include_directories(TARGET ${PROJECT_NAME} PATH ${TFM_ROOT_DIR} ABSOLUTE APPEND)
diff --git a/secure_fw/core/CMakeLists.inc b/secure_fw/core/CMakeLists.inc
index eb9e713d1f..d5bb9e2af1 100644
--- a/secure_fw/core/CMakeLists.inc
+++ b/secure_fw/core/CMakeLists.inc
@@ -46,9 +46,21 @@ embedded_include_directories(PATH ${TFM_ROOT_DIR}/interface/include ABSOLUTE)
embedded_include_directories(PATH ${TFM_ROOT_DIR}/secure_fw/spm ABSOLUTE)
embedded_include_directories(PATH ${TFM_ROOT_DIR}/secure_fw/core ABSOLUTE)
-set(PLATFORM_DIR ${TFM_ROOT_DIR}/platform/ext)
-embedded_include_directories(PATH "${PLATFORM_DIR}/cmsis" ABSOLUTE)
-embedded_include_directories(PATH
- "${PLATFORM_DIR}/target/sse_200_mps2/cmsis_core" ABSOLUTE)
-embedded_include_directories(PATH
- "${PLATFORM_DIR}/target/sse_200_mps2/sse_200/retarget" ABSOLUTE)
+set(BUILD_CMSIS_CORE Off)
+set(BUILD_RETARGET Off)
+set(BUILD_NATIVE_DRIVERS Off)
+set(BUILD_STARTUP Off)
+set(BUILD_TARGET_CFG Off)
+set(BUILD_TARGET_HARDWARE_KEYS Off)
+set(BUILD_CMSIS_DRIVERS Off)
+set(BUILD_TIME Off)
+set(BUILD_UART_STDOUT Off)
+set(BUILD_FLASH Off)
+if(NOT DEFINED PLATFORM_CMAKE_FILE)
+ message (FATAL_ERROR "Platform specific CMake is not defined. Please set PLATFORM_CMAKE_FILE.")
+elseif(NOT EXISTS ${PLATFORM_CMAKE_FILE})
+ message (FATAL_ERROR "Platform specific CMake \"${PLATFORM_CMAKE_FILE}\" file does not exist. Please fix value of PLATFORM_CMAKE_FILE.")
+else()
+ include(${PLATFORM_CMAKE_FILE})
+endif()
+
diff --git a/secure_fw/services/secure_storage/CMakeLists.inc b/secure_fw/services/secure_storage/CMakeLists.inc
index 09b3decfa5..a25313b1d4 100644
--- a/secure_fw/services/secure_storage/CMakeLists.inc
+++ b/secure_fw/services/secure_storage/CMakeLists.inc
@@ -82,10 +82,24 @@ if (ENABLE_SECURE_STORAGE)
embedded_include_directories(PATH ${MBEDTLS_INSTALL_DIR} ABSOLUTE)
embedded_include_directories(PATH ${TFM_ROOT_DIR}/secure_fw/spm ABSOLUTE)
embedded_include_directories(PATH ${TFM_ROOT_DIR}/secure_fw/core ABSOLUTE)
+ embedded_include_directories(PATH ${TFM_ROOT_DIR}/platform/ext/common ABSOLUTE)
+
+ set(BUILD_CMSIS_CORE Off)
+ set(BUILD_RETARGET Off)
+ set(BUILD_NATIVE_DRIVERS Off)
+ set(BUILD_STARTUP Off)
+ set(BUILD_TARGET_CFG Off)
+ set(BUILD_TARGET_HARDWARE_KEYS Off)
+ set(BUILD_CMSIS_DRIVERS Off)
+ set(BUILD_TIME Off)
+ set(BUILD_UART_STDOUT Off)
+ set(BUILD_FLASH Off)
+ if(NOT DEFINED PLATFORM_CMAKE_FILE)
+ message (FATAL_ERROR "Platform specific CMake is not defined. Please set PLATFORM_CMAKE_FILE.")
+ elseif(NOT EXISTS ${PLATFORM_CMAKE_FILE})
+ message (FATAL_ERROR "Platform specific CMake \"${PLATFORM_CMAKE_FILE}\" file does not exist. Please fix value of PLATFORM_CMAKE_FILE.")
+ else()
+ include(${PLATFORM_CMAKE_FILE})
+ endif()
- set(PLATFORM_DIR ${TFM_ROOT_DIR}/platform/ext)
- embedded_include_directories(PATH "${PLATFORM_DIR}/cmsis" ABSOLUTE)
- embedded_include_directories(PATH "${PLATFORM_DIR}/target/common" ABSOLUTE)
- embedded_include_directories(PATH "${PLATFORM_DIR}/target/sse_200_mps2/cmsis_core" ABSOLUTE)
- embedded_include_directories(PATH "${PLATFORM_DIR}/target/sse_200_mps2/sse_200/retarget" ABSOLUTE)
endif()
diff --git a/secure_fw/spm/CMakeLists.inc b/secure_fw/spm/CMakeLists.inc
index 015d635afb..e3f05f659f 100644
--- a/secure_fw/spm/CMakeLists.inc
+++ b/secure_fw/spm/CMakeLists.inc
@@ -40,7 +40,21 @@ embedded_include_directories(PATH ${TFM_ROOT_DIR}/secure_fw/spm ABSOLUTE)
embedded_include_directories(PATH ${TFM_ROOT_DIR}/secure_fw/core ABSOLUTE)
embedded_include_directories(PATH ${TFM_ROOT_DIR} ABSOLUTE)
-set(PLATFORM_DIR ${TFM_ROOT_DIR}/platform/ext)
-embedded_include_directories(PATH "${PLATFORM_DIR}/cmsis" ABSOLUTE)
-embedded_include_directories(PATH "${PLATFORM_DIR}/target/sse_200_mps2/cmsis_core" ABSOLUTE)
-embedded_include_directories(PATH "${PLATFORM_DIR}/target/sse_200_mps2/sse_200/retarget" ABSOLUTE)
+set(BUILD_CMSIS_CORE Off)
+set(BUILD_RETARGET Off)
+set(BUILD_NATIVE_DRIVERS Off)
+set(BUILD_STARTUP Off)
+set(BUILD_TARGET_CFG Off)
+set(BUILD_TARGET_HARDWARE_KEYS Off)
+set(BUILD_CMSIS_DRIVERS Off)
+set(BUILD_TIME Off)
+set(BUILD_UART_STDOUT Off)
+set(BUILD_FLASH Off)
+if(NOT DEFINED PLATFORM_CMAKE_FILE)
+ message (FATAL_ERROR "Platform specific CMake is not defined. Please set PLATFORM_CMAKE_FILE.")
+elseif(NOT EXISTS ${PLATFORM_CMAKE_FILE})
+ message (FATAL_ERROR "Platform specific CMake \"${PLATFORM_CMAKE_FILE}\" file does not exist. Please fix value of PLATFORM_CMAKE_FILE.")
+else()
+ include(${PLATFORM_CMAKE_FILE})
+endif()
+
diff --git a/test/test_services/CMakeLists.inc b/test/test_services/CMakeLists.inc
index 14251e5fc8..d9121b0944 100644
--- a/test/test_services/CMakeLists.inc
+++ b/test/test_services/CMakeLists.inc
@@ -45,10 +45,21 @@ endif()
embedded_include_directories(PATH ${TFM_ROOT_DIR} ABSOLUTE)
embedded_include_directories(PATH ${TFM_ROOT_DIR}/interface/include ABSOLUTE)
-set(PLATFORM_DIR ${TFM_ROOT_DIR}/platform/ext)
-embedded_include_directories(PATH "${PLATFORM_DIR}/cmsis" ABSOLUTE)
-embedded_include_directories(PATH "${PLATFORM_DIR}/target/sse_200_mps2/cmsis_core" ABSOLUTE)
-embedded_include_directories(PATH "${PLATFORM_DIR}/target/sse_200_mps2/sse_200/retarget" ABSOLUTE)
-embedded_include_directories(PATH "${PLATFORM_DIR}/target/sse_200_mps2/mps2/mps2_board" ABSOLUTE)
-
+set(BUILD_CMSIS_CORE Off)
+set(BUILD_RETARGET Off)
+set(BUILD_NATIVE_DRIVERS Off)
+set(BUILD_STARTUP Off)
+set(BUILD_TARGET_CFG Off)
+set(BUILD_TARGET_HARDWARE_KEYS Off)
+set(BUILD_CMSIS_DRIVERS Off)
+set(BUILD_TIME Off)
+set(BUILD_UART_STDOUT Off)
+set(BUILD_FLASH Off)
+if(NOT DEFINED PLATFORM_CMAKE_FILE)
+ message (FATAL_ERROR "Platform specific CMake is not defined. Please set PLATFORM_CMAKE_FILE.")
+elseif(NOT EXISTS ${PLATFORM_CMAKE_FILE})
+ message (FATAL_ERROR "Platform specific CMake \"${PLATFORM_CMAKE_FILE}\" file does not exist. Please fix value of PLATFORM_CMAKE_FILE.")
+else()
+ include(${PLATFORM_CMAKE_FILE})
+endif()