ChibiOS  21.6.0
chchecks.h
Go to the documentation of this file.
1 /*
2  ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
3  2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
4 
5  This file is part of ChibiOS.
6 
7  ChibiOS is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation version 3 of the License.
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 rt/include/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_7_0_)
48 #error "obsolete or unknown configuration file"
49 #endif
50 
51 /* System checks.*/
52 #if !defined(CH_CFG_SMP_MODE)
53 #error "CH_CFG_SMP_MODE not defined in chconf.h"
54 #endif
55 
56 /* System timers checks.*/
57 #if !defined(CH_CFG_ST_RESOLUTION)
58 #error "CH_CFG_ST_RESOLUTION not defined in chconf.h"
59 #endif
60 
61 #if !defined(CH_CFG_ST_FREQUENCY)
62 #error "CH_CFG_ST_FREQUENCY not defined in chconf.h"
63 #endif
64 
65 #if !defined(CH_CFG_INTERVALS_SIZE)
66 #error "CH_CFG_INTERVALS_SIZE not defined in chconf.h"
67 #endif
68 
69 #if !defined(CH_CFG_TIME_TYPES_SIZE)
70 #error "CH_CFG_TIME_TYPES_SIZE not defined in chconf.h"
71 #endif
72 
73 #if !defined(CH_CFG_ST_TIMEDELTA)
74 #error "CH_CFG_ST_TIMEDELTA not defined in chconf.h"
75 #endif
76 
77 /* Kernel parameters and options checks.*/
78 #if !defined(CH_CFG_TIME_QUANTUM)
79 #error "CH_CFG_TIME_QUANTUM not defined in chconf.h"
80 #endif
81 
82 #if !defined(CH_CFG_MEMCORE_SIZE)
83 #error "CH_CFG_MEMCORE_SIZE not defined in chconf.h"
84 #endif
85 
86 #if !defined(CH_CFG_NO_IDLE_THREAD)
87 #error "CH_CFG_NO_IDLE_THREAD not defined in chconf.h"
88 #endif
89 
90 /* Performance options checks.*/
91 #if !defined(CH_CFG_OPTIMIZE_SPEED)
92 #error "CH_CFG_OPTIMIZE_SPEED not defined in chconf.h"
93 #endif
94 
95 /* Subsystem options checks.*/
96 #if !defined(CH_CFG_USE_TM)
97 #error "CH_CFG_USE_TM not defined in chconf.h"
98 #endif
99 
100 #if !defined(CH_CFG_USE_TIMESTAMP)
101 #error "CH_CFG_USE_TIMESTAMP not defined in chconf.h"
102 #endif
103 
104 #if !defined(CH_CFG_USE_REGISTRY)
105 #error "CH_CFG_USE_REGISTRY not defined in chconf.h"
106 #endif
107 
108 #if !defined(CH_CFG_USE_WAITEXIT)
109 #error "CH_CFG_USE_WAITEXIT not defined in chconf.h"
110 #endif
111 
112 #if !defined(CH_CFG_USE_SEMAPHORES)
113 #error "CH_CFG_USE_SEMAPHORES not defined in chconf.h"
114 #endif
115 
116 #if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
117 #error "CH_CFG_USE_SEMAPHORES_PRIORITY not defined in chconf.h"
118 #endif
119 
120 #if !defined(CH_CFG_USE_MUTEXES)
121 #error "CH_CFG_USE_MUTEXES not defined in chconf.h"
122 #endif
123 
124 #if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
125 #error "CH_CFG_USE_MUTEXES_RECURSIVE not defined in chconf.h"
126 #endif
127 
128 #if !defined(CH_CFG_USE_CONDVARS)
129 #error "CH_CFG_USE_CONDVARS not defined in chconf.h"
130 #endif
131 
132 #if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
133 #error "CH_CFG_USE_CONDVARS_TIMEOUT not defined in chconf.h"
134 #endif
135 
136 #if !defined(CH_CFG_USE_EVENTS)
137 #error "CH_CFG_USE_EVENTS not defined in chconf.h"
138 #endif
139 
140 #if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
141 #error "CH_CFG_USE_EVENTS_TIMEOUT not defined in chconf.h"
142 #endif
143 
144 #if !defined(CH_CFG_USE_MESSAGES)
145 #error "CH_CFG_USE_MESSAGES not defined in chconf.h"
146 #endif
147 
148 #if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
149 #error "CH_CFG_USE_MESSAGES_PRIORITY not defined in chconf.h"
150 #endif
151 
152 #if !defined(CH_CFG_USE_DYNAMIC)
153 #error "CH_CFG_USE_DYNAMIC not defined in chconf.h"
154 #endif
155 
156 /* Debug options checks.*/
157 #if !defined(CH_DBG_STATISTICS)
158 #error "CH_DBG_STATISTICS not defined in chconf.h"
159 #endif
160 
161 #if !defined(CH_DBG_SYSTEM_STATE_CHECK)
162 #error "CH_DBG_SYSTEM_STATE_CHECK not defined in chconf.h"
163 #endif
164 
165 #if !defined(CH_DBG_ENABLE_CHECKS)
166 #error "CH_DBG_ENABLE_CHECKS not defined in chconf.h"
167 #endif
168 
169 #if !defined(CH_DBG_ENABLE_ASSERTS)
170 #error "CH_DBG_ENABLE_ASSERTS not defined in chconf.h"
171 #endif
172 
173 #if !defined(CH_DBG_TRACE_MASK)
174 #error "CH_DBG_TRACE_MASK not defined in chconf.h"
175 #endif
176 
177 #if !defined(CH_DBG_TRACE_BUFFER_SIZE)
178 #error "CH_DBG_TRACE_BUFFER_SIZE not defined in chconf.h"
179 #endif
180 
181 #if !defined(CH_DBG_ENABLE_STACK_CHECK)
182 #error "CH_DBG_ENABLE_STACK_CHECK not defined in chconf.h"
183 #endif
184 
185 #if !defined(CH_DBG_FILL_THREADS)
186 #error "CH_DBG_FILL_THREADS not defined in chconf.h"
187 #endif
188 
189 #if !defined(CH_DBG_THREADS_PROFILING)
190 #error "CH_DBG_THREADS_PROFILING not defined in chconf.h"
191 #endif
192 
193 /* System hooks checks.*/
194 #if !defined(CH_CFG_SYSTEM_EXTRA_FIELDS)
195 #error "CH_CFG_SYSTEM_EXTRA_FIELDS not defined in chconf.h"
196 #endif
197 
198 #if !defined(CH_CFG_SYSTEM_INIT_HOOK)
199 #error "CH_CFG_SYSTEM_INIT_HOOK not defined in chconf.h"
200 #endif
201 
202 #if !defined(CH_CFG_OS_INSTANCE_INIT_HOOK)
203 #error "CH_CFG_OS_INSTANCE_INIT_HOOK not defined in chconf.h"
204 #endif
205 
206 #if !defined(CH_CFG_OS_INSTANCE_EXTRA_FIELDS)
207 #error "CH_CFG_OS_INSTANCE_EXTRA_FIELDS not defined in chconf.h"
208 #endif
209 
210 #if !defined(CH_CFG_THREAD_EXTRA_FIELDS)
211 #error "CH_CFG_THREAD_EXTRA_FIELDS not defined in chconf.h"
212 #endif
213 
214 #if !defined(CH_CFG_THREAD_INIT_HOOK)
215 #error "CH_CFG_THREAD_INIT_HOOK not defined in chconf.h"
216 #endif
217 
218 #if !defined(CH_CFG_THREAD_EXIT_HOOK)
219 #error "CH_CFG_THREAD_EXIT_HOOK not defined in chconf.h"
220 #endif
221 
222 #if !defined(CH_CFG_CONTEXT_SWITCH_HOOK)
223 #error "CH_CFG_CONTEXT_SWITCH_HOOK not defined in chconf.h"
224 #endif
225 
226 #if !defined(CH_CFG_IRQ_PROLOGUE_HOOK)
227 #error "CH_CFG_IRQ_PROLOGUE_HOOK not defined in chconf.h"
228 #endif
229 
230 #if !defined(CH_CFG_IRQ_EPILOGUE_HOOK)
231 #error "CH_CFG_IRQ_EPILOGUE_HOOK not defined in chconf.h"
232 #endif
233 
234 #if !defined(CH_CFG_IDLE_ENTER_HOOK)
235 #error "CH_CFG_IDLE_ENTER_HOOK not defined in chconf.h"
236 #endif
237 
238 #if !defined(CH_CFG_IDLE_LEAVE_HOOK)
239 #error "CH_CFG_IDLE_LEAVE_HOOK not defined in chconf.h"
240 #endif
241 
242 #if !defined(CH_CFG_IDLE_LOOP_HOOK)
243 #error "CH_CFG_IDLE_LOOP_HOOK not defined in chconf.h"
244 #endif
245 
246 #if !defined(CH_CFG_SYSTEM_TICK_HOOK)
247 #error "CH_CFG_SYSTEM_TICK_HOOK not defined in chconf.h"
248 #endif
249 
250 #if !defined(CH_CFG_SYSTEM_HALT_HOOK)
251 #error "CH_CFG_SYSTEM_HALT_HOOK not defined in chconf.h"
252 #endif
253 
254 #if !defined(CH_CFG_TRACE_HOOK)
255 #error "CH_CFG_TRACE_HOOK not defined in chconf.h"
256 #endif
257 
258 #if !defined(CH_CFG_RUNTIME_FAULTS_HOOK)
259 #error "CH_CFG_RUNTIME_FAULTS_HOOK not defined in chconf.h"
260 #endif
261 
262 /*===========================================================================*/
263 /* Derived constants and error checks. */
264 /*===========================================================================*/
265 
266 /*===========================================================================*/
267 /* Module data structures and types. */
268 /*===========================================================================*/
269 
270 /*===========================================================================*/
271 /* Module macros. */
272 /*===========================================================================*/
273 
274 /*===========================================================================*/
275 /* External declarations. */
276 /*===========================================================================*/
277 
278 /*===========================================================================*/
279 /* Module inline functions. */
280 /*===========================================================================*/
281 
282 #endif /* CHCHECKS_H */
283 
284 /** @} */