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>
diff --git a/CommonConfig.cmake b/CommonConfig.cmake
index e1deb20..75960c4 100644
--- a/CommonConfig.cmake
+++ b/CommonConfig.cmake
@@ -83,11 +83,11 @@
 
 ##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 @@
 
 ##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 09f1c92..7faeafc 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 83b4bf4..7aa18e0 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 e8b6133..7e65ab1 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 7a6a718..46dfd26 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -41,19 +41,23 @@
 	"${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 b98a66e..0b9f279 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 @@
 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 ${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 1523964..c2c5d18 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 @@
         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
similarity index 100%
rename from cmake/Common/BoardSSE200.cmake
rename to cmake/Common/BoardAN521.cmake
diff --git a/docs/user_guides/tfm_integration_guide.md b/docs/user_guides/tfm_integration_guide.md
index d5c74f9..c26a639 100644
--- a/docs/user_guides/tfm_integration_guide.md
+++ b/docs/user_guides/tfm_integration_guide.md
@@ -8,12 +8,15 @@
 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 @@
 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 @@
 
 --------------
 
-*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 0000000..dea5de8
--- /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 919a1ab..0000000
--- 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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/mps2/mps2_board/mps2_flash.c
rename to 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
similarity index 87%
rename from platform/ext/target/sse_200_mps2/sse_200/RTE_Device.h
rename to platform/ext/target/mps2/an521/RTE_Device.h
index 723a5cd..860a49f 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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/sse_200/armclang/sse_200_bl2.sct
rename to 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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/sse_200/armclang/sse_200_ns.sct
rename to 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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/sse_200/armclang/sse_200_s.sct
rename to 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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/sse_200/armclang/startup_cmsdk_sse_200_bl2.s
rename to 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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/sse_200/armclang/startup_cmsdk_sse_200_ns.s
rename to 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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/sse_200/armclang/startup_cmsdk_sse_200_s.s
rename to 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
similarity index 73%
rename from platform/ext/target/sse_200_mps2/cmsis_core/cmsis.h
rename to platform/ext/target/mps2/an521/cmsis_core/cmsis.h
index f5dfea4..8c82e5a 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
similarity index 88%
rename from platform/ext/target/sse_200_mps2/cmsis_core/mps2_sse_200.h
rename to platform/ext/target/mps2/an521/cmsis_core/mps2_an521.h
index 771fb95..ee6581b 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
similarity index 97%
rename from platform/ext/target/sse_200_mps2/cmsis_core/platform_irq.h
rename to platform/ext/target/mps2/an521/cmsis_core/platform_irq.h
index 640f9fa..a275714 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 @@
     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
similarity index 98%
rename from platform/ext/target/sse_200_mps2/cmsis_core/platform_regs.h
rename to platform/ext/target/mps2/an521/cmsis_core/platform_regs.h
index 0a96550..3d9b3f7 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 @@
 
 /* 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
similarity index 91%
rename from platform/ext/target/sse_200_mps2/cmsis_core/system_cmsdk_mps2_sse_200.c
rename to platform/ext/target/mps2/an521/cmsis_core/system_cmsdk_mps2_an521.c
index c815daa..c4d42fc 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
similarity index 84%
rename from platform/ext/target/sse_200_mps2/cmsis_core/system_cmsdk_mps2_sse_200.h
rename to platform/ext/target/mps2/an521/cmsis_core/system_cmsdk_mps2_an521.h
index bcdb1ed..0bd1727 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 @@
 }
 #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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/sse_200/cmsis_drivers/Driver_MPC.c
rename to 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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/sse_200/cmsis_drivers/Driver_PPC.c
rename to 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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/sse_200/cmsis_drivers/Driver_USART.c
rename to 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
similarity index 77%
rename from platform/ext/target/sse_200_mps2/sse_200/device_cfg.h
rename to platform/ext/target/mps2/an521/device_cfg.h
index 62f19a0..d4b68bd 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
similarity index 93%
rename from platform/ext/target/sse_200_mps2/dummy_crypto_keys.c
rename to platform/ext/target/mps2/an521/dummy_crypto_keys.c
index 05a3fca..80a8f28 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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/sse_200/native_drivers/arm_uart_drv.c
rename to 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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/sse_200/native_drivers/arm_uart_drv.h
rename to 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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/sse_200/native_drivers/mpc_sie200_drv.c
rename to 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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/sse_200/native_drivers/mpc_sie200_drv.h
rename to 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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/sse_200/native_drivers/ppc_sse200_drv.c
rename to 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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/sse_200/native_drivers/ppc_sse200_drv.h
rename to 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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/sse_200/native_drivers/timer_cmsdk/timer_cmsdk.c
rename to 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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/sse_200/native_drivers/timer_cmsdk/timer_cmsdk.h
rename to 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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/sse_200/partition/flash_layout.h
rename to 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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/sse_200/partition/region_defs.h
rename to 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
similarity index 96%
rename from platform/ext/target/sse_200_mps2/sse_200/retarget/platform_retarget.h
rename to platform/ext/target/mps2/an521/retarget/platform_retarget.h
index c0141cb..f62d507 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
similarity index 98%
rename from platform/ext/target/sse_200_mps2/sse_200/retarget/platform_retarget_dev.c
rename to platform/ext/target/mps2/an521/retarget/platform_retarget_dev.c
index e7033c2..a7c70da 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
similarity index 95%
rename from platform/ext/target/sse_200_mps2/sse_200/retarget/platform_retarget_dev.h
rename to platform/ext/target/mps2/an521/retarget/platform_retarget_dev.h
index 8837558..772a5af 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_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
similarity index 94%
rename from platform/ext/target/sse_200_mps2/sse_200/retarget/platform_retarget_pins.h
rename to platform/ext/target/mps2/an521/retarget/platform_retarget_pins.h
index 6664877..d2b7e43 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 @@
 #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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/target_cfg.c
rename to 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
similarity index 100%
rename from platform/ext/target/sse_200_mps2/target_cfg.h
rename to 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
similarity index 93%
rename from platform/ext/target/sse_200_mps2/mps2/mps2_board/smm_mps2.h
rename to platform/ext/target/mps2/smm_mps2.h
index 8570c2a..fb907fe 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 @@
                                         *                   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 b86dfb2..0000000
--- 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 5fca92c..0000000
--- 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 661fb28..0000000
--- 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 516c837..0000000
--- 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 ed6a0d3..0000000
--- 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 1b11430..efc4e55 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}/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 eb9e713..d5bb9e2 100644
--- a/secure_fw/core/CMakeLists.inc
+++ b/secure_fw/core/CMakeLists.inc
@@ -46,9 +46,21 @@
 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 09b3dec..a25313b 100644
--- a/secure_fw/services/secure_storage/CMakeLists.inc
+++ b/secure_fw/services/secure_storage/CMakeLists.inc
@@ -82,10 +82,24 @@
 	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(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)
+	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()
+
 endif()
diff --git a/secure_fw/spm/CMakeLists.inc b/secure_fw/spm/CMakeLists.inc
index 015d635..e3f05f6 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/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 14251e5..d9121b0 100644
--- a/test/test_services/CMakeLists.inc
+++ b/test/test_services/CMakeLists.inc
@@ -45,10 +45,21 @@
 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()