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