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/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: