chchecks.h 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. /*
  2. ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
  3. This file is part of ChibiOS.
  4. ChibiOS is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or
  7. (at your option) any later version.
  8. ChibiOS is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. /**
  16. * @file chchecks.h
  17. * @brief Configuration file checks header.
  18. *
  19. * @addtogroup conf_checks
  20. * @details This module performs a series of checks on configuration data,
  21. * it is able to detect and reject obsolete or incomplete
  22. * @p chconf.h files.
  23. * @{
  24. */
  25. #ifndef CHCHECKS_H
  26. #define CHCHECKS_H
  27. /*===========================================================================*/
  28. /* Module constants. */
  29. /*===========================================================================*/
  30. /*===========================================================================*/
  31. /* Module pre-compile time settings. */
  32. /*===========================================================================*/
  33. /* Configuration file checks.*/
  34. #if !defined(_CHIBIOS_RT_CONF_)
  35. #error "invalid configuration file"
  36. #endif
  37. #if !defined(_CHIBIOS_RT_CONF_VER_6_0_)
  38. #error "obsolete or unknown configuration file"
  39. #endif
  40. /* System timers checks.*/
  41. #if !defined(CH_CFG_ST_RESOLUTION)
  42. #error "CH_CFG_ST_RESOLUTION not defined in chconf.h"
  43. #endif
  44. #if !defined(CH_CFG_ST_FREQUENCY)
  45. #error "CH_CFG_ST_FREQUENCY not defined in chconf.h"
  46. #endif
  47. #if !defined(CH_CFG_INTERVALS_SIZE)
  48. #error "CH_CFG_INTERVALS_SIZE not defined in chconf.h"
  49. #endif
  50. #if !defined(CH_CFG_TIME_TYPES_SIZE)
  51. #error "CH_CFG_TIME_TYPES_SIZE not defined in chconf.h"
  52. #endif
  53. #if !defined(CH_CFG_ST_TIMEDELTA)
  54. #error "CH_CFG_ST_TIMEDELTA not defined in chconf.h"
  55. #endif
  56. /* Kernel parameters and options checks.*/
  57. #if !defined(CH_CFG_TIME_QUANTUM)
  58. #error "CH_CFG_TIME_QUANTUM not defined in chconf.h"
  59. #endif
  60. #if !defined(CH_CFG_MEMCORE_SIZE)
  61. #error "CH_CFG_MEMCORE_SIZE not defined in chconf.h"
  62. #endif
  63. #if !defined(CH_CFG_NO_IDLE_THREAD)
  64. #error "CH_CFG_NO_IDLE_THREAD not defined in chconf.h"
  65. #endif
  66. /* Performance options checks.*/
  67. #if !defined(CH_CFG_OPTIMIZE_SPEED)
  68. #error "CH_CFG_OPTIMIZE_SPEED not defined in chconf.h"
  69. #endif
  70. /* Subsystem options checks.*/
  71. #if !defined(CH_CFG_USE_TM)
  72. #error "CH_CFG_USE_TM not defined in chconf.h"
  73. #endif
  74. #if !defined(CH_CFG_USE_REGISTRY)
  75. #error "CH_CFG_USE_REGISTRY not defined in chconf.h"
  76. #endif
  77. #if !defined(CH_CFG_USE_WAITEXIT)
  78. #error "CH_CFG_USE_WAITEXIT not defined in chconf.h"
  79. #endif
  80. #if !defined(CH_CFG_USE_SEMAPHORES)
  81. #error "CH_CFG_USE_SEMAPHORES not defined in chconf.h"
  82. #endif
  83. #if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
  84. #error "CH_CFG_USE_SEMAPHORES_PRIORITY not defined in chconf.h"
  85. #endif
  86. #if !defined(CH_CFG_USE_MUTEXES)
  87. #error "CH_CFG_USE_MUTEXES not defined in chconf.h"
  88. #endif
  89. #if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
  90. #error "CH_CFG_USE_MUTEXES_RECURSIVE not defined in chconf.h"
  91. #endif
  92. #if !defined(CH_CFG_USE_CONDVARS)
  93. #error "CH_CFG_USE_CONDVARS not defined in chconf.h"
  94. #endif
  95. #if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
  96. #error "CH_CFG_USE_CONDVARS_TIMEOUT not defined in chconf.h"
  97. #endif
  98. #if !defined(CH_CFG_USE_EVENTS)
  99. #error "CH_CFG_USE_EVENTS not defined in chconf.h"
  100. #endif
  101. #if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
  102. #error "CH_CFG_USE_EVENTS_TIMEOUT not defined in chconf.h"
  103. #endif
  104. #if !defined(CH_CFG_USE_MESSAGES)
  105. #error "CH_CFG_USE_MESSAGES not defined in chconf.h"
  106. #endif
  107. #if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
  108. #error "CH_CFG_USE_MESSAGES_PRIORITY not defined in chconf.h"
  109. #endif
  110. #if !defined(CH_CFG_USE_DYNAMIC)
  111. #error "CH_CFG_USE_DYNAMIC not defined in chconf.h"
  112. #endif
  113. /* Debug options checks.*/
  114. #if !defined(CH_DBG_STATISTICS)
  115. #error "CH_DBG_STATISTICS not defined in chconf.h"
  116. #endif
  117. #if !defined(CH_DBG_SYSTEM_STATE_CHECK)
  118. #error "CH_DBG_SYSTEM_STATE_CHECK not defined in chconf.h"
  119. #endif
  120. #if !defined(CH_DBG_ENABLE_CHECKS)
  121. #error "CH_DBG_ENABLE_CHECKS not defined in chconf.h"
  122. #endif
  123. #if !defined(CH_DBG_ENABLE_ASSERTS)
  124. #error "CH_DBG_ENABLE_ASSERTS not defined in chconf.h"
  125. #endif
  126. #if !defined(CH_DBG_TRACE_MASK)
  127. #error "CH_DBG_TRACE_MASK not defined in chconf.h"
  128. #endif
  129. #if !defined(CH_DBG_TRACE_BUFFER_SIZE)
  130. #error "CH_DBG_TRACE_BUFFER_SIZE not defined in chconf.h"
  131. #endif
  132. #if !defined(CH_DBG_ENABLE_STACK_CHECK)
  133. #error "CH_DBG_ENABLE_STACK_CHECK not defined in chconf.h"
  134. #endif
  135. #if !defined(CH_DBG_FILL_THREADS)
  136. #error "CH_DBG_FILL_THREADS not defined in chconf.h"
  137. #endif
  138. #if !defined(CH_DBG_THREADS_PROFILING)
  139. #error "CH_DBG_THREADS_PROFILING not defined in chconf.h"
  140. #endif
  141. /* System hooks checks.*/
  142. #if !defined(CH_CFG_SYSTEM_INIT_HOOK)
  143. #error "CH_CFG_SYSTEM_INIT_HOOK not defined in chconf.h"
  144. #endif
  145. #if !defined(CH_CFG_SYSTEM_EXTRA_FIELDS)
  146. #error "CH_CFG_SYSTEM_EXTRA_FIELDS not defined in chconf.h"
  147. #endif
  148. #if !defined(CH_CFG_THREAD_EXTRA_FIELDS)
  149. #error "CH_CFG_THREAD_EXTRA_FIELDS not defined in chconf.h"
  150. #endif
  151. #if !defined(CH_CFG_THREAD_INIT_HOOK)
  152. #error "CH_CFG_THREAD_INIT_HOOK not defined in chconf.h"
  153. #endif
  154. #if !defined(CH_CFG_THREAD_EXIT_HOOK)
  155. #error "CH_CFG_THREAD_EXIT_HOOK not defined in chconf.h"
  156. #endif
  157. #if !defined(CH_CFG_CONTEXT_SWITCH_HOOK)
  158. #error "CH_CFG_CONTEXT_SWITCH_HOOK not defined in chconf.h"
  159. #endif
  160. #if !defined(CH_CFG_IRQ_PROLOGUE_HOOK)
  161. #error "CH_CFG_IRQ_PROLOGUE_HOOK not defined in chconf.h"
  162. #endif
  163. #if !defined(CH_CFG_IRQ_EPILOGUE_HOOK)
  164. #error "CH_CFG_IRQ_EPILOGUE_HOOK not defined in chconf.h"
  165. #endif
  166. #if !defined(CH_CFG_IDLE_ENTER_HOOK)
  167. #error "CH_CFG_IDLE_ENTER_HOOK not defined in chconf.h"
  168. #endif
  169. #if !defined(CH_CFG_IDLE_LEAVE_HOOK)
  170. #error "CH_CFG_IDLE_LEAVE_HOOK not defined in chconf.h"
  171. #endif
  172. #if !defined(CH_CFG_IDLE_LOOP_HOOK)
  173. #error "CH_CFG_IDLE_LOOP_HOOK not defined in chconf.h"
  174. #endif
  175. #if !defined(CH_CFG_SYSTEM_TICK_HOOK)
  176. #error "CH_CFG_SYSTEM_TICK_HOOK not defined in chconf.h"
  177. #endif
  178. #if !defined(CH_CFG_SYSTEM_HALT_HOOK)
  179. #error "CH_CFG_SYSTEM_HALT_HOOK not defined in chconf.h"
  180. #endif
  181. #if !defined(CH_CFG_TRACE_HOOK)
  182. #error "CH_CFG_TRACE_HOOK not defined in chconf.h"
  183. #endif
  184. /*===========================================================================*/
  185. /* Derived constants and error checks. */
  186. /*===========================================================================*/
  187. /*===========================================================================*/
  188. /* Module data structures and types. */
  189. /*===========================================================================*/
  190. /*===========================================================================*/
  191. /* Module macros. */
  192. /*===========================================================================*/
  193. /*===========================================================================*/
  194. /* External declarations. */
  195. /*===========================================================================*/
  196. /*===========================================================================*/
  197. /* Module inline functions. */
  198. /*===========================================================================*/
  199. #endif /* CHCHECKS_H */
  200. /** @} */