cmake: Move platform specific parts to platform dir
Rename Config*.cmake files to reflect the target they build for.
Add target specific configuration options to CMake files, and set the
proper values in the Config*.cmake files.
Eliminate direct inclusion of cmsis core_cm33.h
Update build instructions
Change-Id: I7f506b45e649ce3a0d31cc5784c6a01e1710935c
Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
diff --git a/ConfigRegression.cmake b/ConfigRegression.cmake
index 7e65ab1..3595aa7 100644
--- a/ConfigRegression.cmake
+++ b/ConfigRegression.cmake
@@ -7,20 +7,15 @@
#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/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.")
+#Include board specific config (CPU, etc...), select platform specific build
+#system settings file
+if(NOT DEFINED TARGET_PLATFORM)
+ message(FATAL_ERROR "ERROR: TARGET_PLATFORM is not set in command line")
+elseif(${TARGET_PLATFORM} STREQUAL "AN521")
+ set(PLATFORM_CMAKE_FILE "${CMAKE_CURRENT_LIST_DIR}/platform/ext/Mps2AN521.cmake")
+else()
+ message(FATAL_ERROR "ERROR: Target \"${TARGET_PLATFORM}\" is not supported.")
endif()
-include("Common/${ARMCLANG_MODULE}")
##These variables select how the projects are built. Each project will set
#various project specific settings (e.g. what files to build, macro
@@ -30,4 +25,3 @@
set (BL2 True)
include ("${CMAKE_CURRENT_LIST_DIR}/CommonConfig.cmake")
-