Build: Enable linking with PSA API compliance tests in the NS app
This change modifies the build system to support linking
the PSA API compliance test static libraries. It introduces
a new build configuration ConfigPsaApiTest.cmake for this purpose.
The build instructions are updated to show an example of how
to use this new build configuration.
Change-Id: Iabf4876504e690826fe80b467a91fa53bffb0b47
Signed-off-by: Jamie Fox <jamie.fox@arm.com>
Co-Authored-by: Antonio de Angelis <antonio.deangelis@arm.com>
diff --git a/app/psa_api_test.c b/app/psa_api_test.c
new file mode 100644
index 0000000..3a6cc53
--- /dev/null
+++ b/app/psa_api_test.c
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2019, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ */
+
+#include "psa_api_test.h"
+#include "tfm_nspm_api.h"
+#include "tfm_integ_test.h"
+
+/**
+ * \brief This symbol is the entry point provided by the PSA API compliance
+ * test libraries
+ */
+extern void val_entry(void);
+
+__attribute__((noreturn))
+void psa_api_test(void *arg)
+{
+ UNUSED_VARIABLE(arg);
+
+#ifdef TFM_NS_CLIENT_IDENTIFICATION
+ tfm_nspm_register_client_id();
+#endif /* TFM_NS_CLIENT_IDENTIFICATION */
+
+ val_entry();
+
+ for (;;) {
+ }
+}