chconf.h
Go to the documentation of this file.
1 /*
2  ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
3  2011,2012 Giovanni Di Sirio.
4 
5  This file is part of ChibiOS/RT.
6 
7  ChibiOS/RT 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; either version 3 of the License, or
10  (at your option) any later version.
11 
12  ChibiOS/RT is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
32 #ifndef _CHCONF_H_
33 #define _CHCONF_H_
34 
35 #define CHPRINTF_USE_FLOAT TRUE
36 #define CORTEX_SIMPLIFIED_PRIORITY TRUE
37 #define PORT_IDLE_THREAD_STACK_SIZE 64
38 #define PORT_INT_REQUIRED_STACK 128
39 
40 /*===========================================================================*/
45 /*===========================================================================*/
46 
52 #if !defined(CH_FREQUENCY) || defined(__DOXYGEN__)
53 #define CH_FREQUENCY 10000
54 #endif
55 
67 #if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__)
68 #define CH_TIME_QUANTUM 4
69 #endif
70 
82 #if !defined(CH_MEMCORE_SIZE) || defined(__DOXYGEN__)
83 #define CH_MEMCORE_SIZE 0
84 #endif
85 
99 #if !defined(CH_NO_IDLE_THREAD) || defined(__DOXYGEN__)
100 #define CH_NO_IDLE_THREAD FALSE
101 #endif
102 
105 /*===========================================================================*/
110 /*===========================================================================*/
111 
120 #if !defined(CH_OPTIMIZE_SPEED) || defined(__DOXYGEN__)
121 #define CH_OPTIMIZE_SPEED TRUE
122 #endif
123 
126 /*===========================================================================*/
131 /*===========================================================================*/
132 
139 #if !defined(CH_USE_REGISTRY) || defined(__DOXYGEN__)
140 #define CH_USE_REGISTRY TRUE
141 #endif
142 
150 #if !defined(CH_USE_WAITEXIT) || defined(__DOXYGEN__)
151 #define CH_USE_WAITEXIT TRUE
152 #endif
153 
160 #if !defined(CH_USE_SEMAPHORES) || defined(__DOXYGEN__)
161 #define CH_USE_SEMAPHORES TRUE
162 #endif
163 
172 #if !defined(CH_USE_SEMAPHORES_PRIORITY) || defined(__DOXYGEN__)
173 #define CH_USE_SEMAPHORES_PRIORITY FALSE
174 #endif
175 
184 #if !defined(CH_USE_SEMSW) || defined(__DOXYGEN__)
185 #define CH_USE_SEMSW TRUE
186 #endif
187 
194 #if !defined(CH_USE_MUTEXES) || defined(__DOXYGEN__)
195 #define CH_USE_MUTEXES TRUE
196 #endif
197 
206 #if !defined(CH_USE_CONDVARS) || defined(__DOXYGEN__)
207 #define CH_USE_CONDVARS TRUE
208 #endif
209 
218 #if !defined(CH_USE_CONDVARS_TIMEOUT) || defined(__DOXYGEN__)
219 #define CH_USE_CONDVARS_TIMEOUT TRUE
220 #endif
221 
228 #if !defined(CH_USE_EVENTS) || defined(__DOXYGEN__)
229 #define CH_USE_EVENTS TRUE
230 #endif
231 
240 #if !defined(CH_USE_EVENTS_TIMEOUT) || defined(__DOXYGEN__)
241 #define CH_USE_EVENTS_TIMEOUT TRUE
242 #endif
243 
251 #if !defined(CH_USE_MESSAGES) || defined(__DOXYGEN__)
252 #define CH_USE_MESSAGES TRUE
253 #endif
254 
263 #if !defined(CH_USE_MESSAGES_PRIORITY) || defined(__DOXYGEN__)
264 #define CH_USE_MESSAGES_PRIORITY FALSE
265 #endif
266 
275 #if !defined(CH_USE_MAILBOXES) || defined(__DOXYGEN__)
276 #define CH_USE_MAILBOXES TRUE
277 #endif
278 
285 #if !defined(CH_USE_QUEUES) || defined(__DOXYGEN__)
286 #define CH_USE_QUEUES TRUE
287 #endif
288 
296 #if !defined(CH_USE_MEMCORE) || defined(__DOXYGEN__)
297 #define CH_USE_MEMCORE TRUE
298 #endif
299 
310 #if !defined(CH_USE_HEAP) || defined(__DOXYGEN__)
311 #define CH_USE_HEAP TRUE
312 #endif
313 
324 #if !defined(CH_USE_MALLOC_HEAP) || defined(__DOXYGEN__)
325 #define CH_USE_MALLOC_HEAP FALSE
326 #endif
327 
335 #if !defined(CH_USE_MEMPOOLS) || defined(__DOXYGEN__)
336 #define CH_USE_MEMPOOLS TRUE
337 #endif
338 
348 #if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__)
349 #define CH_USE_DYNAMIC TRUE
350 #endif
351 
354 /*===========================================================================*/
359 /*===========================================================================*/
360 
368 #if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__)
369 #define CH_DBG_SYSTEM_STATE_CHECK FALSE
370 #endif
371 
379 #if !defined(CH_DBG_ENABLE_CHECKS) || defined(__DOXYGEN__)
380 #define CH_DBG_ENABLE_CHECKS FALSE
381 #endif
382 
391 #if !defined(CH_DBG_ENABLE_ASSERTS) || defined(__DOXYGEN__)
392 #define CH_DBG_ENABLE_ASSERTS FALSE
393 #endif
394 
402 #if !defined(CH_DBG_ENABLE_TRACE) || defined(__DOXYGEN__)
403 #define CH_DBG_ENABLE_TRACE FALSE
404 #endif
405 
416 #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
417 #define CH_DBG_ENABLE_STACK_CHECK FALSE
418 #endif
419 
428 #if !defined(CH_DBG_FILL_THREADS) || defined(__DOXYGEN__)
429 #define CH_DBG_FILL_THREADS FALSE
430 #endif
431 
441 #if !defined(CH_DBG_THREADS_PROFILING) || defined(__DOXYGEN__)
442 #define CH_DBG_THREADS_PROFILING TRUE
443 #endif
444 
447 /*===========================================================================*/
452 /*===========================================================================*/
453 
458 #if !defined(THREAD_EXT_FIELDS) || defined(__DOXYGEN__)
459 #define THREAD_EXT_FIELDS \
460  /* Add threads custom fields here.*/
461 #endif
462 
470 #if !defined(THREAD_EXT_INIT_HOOK) || defined(__DOXYGEN__)
471 #define THREAD_EXT_INIT_HOOK(tp) { \
472  /* Add threads initialization code here.*/ \
473 }
474 #endif
475 
484 #if !defined(THREAD_EXT_EXIT_HOOK) || defined(__DOXYGEN__)
485 #define THREAD_EXT_EXIT_HOOK(tp) { \
486  /* Add threads finalization code here.*/ \
487 }
488 #endif
489 
494 #if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__)
495 #define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \
496  /* System halt code here.*/ \
497 }
498 #endif
499 
504 #if !defined(IDLE_LOOP_HOOK) || defined(__DOXYGEN__)
505 #define IDLE_LOOP_HOOK() { \
506  /* Idle loop code here.*/ \
507 }
508 #endif
509 
515 #if !defined(SYSTEM_TICK_EVENT_HOOK) || defined(__DOXYGEN__)
516 #define SYSTEM_TICK_EVENT_HOOK() { \
517  /* System tick event code here.*/ \
518 }
519 #endif
520 
526 #if !defined(SYSTEM_HALT_HOOK) || defined(__DOXYGEN__)
527 #define SYSTEM_HALT_HOOK() { \
528  /* System halt code here.*/ \
529 }
530 #endif
531 
534 /*===========================================================================*/
535 /* Port-specific settings (override port settings defaulted in chcore.h). */
536 /*===========================================================================*/
537 
538 #endif /* _CHCONF_H_ */
539