RTX_Config.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. /*
  2. * Copyright (c) 2013-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. * $Revision: V5.6.0
  21. *
  22. * Project: CMSIS-RTOS RTX
  23. * Title: RTX Library Configuration definitions
  24. *
  25. * -----------------------------------------------------------------------------
  26. */
  27. #ifndef RTX_CONFIG_H_
  28. #define RTX_CONFIG_H_
  29. //-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
  30. // <h>System Configuration
  31. // =======================
  32. // <e>Safety features (Source variant only)
  33. // <i> Enables FuSa related features.
  34. // <i> Requires RTX Source variant.
  35. // <i> Enables:
  36. // <i> - selected features from this group
  37. // <i> - Thread functions: osThreadProtectPrivileged
  38. #ifndef OS_SAFETY_FEATURES
  39. #define OS_SAFETY_FEATURES 0
  40. #endif
  41. // <q>Safety Class
  42. // <i> Threads assigned to lower classes cannot modify higher class threads.
  43. // <i> Enables:
  44. // <i> - Object attributes: osSafetyClass
  45. // <i> - Kernel functions: osKernelProtect, osKernelDestroyClass
  46. // <i> - Thread functions: osThreadGetClass, osThreadSuspendClass, osThreadResumeClass
  47. #ifndef OS_SAFETY_CLASS
  48. #define OS_SAFETY_CLASS 1
  49. #endif
  50. // <q>MPU Protected Zone
  51. // <i> Access protection via MPU (Spatial isolation).
  52. // <i> Enables:
  53. // <i> - Thread attributes: osThreadZone
  54. // <i> - Thread functions: osThreadGetZone, osThreadTerminateZone
  55. // <i> - Zone Management: osZoneSetup_Callback
  56. #ifndef OS_EXECUTION_ZONE
  57. #define OS_EXECUTION_ZONE 1
  58. #endif
  59. // <q>Thread Watchdog
  60. // <i> Watchdog alerts ensure timing for critical threads (Temporal isolation).
  61. // <i> Enables:
  62. // <i> - Thread functions: osThreadFeedWatchdog
  63. // <i> - Handler functions: osWatchdogAlarm_Handler
  64. #ifndef OS_THREAD_WATCHDOG
  65. #define OS_THREAD_WATCHDOG 1
  66. #endif
  67. // <q>Object Pointer checking
  68. // <i> Check object pointer alignment and memory region.
  69. #ifndef OS_OBJ_PTR_CHECK
  70. #define OS_OBJ_PTR_CHECK 0
  71. #endif
  72. // <q>SVC Function Pointer checking
  73. // <i> Check SVC function pointer alignment and memory region.
  74. // <i> User needs to define a linker execution region RTX_SVC_VENEERS
  75. // <i> containing input sections: rtx_*.o (.text.os.svc.veneer.*)
  76. #ifndef OS_SVC_PTR_CHECK
  77. #define OS_SVC_PTR_CHECK 0
  78. #endif
  79. // </e>
  80. // <q>Object Memory usage counters
  81. // <i> Enables object memory usage counters (requires RTX source variant).
  82. #ifndef OS_OBJ_MEM_USAGE
  83. #define OS_OBJ_MEM_USAGE 0
  84. #endif
  85. // </h>
  86. // <h>Thread Configuration
  87. // =======================
  88. // <q>Stack overrun checking
  89. // <i> Enables stack overrun check at thread switch (requires RTX source variant).
  90. // <i> Enabling this option increases slightly the execution time of a thread switch.
  91. #ifndef OS_STACK_CHECK
  92. #define OS_STACK_CHECK 0
  93. #endif
  94. // </h>
  95. // <h>Event Recorder Configuration
  96. // ===============================
  97. // <h>RTOS Event Generation
  98. // <i> Enables event generation for RTX components (requires RTX source variant).
  99. // <q>Memory Management
  100. // <i> Enables Memory Management event generation.
  101. #ifndef OS_EVR_MEMORY
  102. #define OS_EVR_MEMORY 1
  103. #endif
  104. // <q>Kernel
  105. // <i> Enables Kernel event generation.
  106. #ifndef OS_EVR_KERNEL
  107. #define OS_EVR_KERNEL 1
  108. #endif
  109. // <q>Thread
  110. // <i> Enables Thread event generation.
  111. #ifndef OS_EVR_THREAD
  112. #define OS_EVR_THREAD 1
  113. #endif
  114. // <q>Generic Wait
  115. // <i> Enables Generic Wait event generation.
  116. #ifndef OS_EVR_WAIT
  117. #define OS_EVR_WAIT 1
  118. #endif
  119. // <q>Thread Flags
  120. // <i> Enables Thread Flags event generation.
  121. #ifndef OS_EVR_THFLAGS
  122. #define OS_EVR_THFLAGS 1
  123. #endif
  124. // <q>Event Flags
  125. // <i> Enables Event Flags event generation.
  126. #ifndef OS_EVR_EVFLAGS
  127. #define OS_EVR_EVFLAGS 1
  128. #endif
  129. // <q>Timer
  130. // <i> Enables Timer event generation.
  131. #ifndef OS_EVR_TIMER
  132. #define OS_EVR_TIMER 1
  133. #endif
  134. // <q>Mutex
  135. // <i> Enables Mutex event generation.
  136. #ifndef OS_EVR_MUTEX
  137. #define OS_EVR_MUTEX 1
  138. #endif
  139. // <q>Semaphore
  140. // <i> Enables Semaphore event generation.
  141. #ifndef OS_EVR_SEMAPHORE
  142. #define OS_EVR_SEMAPHORE 1
  143. #endif
  144. // <q>Memory Pool
  145. // <i> Enables Memory Pool event generation.
  146. #ifndef OS_EVR_MEMPOOL
  147. #define OS_EVR_MEMPOOL 1
  148. #endif
  149. // <q>Message Queue
  150. // <i> Enables Message Queue event generation.
  151. #ifndef OS_EVR_MSGQUEUE
  152. #define OS_EVR_MSGQUEUE 1
  153. #endif
  154. // </h>
  155. // </h>
  156. //------------- <<< end of configuration section >>> ---------------------------
  157. #endif // RTX_CONFIG_H_