Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
chconf.h
Go to the documentation of this file.
1 /*
2  ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 */
16 
28 #ifndef CHCONF_H
29 #define CHCONF_H
30 
31 #define _CHIBIOS_RT_CONF_
32 #define _CHIBIOS_RT_CONF_VER_6_1_
33 
34 /*===========================================================================*/
39 /*===========================================================================*/
40 
45 #if !defined(CH_CFG_ST_RESOLUTION)
46 #define CH_CFG_ST_RESOLUTION 32
47 #endif
48 
54 #if !defined(CH_CFG_ST_FREQUENCY)
55 #define CH_CFG_ST_FREQUENCY 10000
56 #endif
57 
62 #if !defined(CH_CFG_INTERVALS_SIZE)
63 #define CH_CFG_INTERVALS_SIZE 32
64 #endif
65 
70 #if !defined(CH_CFG_TIME_TYPES_SIZE)
71 #define CH_CFG_TIME_TYPES_SIZE 32
72 #endif
73 
82 #if !defined(CH_CFG_ST_TIMEDELTA)
83 #define CH_CFG_ST_TIMEDELTA 0
84 #endif
85 
88 /*===========================================================================*/
93 /*===========================================================================*/
94 
107 #if !defined(CH_CFG_TIME_QUANTUM)
108 #define CH_CFG_TIME_QUANTUM 10
109 #endif
110 
118 #if !defined(CH_CFG_NO_IDLE_THREAD)
119 #define CH_CFG_NO_IDLE_THREAD FALSE
120 #endif
121 
124 /*===========================================================================*/
129 /*===========================================================================*/
130 
139 #if !defined(CH_CFG_OPTIMIZE_SPEED)
140 #define CH_CFG_OPTIMIZE_SPEED TRUE
141 #endif
142 
145 /*===========================================================================*/
150 /*===========================================================================*/
151 
159 #if !defined(CH_CFG_USE_TM)
160 #define CH_CFG_USE_TM TRUE
161 #endif
162 
169 #if !defined(CH_CFG_USE_REGISTRY)
170 #define CH_CFG_USE_REGISTRY TRUE
171 #endif
172 
180 #if !defined(CH_CFG_USE_WAITEXIT)
181 #define CH_CFG_USE_WAITEXIT TRUE
182 #endif
183 
190 #if !defined(CH_CFG_USE_SEMAPHORES)
191 #define CH_CFG_USE_SEMAPHORES TRUE
192 #endif
193 
203 #if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
204 #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
205 #endif
206 
213 #if !defined(CH_CFG_USE_MUTEXES)
214 #define CH_CFG_USE_MUTEXES TRUE
215 #endif
216 
225 #if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
226 #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
227 #endif
228 
237 #if !defined(CH_CFG_USE_CONDVARS)
238 #define CH_CFG_USE_CONDVARS TRUE
239 #endif
240 
249 #if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
250 #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
251 #endif
252 
259 #if !defined(CH_CFG_USE_EVENTS)
260 #define CH_CFG_USE_EVENTS TRUE
261 #endif
262 
271 #if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
272 #define CH_CFG_USE_EVENTS_TIMEOUT TRUE
273 #endif
274 
282 #if !defined(CH_CFG_USE_MESSAGES)
283 #define CH_CFG_USE_MESSAGES TRUE
284 #endif
285 
295 #if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
296 #define CH_CFG_USE_MESSAGES_PRIORITY FALSE
297 #endif
298 
308 #if !defined(CH_CFG_USE_DYNAMIC)
309 #define CH_CFG_USE_DYNAMIC TRUE
310 #endif
311 
314 /*===========================================================================*/
319 /*===========================================================================*/
320 
329 #if !defined(CH_CFG_USE_MAILBOXES)
330 #define CH_CFG_USE_MAILBOXES TRUE
331 #endif
332 
340 #if !defined(CH_CFG_USE_MEMCORE)
341 #define CH_CFG_USE_MEMCORE TRUE
342 #endif
343 
355 #if !defined(CH_CFG_MEMCORE_SIZE)
356 #define CH_CFG_MEMCORE_SIZE 0
357 #endif
358 
369 #if !defined(CH_CFG_USE_HEAP)
370 #define CH_CFG_USE_HEAP TRUE
371 #endif
372 
380 #if !defined(CH_CFG_USE_MEMPOOLS)
381 #define CH_CFG_USE_MEMPOOLS TRUE
382 #endif
383 
391 #if !defined(CH_CFG_USE_OBJ_FIFOS)
392 #define CH_CFG_USE_OBJ_FIFOS TRUE
393 #endif
394 
402 #if !defined(CH_CFG_USE_PIPES)
403 #define CH_CFG_USE_PIPES TRUE
404 #endif
405 
413 #if !defined(CH_CFG_USE_OBJ_CACHES)
414 #define CH_CFG_USE_OBJ_CACHES TRUE
415 #endif
416 
424 #if !defined(CH_CFG_USE_DELEGATES)
425 #define CH_CFG_USE_DELEGATES TRUE
426 #endif
427 
435 #if !defined(CH_CFG_USE_JOBS)
436 #define CH_CFG_USE_JOBS TRUE
437 #endif
438 
441 /*===========================================================================*/
446 /*===========================================================================*/
447 
455 #if !defined(CH_CFG_USE_FACTORY)
456 #define CH_CFG_USE_FACTORY TRUE
457 #endif
458 
464 #if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
465 #define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
466 #endif
467 
471 #if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
472 #define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
473 #endif
474 
478 #if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
479 #define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
480 #endif
481 
485 #if !defined(CH_CFG_FACTORY_SEMAPHORES)
486 #define CH_CFG_FACTORY_SEMAPHORES TRUE
487 #endif
488 
492 #if !defined(CH_CFG_FACTORY_MAILBOXES)
493 #define CH_CFG_FACTORY_MAILBOXES TRUE
494 #endif
495 
499 #if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
500 #define CH_CFG_FACTORY_OBJ_FIFOS TRUE
501 #endif
502 
506 #if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
507 #define CH_CFG_FACTORY_PIPES TRUE
508 #endif
509 
512 /*===========================================================================*/
517 /*===========================================================================*/
518 
524 #if !defined(CH_DBG_STATISTICS)
525 #define CH_DBG_STATISTICS FALSE
526 #endif
527 
535 #if !defined(CH_DBG_SYSTEM_STATE_CHECK)
536 #define CH_DBG_SYSTEM_STATE_CHECK FALSE
537 #endif
538 
546 #if !defined(CH_DBG_ENABLE_CHECKS)
547 #define CH_DBG_ENABLE_CHECKS FALSE
548 #endif
549 
558 #if !defined(CH_DBG_ENABLE_ASSERTS)
559 #define CH_DBG_ENABLE_ASSERTS FALSE
560 #endif
561 
568 #if !defined(CH_DBG_TRACE_MASK)
569 #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
570 #endif
571 
577 #if !defined(CH_DBG_TRACE_BUFFER_SIZE)
578 #define CH_DBG_TRACE_BUFFER_SIZE 128
579 #endif
580 
591 #if !defined(CH_DBG_ENABLE_STACK_CHECK)
592 #define CH_DBG_ENABLE_STACK_CHECK FALSE
593 #endif
594 
603 #if !defined(CH_DBG_FILL_THREADS)
604 #define CH_DBG_FILL_THREADS FALSE
605 #endif
606 
616 #if !defined(CH_DBG_THREADS_PROFILING)
617 #define CH_DBG_THREADS_PROFILING FALSE
618 #endif
619 
622 /*===========================================================================*/
627 /*===========================================================================*/
628 
633 #define CH_CFG_SYSTEM_EXTRA_FIELDS \
634  /* Add threads custom fields here.*/
635 
641 #define CH_CFG_SYSTEM_INIT_HOOK() { \
642  /* Add threads initialization code here.*/ \
643 }
644 
649 #define CH_CFG_THREAD_EXTRA_FIELDS \
650  /* Add threads custom fields here.*/
651 
659 #define CH_CFG_THREAD_INIT_HOOK(tp) { \
660  /* Add threads initialization code here.*/ \
661 }
662 
667 #define CH_CFG_THREAD_EXIT_HOOK(tp) { \
668  /* Add threads finalization code here.*/ \
669 }
670 
675 #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
676  /* Context switch code here.*/ \
677 }
678 
682 #define CH_CFG_IRQ_PROLOGUE_HOOK() { \
683  /* IRQ prologue code here.*/ \
684 }
685 
689 #define CH_CFG_IRQ_EPILOGUE_HOOK() { \
690  /* IRQ epilogue code here.*/ \
691 }
692 
699 #define CH_CFG_IDLE_ENTER_HOOK() { \
700  /* Idle-enter code here.*/ \
701 }
702 
709 #define CH_CFG_IDLE_LEAVE_HOOK() { \
710  /* Idle-leave code here.*/ \
711 }
712 
717 #define CH_CFG_IDLE_LOOP_HOOK() { \
718  /* Idle loop code here.*/ \
719 }
720 
726 #define CH_CFG_SYSTEM_TICK_HOOK() { \
727  /* System tick event code here.*/ \
728 }
729 
735 #define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
736  /* System halt code here.*/ \
737 }
738 
744 #define CH_CFG_TRACE_HOOK(tep) { \
745  /* Trace code here.*/ \
746 }
747 
751 /*===========================================================================*/
752 /* Port-specific settings (override port settings defaulted in chcore.h). */
753 /*===========================================================================*/
754 
755 
756 
757 #ifndef CORTEX_VTOR_INIT // try to find the correct init address if not defined
758 
759 #if LUFTBOOT // using LUFTBOOT bootloader
760 
761 #if defined(STM32F4)
762 #define CORTEX_VTOR_INIT 0x00004000U
763 #elif defined(STM32F7)
764 #define CORTEX_VTOR_INIT 0x08008000U
765 #else
766 #define CORTEX_VTOR_INIT 0x00002000U
767 #endif
768 
769 #endif // LUFTBOOT
770 
771 #endif // CORTEX_VTOR_INIT
772 
773 // allow float for the ChibiOS print function (used with logger)
774 #define CHPRINTF_USE_FLOAT 1
775 
776 #endif /* CHCONF_H */
777 
c
VIC slots used for the LPC2148 define name e g gps UART1_VIC_SLOT e g modem SPI1_VIC_SLOT SPI1 in mcu_periph spi_arch c or spi_slave_hs_arch c(and some others not using the SPI peripheral yet..) I2C0_VIC_SLOT 8 mcu_periph/i2c_arch.c I2C1_VIC_SLOT 9 mcu_periph/i2c_arch.c USB_VIC_SLOT 10 usb
states
static struct nodeState states[UWB_SERIAL_COMM_DIST_NUM_NODES]
Definition: decawave_anchorless_communication.c:83
b
float b
Definition: wedgebug.c:202
usage
static void usage(BaseSequentialStream *lchp, char *p)
Definition: microrlShell.c:137
modules
VIC slots used for the LPC2148 define name e g gps UART1_VIC_SLOT e g modem SPI1_VIC_SLOT SPI1 in mcu_periph spi_arch c or spi_slave_hs_arch e g telemetry_transparent_usb no explicitly set in imu_b2_v1 MS2100_DRDY_VIC_SLOT ms2100 mag in imu_b2_v1 in modules
Definition: vic_slots.txt:22
s
static uint32_t s
Definition: light_scheduler.c:33
words
static uint16_t words[4]
Definition: baro_MS5534A.c:62
up
uint16_t up[LIGHT_NB]
Definition: light_solar.c:48
foo
uint16_t foo
Definition: main_demo5.c:59
before
uint32_t before
Definition: ctc.c:84
A
#define A
Definition: pprz_geodetic_utm.h:44
f
uint16_t f
Camera baseline, in meters (i.e. horizontal distance between the two cameras of the stereo setup)
Definition: wedgebug.c:204
commands
static const ShellCommand commands[]
Definition: shell_arch.c:71
int32_t
signed long int32_t
Definition: types.h:19
ref
uint16_t ref[TCOUPLE_NB]
Definition: temp_tcouple_adc.c:49
TRUE
#define TRUE
Definition: std.h:4
state
struct State state
Definition: state.c:36