amiro-os / modules / aos_chconf.h @ 243fb4e2
History | View | Annotate | Download (22.253 KB)
1 | 043cdf33 | Thomas Schöpping | /*
|
---|---|---|---|
2 | AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
|
||
3 | 84f0ce9e | Thomas Schöpping | Copyright (C) 2016..2019 Thomas Schöpping et al.
|
4 | 043cdf33 | Thomas Schöpping | |
5 | This program is free software: you can redistribute it and/or modify
|
||
6 | it under the terms of the GNU General Public License as published by
|
||
7 | the Free Software Foundation, either version 3 of the License, or
|
||
8 | (at your option) any later version.
|
||
9 | |||
10 | This program 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 os/modules/common/chconf.h
|
||
21 | * @brief Common ChibiOS Configuration file for the all modules.
|
||
22 | * @details Contains the application specific kernel settings.
|
||
23 | *
|
||
24 | * @addtogroup config
|
||
25 | * @details Kernel related settings and hooks.
|
||
26 | * @{
|
||
27 | */
|
||
28 | |||
29 | 6ff06bbf | Thomas Schöpping | #ifndef AOS_CHCONF_H
|
30 | #define AOS_CHCONF_H
|
||
31 | 043cdf33 | Thomas Schöpping | |
32 | #define _CHIBIOS_RT_CONF_
|
||
33 | 732a4657 | Thomas Schöpping | #define _CHIBIOS_RT_CONF_VER_6_0_
|
34 | 043cdf33 | Thomas Schöpping | |
35 | /*===========================================================================*/
|
||
36 | /**
|
||
37 | * @name System timers settings
|
||
38 | 1e5f7648 | Thomas Schöpping | * @{
|
39 | 043cdf33 | Thomas Schöpping | */
|
40 | /*===========================================================================*/
|
||
41 | |||
42 | 1e5f7648 | Thomas Schöpping | /**
|
43 | * @brief System tick frequency.
|
||
44 | * @details Frequency of the system timer that drives the system ticks. This
|
||
45 | * setting also defines the system tick time unit.
|
||
46 | */
|
||
47 | #if !defined(CH_CFG_ST_FREQUENCY)
|
||
48 | #define CH_CFG_ST_FREQUENCY 1000000UL |
||
49 | #endif
|
||
50 | |||
51 | /**
|
||
52 | * @brief Time intervals data size.
|
||
53 | * @note Allowed values are 16, 32 or 64 bits.
|
||
54 | */
|
||
55 | #if !defined(CH_CFG_INTERVALS_SIZE)
|
||
56 | #define CH_CFG_INTERVALS_SIZE 32 |
||
57 | #endif
|
||
58 | |||
59 | /**
|
||
60 | * @brief Time types data size.
|
||
61 | * @note Allowed values are 16 or 32 bits.
|
||
62 | */
|
||
63 | #if !defined(CH_CFG_TIME_TYPES_SIZE)
|
||
64 | #define CH_CFG_TIME_TYPES_SIZE 32 |
||
65 | #endif
|
||
66 | |||
67 | /**
|
||
68 | * @brief Time delta constant for the tick-less mode.
|
||
69 | * @note If this value is zero then the system uses the classic
|
||
70 | * periodic tick. This value represents the minimum number
|
||
71 | * of ticks that is safe to specify in a timeout directive.
|
||
72 | * The value one is not valid, timeouts are rounded up to
|
||
73 | * this value.
|
||
74 | */
|
||
75 | #if !defined(CH_CFG_ST_TIMEDELTA)
|
||
76 | 91bdafd4 | Thomas Schöpping | #define CH_CFG_ST_TIMEDELTA 1000 |
77 | 1e5f7648 | Thomas Schöpping | #endif
|
78 | |||
79 | /** @} */
|
||
80 | 043cdf33 | Thomas Schöpping | |
81 | /*===========================================================================*/
|
||
82 | /**
|
||
83 | * @name Kernel parameters and options
|
||
84 | * @{
|
||
85 | */
|
||
86 | /*===========================================================================*/
|
||
87 | |||
88 | /**
|
||
89 | * @brief Round robin interval.
|
||
90 | * @details This constant is the number of system ticks allowed for the
|
||
91 | * threads before preemption occurs. Setting this value to zero
|
||
92 | * disables the preemption for threads with equal priority and the
|
||
93 | * round robin becomes cooperative. Note that higher priority
|
||
94 | * threads can still preempt, the kernel is always preemptive.
|
||
95 | * @note Disabling the round robin preemption makes the kernel more compact
|
||
96 | * and generally faster.
|
||
97 | * @note The round robin preemption is not supported in tickless mode and
|
||
98 | * must be set to zero in that case.
|
||
99 | */
|
||
100 | 732a4657 | Thomas Schöpping | #if !defined(CH_CFG_TIME_QUANTUM)
|
101 | 043cdf33 | Thomas Schöpping | #define CH_CFG_TIME_QUANTUM 0 |
102 | 732a4657 | Thomas Schöpping | #endif
|
103 | 043cdf33 | Thomas Schöpping | |
104 | /**
|
||
105 | * @brief Managed RAM size.
|
||
106 | * @details Size of the RAM area to be managed by the OS. If set to zero
|
||
107 | * then the whole available RAM is used. The core memory is made
|
||
108 | * available to the heap allocator and/or can be used directly through
|
||
109 | * the simplified core memory allocator.
|
||
110 | *
|
||
111 | * @note In order to let the OS manage the whole RAM the linker script must
|
||
112 | * provide the @p __heap_base__ and @p __heap_end__ symbols.
|
||
113 | * @note Requires @p CH_CFG_USE_MEMCORE.
|
||
114 | */
|
||
115 | 732a4657 | Thomas Schöpping | #if !defined(CH_CFG_MEMCORE_SIZE)
|
116 | 043cdf33 | Thomas Schöpping | #define CH_CFG_MEMCORE_SIZE 0 |
117 | 732a4657 | Thomas Schöpping | #endif
|
118 | 043cdf33 | Thomas Schöpping | |
119 | /**
|
||
120 | * @brief Idle thread automatic spawn suppression.
|
||
121 | * @details When this option is activated the function @p chSysInit()
|
||
122 | * does not spawn the idle thread. The application @p main()
|
||
123 | * function becomes the idle thread and must implement an
|
||
124 | * infinite loop.
|
||
125 | */
|
||
126 | 732a4657 | Thomas Schöpping | #if !defined(CH_CFG_NO_IDLE_THREAD)
|
127 | 043cdf33 | Thomas Schöpping | #define CH_CFG_NO_IDLE_THREAD FALSE
|
128 | 732a4657 | Thomas Schöpping | #endif
|
129 | 043cdf33 | Thomas Schöpping | |
130 | /** @} */
|
||
131 | |||
132 | /*===========================================================================*/
|
||
133 | /**
|
||
134 | * @name Performance options
|
||
135 | * @{
|
||
136 | */
|
||
137 | /*===========================================================================*/
|
||
138 | |||
139 | /**
|
||
140 | * @brief OS optimization.
|
||
141 | * @details If enabled then time efficient rather than space efficient code
|
||
142 | * is used when two possible implementations exist.
|
||
143 | *
|
||
144 | * @note This is not related to the compiler optimization options.
|
||
145 | * @note The default is @p TRUE.
|
||
146 | */
|
||
147 | 732a4657 | Thomas Schöpping | #if !defined(CH_CFG_OPTIMIZE_SPEED)
|
148 | 043cdf33 | Thomas Schöpping | #define CH_CFG_OPTIMIZE_SPEED TRUE
|
149 | 732a4657 | Thomas Schöpping | #endif
|
150 | 043cdf33 | Thomas Schöpping | |
151 | /** @} */
|
||
152 | |||
153 | /*===========================================================================*/
|
||
154 | /**
|
||
155 | * @name Subsystem options
|
||
156 | * @{
|
||
157 | */
|
||
158 | /*===========================================================================*/
|
||
159 | |||
160 | /**
|
||
161 | * @brief Time Measurement APIs.
|
||
162 | * @details If enabled then the time measurement APIs are included in
|
||
163 | * the kernel.
|
||
164 | *
|
||
165 | * @note The default is @p TRUE.
|
||
166 | */
|
||
167 | 732a4657 | Thomas Schöpping | #if !defined(CH_CFG_USE_TM)
|
168 | 043cdf33 | Thomas Schöpping | #define CH_CFG_USE_TM TRUE
|
169 | 732a4657 | Thomas Schöpping | #endif
|
170 | 043cdf33 | Thomas Schöpping | |
171 | /**
|
||
172 | * @brief Threads registry APIs.
|
||
173 | * @details If enabled then the registry APIs are included in the kernel.
|
||
174 | *
|
||
175 | * @note The default is @p TRUE.
|
||
176 | */
|
||
177 | 732a4657 | Thomas Schöpping | #if !defined(CH_CFG_USE_REGISTRY)
|
178 | 043cdf33 | Thomas Schöpping | #define CH_CFG_USE_REGISTRY FALSE
|
179 | 732a4657 | Thomas Schöpping | #endif
|
180 | 043cdf33 | Thomas Schöpping | |
181 | /**
|
||
182 | 0a89baf2 | Thomas Schöpping | * @brief Thread hierarchy APIs.
|
183 | * @details Id enabled then the thread hierarchy APIs are included in the kernel.
|
||
184 | *
|
||
185 | * @note The default is @p FALSE.
|
||
186 | */
|
||
187 | 732a4657 | Thomas Schöpping | #if !defined(CH_CFG_USE_THREADHIERARCHY)
|
188 | 0a89baf2 | Thomas Schöpping | #define CH_CFG_USE_THREADHIERARCHY TRUE
|
189 | 732a4657 | Thomas Schöpping | #endif
|
190 | 0a89baf2 | Thomas Schöpping | |
191 | /**
|
||
192 | * @brief Enable ordering of child lists.
|
||
193 | * @details Children will be ordered by their priority (descending).
|
||
194 | * If sibliblings have identical priority, they are ordered by age (descending).
|
||
195 | */
|
||
196 | 732a4657 | Thomas Schöpping | #if !defined(CH_CFG_THREADHIERARCHY_ORDERED)
|
197 | 0a89baf2 | Thomas Schöpping | #define CH_CFG_THREADHIERARCHY_ORDERED TRUE
|
198 | 732a4657 | Thomas Schöpping | #endif
|
199 | 0a89baf2 | Thomas Schöpping | |
200 | /**
|
||
201 | 043cdf33 | Thomas Schöpping | * @brief Threads synchronization APIs.
|
202 | * @details If enabled then the @p chThdWait() function is included in
|
||
203 | * the kernel.
|
||
204 | *
|
||
205 | * @note The default is @p TRUE.
|
||
206 | */
|
||
207 | 732a4657 | Thomas Schöpping | #if !defined(CH_CFG_USE_WAITEXIT)
|
208 | 043cdf33 | Thomas Schöpping | #define CH_CFG_USE_WAITEXIT TRUE
|
209 | 732a4657 | Thomas Schöpping | #endif
|
210 | 043cdf33 | Thomas Schöpping | |
211 | /**
|
||
212 | * @brief Semaphores APIs.
|
||
213 | * @details If enabled then the Semaphores APIs are included in the kernel.
|
||
214 | *
|
||
215 | * @note The default is @p TRUE.
|
||
216 | */
|
||
217 | 732a4657 | Thomas Schöpping | #if !defined(CH_CFG_USE_SEMAPHORES)
|
218 | 043cdf33 | Thomas Schöpping | #define CH_CFG_USE_SEMAPHORES TRUE
|
219 | 732a4657 | Thomas Schöpping | #endif
|
220 | 043cdf33 | Thomas Schöpping | |
221 | /**
|
||
222 | * @brief Semaphores queuing mode.
|
||
223 |