Platform: PSoC64: S-IRQ: Add plat_test.c

Derived from Musca B1 platform.
Please see the description in the two commits:
  commit a9f8e9ec3fe6ab6969b95af31b0fc787d9959261
  commit d3c7766b4703c9eeb8e5271c42dae29d188ebfe0

Change-Id: I2d57c6c8d54e0633caa30153bc2346e17e1bbba0
Signed-off-by: Alamy Liu <alamy.liu@cypress.com>
diff --git a/platform/ext/psoc64.cmake b/platform/ext/psoc64.cmake
index 0ea4694..b999332 100644
--- a/platform/ext/psoc64.cmake
+++ b/platform/ext/psoc64.cmake
@@ -185,6 +185,12 @@
   embedded_include_directories(PATH "${PLATFORM_DIR}/common" ABSOLUTE)
 endif()
 
+if (NOT DEFINED BUILD_PLAT_TEST)
+    message(FATAL_ERROR "Configuration variable BUILD_PLAT_TEST (true|false) is undefined!")
+elseif(BUILD_PLAT_TEST)
+    list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/plat_test.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)