|
| 1 | +/* |
| 2 | + * Copyright (c) 2021-2023 Arm Limited. All rights reserved. |
| 3 | + * |
| 4 | + * SPDX-License-Identifier: Apache-2.0 |
| 5 | + * |
| 6 | + * Licensed under the Apache License, Version 2.0 (the License); you may |
| 7 | + * not use this file except in compliance with the License. |
| 8 | + * You may obtain a copy of the License at |
| 9 | + * |
| 10 | + * www.apache.org/licenses/LICENSE-2.0 |
| 11 | + * |
| 12 | + * Unless required by applicable law or agreed to in writing, software |
| 13 | + * distributed under the License is distributed on an AS IS BASIS, WITHOUT |
| 14 | + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | + * See the License for the specific language governing permissions and |
| 16 | + * limitations under the License. |
| 17 | + * |
| 18 | + * ----------------------------------------------------------------------------- |
| 19 | + * |
| 20 | + * Project: CMSIS-RTOS RTX |
| 21 | + * Title: RTX derived definitions |
| 22 | + * |
| 23 | + * ----------------------------------------------------------------------------- |
| 24 | + */ |
| 25 | + |
| 26 | +#ifndef RTX_DEF_H_ |
| 27 | +#define RTX_DEF_H_ |
| 28 | + |
| 29 | +//# ============================================================================ |
| 30 | +// Mbed OS patch: Exclude RTE_Components.h and RTX_Config.h inclusion in .S files only |
| 31 | +// This patch was originally applied in each .S file before including rtx_def.h. |
| 32 | +// Apply it here, but restrict to assembler to avoid impacting C/C++ where |
| 33 | +// RTX_Config.h must be included to provide macros like OS_TICK_FREQ. |
| 34 | +//# ============================================================================ |
| 35 | +#if defined(__ASSEMBLER__) || defined(__ASSEMBLY__) |
| 36 | +#define RTX_CONFIG_H_ |
| 37 | +#undef _RTE_ |
| 38 | +#endif |
| 39 | +//# ============================================================================ |
| 40 | + |
| 41 | +#ifdef _RTE_ |
| 42 | +#include "RTE_Components.h" |
| 43 | +#endif |
| 44 | +#include "RTX_Config.h" |
| 45 | + |
| 46 | +#if (defined(OS_SAFETY_FEATURES) && (OS_SAFETY_FEATURES != 0)) |
| 47 | + #define RTX_SAFETY_FEATURES |
| 48 | + #if (defined(OS_SAFETY_CLASS) && (OS_SAFETY_CLASS != 0)) |
| 49 | + #define RTX_SAFETY_CLASS |
| 50 | + #endif |
| 51 | + #if (defined(OS_EXECUTION_ZONE) && (OS_EXECUTION_ZONE != 0)) |
| 52 | + #define RTX_EXECUTION_ZONE |
| 53 | + #endif |
| 54 | + #if (defined(OS_THREAD_WATCHDOG) && (OS_THREAD_WATCHDOG != 0)) |
| 55 | + #define RTX_THREAD_WATCHDOG |
| 56 | + #endif |
| 57 | + #if (defined(OS_OBJ_PTR_CHECK) && (OS_OBJ_PTR_CHECK != 0)) |
| 58 | + #define RTX_OBJ_PTR_CHECK |
| 59 | + #endif |
| 60 | + #if (defined(OS_SVC_PTR_CHECK) && (OS_SVC_PTR_CHECK != 0)) |
| 61 | + #define RTX_SVC_PTR_CHECK |
| 62 | + #endif |
| 63 | +#endif |
| 64 | + |
| 65 | +#if (defined(OS_OBJ_MEM_USAGE) && (OS_OBJ_MEM_USAGE != 0)) |
| 66 | + #define RTX_OBJ_MEM_USAGE |
| 67 | +#endif |
| 68 | + |
| 69 | +#if (defined(OS_STACK_CHECK) && (OS_STACK_CHECK != 0)) |
| 70 | + #define RTX_STACK_CHECK |
| 71 | +#endif |
| 72 | + |
| 73 | +#if (defined(OS_TZ_CONTEXT) && (OS_TZ_CONTEXT != 0)) |
| 74 | + #define RTX_TZ_CONTEXT |
| 75 | +#endif |
| 76 | + |
| 77 | +#ifndef DOMAIN_NS |
| 78 | + #ifdef RTE_CMSIS_RTOS2_RTX5_ARMV8M_NS |
| 79 | + #define DOMAIN_NS 1 |
| 80 | + #else |
| 81 | + #define DOMAIN_NS 0 |
| 82 | + #endif |
| 83 | +#endif |
| 84 | + |
| 85 | +#endif // RTX_DEF_H_ |
0 commit comments