ChibiOS/RT  5.1.0
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 
25 #ifndef CHCHECKS_H
26 #define CHCHECKS_H
27 
28 /*===========================================================================*/
29 /* Module constants. */
30 /*===========================================================================*/
31 
32 /*===========================================================================*/
33 /* Module pre-compile time settings. */
34 /*===========================================================================*/
35 
36 /* Configuration file checks.*/
37 #if !defined(_CHIBIOS_RT_CONF_)
38 #error "invalid configuration file"
39 #endif
40 
41 #if !defined(_CHIBIOS_RT_CONF_VER_5_1_)
42 #error "obsolete or unknown configuration file"
43 #endif
44 
45 /* System timers checks.*/
46 #if !defined(CH_CFG_ST_RESOLUTION)
47 #error "CH_CFG_ST_RESOLUTION not defined in chconf.h"
48 #endif
49 
50 #if !defined(CH_CFG_ST_FREQUENCY)
51 #error "CH_CFG_ST_FREQUENCY not defined in chconf.h"
52 #endif
53 
54 #if !defined(CH_CFG_INTERVALS_SIZE)
55 #error "CH_CFG_INTERVALS_SIZE not defined in chconf.h"
56 #endif
57 
58 #if !defined(CH_CFG_TIME_TYPES_SIZE)
59 #error "CH_CFG_TIME_TYPES_SIZE not defined in chconf.h"
60 #endif
61 
62 #if !defined(CH_CFG_ST_TIMEDELTA)
63 #error "CH_CFG_ST_TIMEDELTA not defined in chconf.h"
64 #endif
65 
66 /* Kernel parameters and options checks.*/
67 #if !defined(CH_CFG_TIME_QUANTUM)
68 #error "CH_CFG_TIME_QUANTUM not defined in chconf.h"
69 #endif
70 
71 #if !defined(CH_CFG_MEMCORE_SIZE)
72 #error "CH_CFG_MEMCORE_SIZE not defined in chconf.h"
73 #endif
74 
75 #if !defined(CH_CFG_NO_IDLE_THREAD)
76 #error "CH_CFG_NO_IDLE_THREAD not defined in chconf.h"
77 #endif
78 
79 /* Performance options checks.*/
80 #if !defined(CH_CFG_OPTIMIZE_SPEED)
81 #error "CH_CFG_OPTIMIZE_SPEED not defined in chconf.h"
82 #endif
83 
84 /* Subsystem options checks.*/
85 #if !defined(CH_CFG_USE_TM)
86 #error "CH_CFG_USE_TM not defined in chconf.h"
87 #endif
88 
89 #if !defined(CH_CFG_USE_REGISTRY)
90 #error "CH_CFG_USE_REGISTRY not defined in chconf.h"
91 #endif
92 
93 #if !defined(CH_CFG_USE_WAITEXIT)
94 #error "CH_CFG_USE_WAITEXIT not defined in chconf.h"
95 #endif
96 
97 #if !defined(CH_CFG_USE_SEMAPHORES)
98 #error "CH_CFG_USE_SEMAPHORES not defined in chconf.h"
99 #endif
100 
101 #if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
102 #error "CH_CFG_USE_SEMAPHORES_PRIORITY not defined in chconf.h"
103 #endif
104 
105 #if !defined(CH_CFG_USE_MUTEXES)
106 #error "CH_CFG_USE_MUTEXES not defined in chconf.h"
107 #endif
108 
109 #if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
110 #error "CH_CFG_USE_MUTEXES_RECURSIVE not defined in chconf.h"
111 #endif
112 
113 #if !defined(CH_CFG_USE_CONDVARS)
114 #error "CH_CFG_USE_CONDVARS not defined in chconf.h"
115 #endif
116 
117 #if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
118 #error "CH_CFG_USE_CONDVARS_TIMEOUT not defined in chconf.h"
119 #endif
120 
121 #if !defined(CH_CFG_USE_EVENTS)
122 #error "CH_CFG_USE_EVENTS not defined in chconf.h"
123 #endif
124 
125 #if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
126 #error "CH_CFG_USE_EVENTS_TIMEOUT not defined in chconf.h"
127 #endif
128 
129 #if !defined(CH_CFG_USE_MESSAGES)
130 #error "CH_CFG_USE_MESSAGES not defined in chconf.h"
131 #endif
132 
133 #if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
134 #error "CH_CFG_USE_MESSAGES_PRIORITY not defined in chconf.h"
135 #endif
136 
137 #if !defined(CH_CFG_USE_MAILBOXES)
138 #error "CH_CFG_USE_MAILBOXES not defined in chconf.h"
139 #endif
140 
141 #if !defined(CH_CFG_USE_MEMCORE)
142 #error "CH_CFG_USE_MEMCORE not defined in chconf.h"
143 #endif
144 
145 #if !defined(CH_CFG_USE_HEAP)
146 #error "CH_CFG_USE_HEAP not defined in chconf.h"
147 #endif
148 
149 #if !defined(CH_CFG_USE_MEMPOOLS)
150 #error "CH_CFG_USE_MEMPOOLS not defined in chconf.h"
151 #endif
152 
153 #if !defined(CH_CFG_USE_OBJ_FIFOS)
154 #error "CH_CFG_USE_OBJ_FIFOS not defined in chconf.h"
155 #endif
156 
157 #if !defined(CH_CFG_USE_DYNAMIC)
158 #error "CH_CFG_USE_DYNAMIC not defined in chconf.h"
159 #endif
160 
161 /* Objects factory options checks.*/
162 #if !defined(CH_CFG_USE_FACTORY)
163 #error "CH_CFG_USE_FACTORY not defined in chconf.h"
164 #endif
165 
166 #if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
167 #error "CH_CFG_FACTORY_MAX_NAMES_LENGTH not defined in chconf.h"
168 #endif
169 
170 #if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
171 #error "CH_CFG_FACTORY_OBJECTS_REGISTRY not defined in chconf.h"
172 #endif
173 
174 #if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
175 #error "CH_CFG_FACTORY_GENERIC_BUFFERS not defined in chconf.h"
176 #endif
177 
178 #if !defined(CH_CFG_FACTORY_SEMAPHORES)
179 #error "CH_CFG_FACTORY_SEMAPHORES not defined in chconf.h"
180 #endif
181 
182 #if !defined(CH_CFG_FACTORY_MAILBOXES)
183 #error "CH_CFG_FACTORY_MAILBOXES not defined in chconf.h"
184 #endif
185 
186 #if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
187 #error "CH_CFG_FACTORY_OBJ_FIFOS not defined in chconf.h"
188 #endif
189 
190 /* Debug options checks.*/
191 #if !defined(CH_DBG_STATISTICS)
192 #error "CH_DBG_STATISTICS not defined in chconf.h"
193 #endif
194 
195 #if !defined(CH_DBG_SYSTEM_STATE_CHECK)
196 #error "CH_DBG_SYSTEM_STATE_CHECK not defined in chconf.h"
197 #endif
198 
199 #if !defined(CH_DBG_ENABLE_CHECKS)
200 #error "CH_DBG_ENABLE_CHECKS not defined in chconf.h"
201 #endif
202 
203 #if !defined(CH_DBG_ENABLE_ASSERTS)
204 #error "CH_DBG_ENABLE_ASSERTS not defined in chconf.h"
205 #endif
206 
207 #if !defined(CH_DBG_TRACE_MASK)
208 #error "CH_DBG_TRACE_MASK not defined in chconf.h"
209 #endif
210 
211 #if !defined(CH_DBG_TRACE_BUFFER_SIZE)
212 #error "CH_DBG_TRACE_BUFFER_SIZE not defined in chconf.h"
213 #endif
214 
215 #if !defined(CH_DBG_ENABLE_STACK_CHECK)
216 #error "CH_DBG_ENABLE_STACK_CHECK not defined in chconf.h"
217 #endif
218 
219 #if !defined(CH_DBG_FILL_THREADS)
220 #error "CH_DBG_FILL_THREADS not defined in chconf.h"
221 #endif
222 
223 #if !defined(CH_DBG_THREADS_PROFILING)
224 #error "CH_DBG_THREADS_PROFILING not defined in chconf.h"
225 #endif
226 
227 /* System hooks checks.*/
228 #if !defined(CH_CFG_SYSTEM_INIT_HOOK)
229 #error "CH_CFG_SYSTEM_INIT_HOOK not defined in chconf.h"
230 #endif
231 
232 #if !defined(CH_CFG_SYSTEM_EXTRA_FIELDS)
233 #error "CH_CFG_SYSTEM_EXTRA_FIELDS not defined in chconf.h"
234 #endif
235 
236 #if !defined(CH_CFG_THREAD_EXTRA_FIELDS)
237 #error "CH_CFG_THREAD_EXTRA_FIELDS not defined in chconf.h"
238 #endif
239 
240 #if !defined(CH_CFG_THREAD_INIT_HOOK)
241 #error "CH_CFG_THREAD_INIT_HOOK not defined in chconf.h"
242 #endif
243 
244 #if !defined(CH_CFG_THREAD_EXIT_HOOK)
245 #error "CH_CFG_THREAD_EXIT_HOOK not defined in chconf.h"
246 #endif
247 
248 #if !defined(CH_CFG_CONTEXT_SWITCH_HOOK)
249 #error "CH_CFG_CONTEXT_SWITCH_HOOK not defined in chconf.h"
250 #endif
251 
252 #if !defined(CH_CFG_IRQ_PROLOGUE_HOOK)
253 #error "CH_CFG_IRQ_PROLOGUE_HOOK not defined in chconf.h"
254 #endif
255 
256 #if !defined(CH_CFG_IRQ_EPILOGUE_HOOK)
257 #error "CH_CFG_IRQ_EPILOGUE_HOOK not defined in chconf.h"
258 #endif
259 
260 #if !defined(CH_CFG_IDLE_ENTER_HOOK)
261 #error "CH_CFG_IDLE_ENTER_HOOK not defined in chconf.h"
262 #endif
263 
264 #if !defined(CH_CFG_IDLE_LEAVE_HOOK)
265 #error "CH_CFG_IDLE_LEAVE_HOOK not defined in chconf.h"
266 #endif
267 
268 #if !defined(CH_CFG_IDLE_LOOP_HOOK)
269 #error "CH_CFG_IDLE_LOOP_HOOK not defined in chconf.h"
270 #endif
271 
272 #if !defined(CH_CFG_SYSTEM_TICK_HOOK)
273 #error "CH_CFG_SYSTEM_TICK_HOOK not defined in chconf.h"
274 #endif
275 
276 #if !defined(CH_CFG_SYSTEM_HALT_HOOK)
277 #error "CH_CFG_SYSTEM_HALT_HOOK not defined in chconf.h"
278 #endif
279 
280 #if !defined(CH_CFG_TRACE_HOOK)
281 #error "CH_CFG_TRACE_HOOK not defined in chconf.h"
282 #endif
283 
284 /*===========================================================================*/
285 /* Derived constants and error checks. */
286 /*===========================================================================*/
287 
288 /*===========================================================================*/
289 /* Module data structures and types. */
290 /*===========================================================================*/
291 
292 /*===========================================================================*/
293 /* Module macros. */
294 /*===========================================================================*/
295 
296 /*===========================================================================*/
297 /* External declarations. */
298 /*===========================================================================*/
299 
300 /*===========================================================================*/
301 /* Module inline functions. */
302 /*===========================================================================*/
303 
304 #endif /* CHCHECKS_H */