blob: a823ff19624191d2064d7219d379519132561c9d [file] [log] [blame]
Antonio de Angelisa54ed7e2017-11-29 13:37:58 +00001/*
Antonio de Angelisd9cd66e2018-03-27 11:19:59 +01002 * Copyright (c) 2017-2018, Arm Limited. All rights reserved.
Antonio de Angelisa54ed7e2017-11-29 13:37:58 +00003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#include <stdio.h>
9#include <cmsis_compiler.h>
10
11#ifndef __TFM_INTEG_TEST_H__
12#define __TFM_INTEG_TEST_H__
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18/* Avoids the semihosting issue */
19#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
20__asm(" .global __ARM_use_no_argv\n");
21#endif
22
23/**
24 * \brief Simple macro to mark UNUSED variables
25 *
26 */
27#define UNUSED_VARIABLE(X) ((void)(X))
28
Antonio de Angelisa54ed7e2017-11-29 13:37:58 +000029#ifdef TEST_FRAMEWORK_NS
30/**
31 * \brief Main test application for the RTX-TFM core
32 * integration tests
33 *
34 */
35void test_app(void *argument);
36#endif /* TEST_FRAMEWORK_NS */
37
38/**
39 * \brief Execute the interactive test cases (button push)
40 *
41 */
42void execute_ns_interactive_tests(void);
43
44/**
45 * \brief Logging function
46 *
47 */
48__attribute__((always_inline)) __STATIC_INLINE void LOG_MSG(const char *MSG)
49{
50#ifndef LOG_MSG_HANDLER_MODE_PRINTF_ENABLED
51 /* if IPSR is non-zero, exception is active. NOT banked S/NS */
52 if (!__get_IPSR()) {
53 printf("\t\e[1;32m[Non-Sec] %s\e[0m\r\n", MSG);
54 }
55#else
56 printf("\t\e[1;32m[Non-Sec] %s\e[0m\r\n", MSG);
57#endif
58}
59
60#ifdef __cplusplus
61}
62#endif
63
64#endif /* __TFM_INTEG_TEST_H__ */