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