amiro-os / modules / NUCLEO-F103RB / aosconf.h @ 70dd091e
History | View | Annotate | Download (8.298 KB)
1 | f4da707a | Thomas Schöpping | /*
|
---|---|---|---|
2 | AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
|
||
3 | Copyright (C) 2016..2019 Thomas Schöpping et al.
|
||
4 | |||
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
|
||
21 | * @brief AMiRo-OS Configuration file for the NUCLEO-F103RB module.
|
||
22 | * @details Contains the application specific AMiRo-OS settings.
|
||
23 | *
|
||
24 | * @addtogroup NUCLEO-F103RB_aos_config
|
||
25 | * @{
|
||
26 | */
|
||
27 | |||
28 | 6ff06bbf | Thomas Schöpping | #ifndef AOSCONF_H
|
29 | #define AOSCONF_H
|
||
30 | f4da707a | Thomas Schöpping | |
31 | /*
|
||
32 | * compatibility guards
|
||
33 | */
|
||
34 | #define _AMIRO_OS_CFG_
|
||
35 | 7da800ab | Thomas Schöpping | #define AMIRO_OS_CFG_VERSION_MAJOR 2 |
36 | 6a95db23 | Thomas Schöpping | #define AMIRO_OS_CFG_VERSION_MINOR 0 |
37 | f4da707a | Thomas Schöpping | |
38 | #include <stdbool.h> |
||
39 | |||
40 | /*
|
||
41 | * Include an external configuration file to override the following default settings only if required.
|
||
42 | */
|
||
43 | #if defined(AMIRO_APPS) && (AMIRO_APPS == true) |
||
44 | #include <osconf.h> |
||
45 | 7de0cc90 | Thomas Schöpping | #endif /* defined(AMIRO_APPS) && (AMIRO_APPS == true) */ |
46 | f4da707a | Thomas Schöpping | |
47 | /*===========================================================================*/
|
||
48 | /**
|
||
49 | * @name Kernel parameters and options
|
||
50 | * @{
|
||
51 | */
|
||
52 | /*===========================================================================*/
|
||
53 | |||
54 | /**
|
||
55 | * @brief Flag to enable/disable debug API and logic.
|
||
56 | */
|
||
57 | #if !defined(OS_CFG_DBG)
|
||
58 | #define AMIROOS_CFG_DBG true |
||
59 | 7de0cc90 | Thomas Schöpping | #else /* !defined(OS_CFG_DBG) */ |
60 | f4da707a | Thomas Schöpping | #define AMIROOS_CFG_DBG OS_CFG_DBG
|
61 | 7de0cc90 | Thomas Schöpping | #endif /* !defined(OS_CFG_DBG) */ |
62 | f4da707a | Thomas Schöpping | |
63 | /**
|
||
64 | * @brief Flag to enable/disable unit tests.
|
||
65 | * @note Setting this flag will implicitely enable the shell.
|
||
66 | */
|
||
67 | #if !defined(OS_CFG_TESTS_ENABLE)
|
||
68 | #define AMIROOS_CFG_TESTS_ENABLE true |
||
69 | 7de0cc90 | Thomas Schöpping | #else /* !defined(OS_CFG_TESTS_ENABLE) */ |
70 | f4da707a | Thomas Schöpping | #define AMIROOS_CFG_TESTS_ENABLE OS_CFG_TESTS_ENABLE
|
71 | 7de0cc90 | Thomas Schöpping | #endif /* !defined(OS_CFG_TESTS_ENABLE) */ |
72 | f4da707a | Thomas Schöpping | |
73 | /**
|
||
74 | * @brief Flag to enable/disable profiling API and logic.
|
||
75 | */
|
||
76 | #if !defined(OS_CFG_PROFILE)
|
||
77 | #define AMIROOS_CFG_PROFILE true |
||
78 | 7de0cc90 | Thomas Schöpping | #else /* !defined(OS_CFG_PROFILE) */ |
79 | f4da707a | Thomas Schöpping | #define AMIROOS_CFG_PROFILE OS_CFG_PROFILE
|
80 | 7de0cc90 | Thomas Schöpping | #endif /* !defined(OS_CFG_PROFILE) */ |
81 | f4da707a | Thomas Schöpping | |
82 | /**
|
||
83 | * @brief Mask for the control thread to listen to certain IO events.
|
||
84 | * @note Any mandatory events (e.g. for SSSP) are enabled implicitely despite this configuration.
|
||
85 | */
|
||
86 | #if !defined(OS_CFG_MAIN_LOOP_IOEVENT_MASK)
|
||
87 | 8d4d058e | Cung Sang | #define AMIROOS_CFG_MAIN_LOOP_IOEVENT_MASK (MODULE_OS_IOEVENTFLAGS_DW1000_IRQn | MODULE_OS_IOEVENTFLAGS_USERBUTTON)
|
88 | // #define AMIROOS_CFG_MAIN_LOOP_IOEVENT_MASK MODULE_OS_IOEVENTFLAGS_USERBUTTON
|
||
89 | 7de0cc90 | Thomas Schöpping | #else /* !defined(OS_CFG_MAIN_LOOP_IOEVENT_MASK) */ |
90 | f4da707a | Thomas Schöpping | #define AMIROOS_CFG_MAIN_LOOP_IOEVENT_MASK OS_CFG_MAIN_LOOP_IOEVENT_MASK
|
91 | 7de0cc90 | Thomas Schöpping | #endif /* !defined(OS_CFG_MAIN_LOOP_IOEVENT_MASK) */ |
92 | f4da707a | Thomas Schöpping | |
93 | /**
|
||
94 | * @brief Timeout value when waiting for events in the main loop in microseconds.
|
||
95 | * @details A value of 0 deactivates the timeout.
|
||
96 | */
|
||
97 | #if !defined(OS_CFG_MAIN_LOOP_TIMEOUT)
|
||
98 | #define AMIROOS_CFG_MAIN_LOOP_TIMEOUT 0 |
||
99 | 7de0cc90 | Thomas Schöpping | #else /* !defined(OS_CFG_MAIN_LOOP_TIMEOUT) */ |
100 | f4da707a | Thomas Schöpping | #define AMIROOS_CFG_MAIN_LOOP_TIMEOUT OS_CFG_MAIN_LOOP_TIMEOUT
|
101 | 7de0cc90 | Thomas Schöpping | #endif /* !defined(OS_CFG_MAIN_LOOP_TIMEOUT) */ |
102 | f4da707a | Thomas Schöpping | |
103 | /** @} */
|
||
104 | |||
105 | /*===========================================================================*/
|
||
106 | /**
|
||
107 | * @name SSSP (Startup Shutdown Synchronization Protocol) configuration.
|
||
108 | * @{
|
||
109 | */
|
||
110 | /*===========================================================================*/
|
||
111 | |||
112 | /**
|
||
113 | * @brief Flag to enable SSSP.
|
||
114 | */
|
||
115 | #if !defined(OS_CFG_SSSP_ENABLE)
|
||
116 | #define AMIROOS_CFG_SSSP_ENABLE false |
||
117 | 7de0cc90 | Thomas Schöpping | #else /* !defined(OS_CFG_SSSP_ENABLE) */ |
118 | f4da707a | Thomas Schöpping | #define AMIROOS_CFG_SSSP_ENABLE OS_CFG_SSSP_ENABLE
|
119 | 7de0cc90 | Thomas Schöpping | #endif /* !defined(OS_CFG_SSSP_ENABLE) */ |
120 | f4da707a | Thomas Schöpping | |
121 | /**
|
||
122 | * @brief Flag to set the module as SSSP master.
|
||
123 | * @details There must be only one module with this flag set to true in a system.
|
||
124 | */
|
||
125 | #if !defined(OS_CFG_SSSP_MASTER)
|
||
126 | #define AMIROOS_CFG_SSSP_MASTER false |
||
127 | 7de0cc90 | Thomas Schöpping | #else /* !defined(OS_CFG_SSSP_MASTER) */ |
128 | f4da707a | Thomas Schöpping | #define AMIROOS_CFG_SSSP_MASTER OS_CFG_SSSP_MASTER
|
129 | 7de0cc90 | Thomas Schöpping | #endif /* !defined(OS_CFG_SSSP_MASTER) */ |
130 | f4da707a | Thomas Schöpping | |
131 | /**
|
||
132 | * @brief Flag to set the module to be the first in the stack.
|
||
133 | * @details There must be only one module with this flag set to true in a system.
|
||
134 | */
|
||
135 | #if !defined(OS_CFG_SSSP_STACK_START)
|
||
136 | #define AMIROOS_CFG_SSSP_STACK_START false |
||
137 | 7de0cc90 | Thomas Schöpping | #else /* !defined(OS_CFG_SSSP_STACK_START) */ |
138 | f4da707a | Thomas Schöpping | #define AMIROOS_CFG_SSSP_STACK_START OS_CFG_SSSP_STACK_START
|
139 | 7de0cc90 | Thomas Schöpping | #endif /* !defined(OS_CFG_SSSP_STACK_START) */ |
140 | f4da707a | Thomas Schöpping | |
141 | /**
|
||
142 | * @brief Flag to set the module to be the last in the stack.
|
||
143 | * @details There must be only one module with this flag set to true in a system.
|
||
144 | */
|
||
145 | #if !defined(OS_CFG_SSSP_STACK_END)
|
||
146 | #define AMIROOS_CFG_SSSP_STACK_END false |
||
147 | 7de0cc90 | Thomas Schöpping | #else /* !defined(OS_CFG_SSSP_STACK_END) */ |
148 | f4da707a | Thomas Schöpping | #define AMIROOS_CFG_SSSP_STACK_END OS_CFG_SSSP_STACK_END
|
149 | 7de0cc90 | Thomas Schöpping | #endif /* !defined(OS_CFG_SSSP_STACK_END) */ |
150 | f4da707a | Thomas Schöpping | |
151 | /**
|
||
152 | * @brief Delay time (in microseconds) how long a SSSP signal must be active.
|
||
153 | */
|
||
154 | #if !defined(OS_CFG_SSSP_SIGNALDELAY)
|
||
155 | #define AMIROOS_CFG_SSSP_SIGNALDELAY 1000 |
||
156 | 7de0cc90 | Thomas Schöpping | #else /* !defined(OS_CFG_SSSP_SIGNALDELAY) */ |
157 | f4da707a | Thomas Schöpping | #define AMIROOS_CFG_SSSP_SIGNALDELAY OS_CFG_SSSP_SIGNALDELAY
|
158 | 7de0cc90 | Thomas Schöpping | #endif /* !defined(OS_CFG_SSSP_SIGNALDELAY) */ |
159 | f4da707a | Thomas Schöpping | |
160 | /**
|
||
161 | * @brief Time boundary for robot wide clock synchronization in microseconds.
|
||
162 | * @details Whenever the SSSP S (snychronization) signal gets logically deactivated,
|
||
163 | * All modules need to align their local uptime to the nearest multiple of this value.
|
||
164 | */
|
||
165 | #if !defined(OS_CFG_SSSP_SYSSYNCPERIOD)
|
||
166 | #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD 1000000 |
||
167 | 7de0cc90 | Thomas Schöpping | #else /* !defined(OS_CFG_SSSP_SYSSYNCPERIOD) */ |
168 | f4da707a | Thomas Schöpping | #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD OS_CFG_SSSP_SYSSYNCPERIOD
|
169 | 7de0cc90 | Thomas Schöpping | #endif /* !defined(OS_CFG_SSSP_SYSSYNCPERIOD) */ |
170 | f4da707a | Thomas Schöpping | |
171 | /** @} */
|
||
172 | |||
173 | /*===========================================================================*/
|
||
174 | /**
|
||
175 | * @name System shell options
|
||
176 | * @{
|
||
177 | */
|
||
178 | /*===========================================================================*/
|
||
179 | |||
180 | /**
|
||
181 | * @brief Shell enable flag.
|
||
182 | */
|
||
183 | #if !defined(OS_CFG_SHELL_ENABLE)
|
||
184 | #define AMIROOS_CFG_SHELL_ENABLE true |
||
185 | 7de0cc90 | Thomas Schöpping | #else /* !defined(OS_CFG_SHELL_ENABLE) */ |
186 | f4da707a | Thomas Schöpping | #define AMIROOS_CFG_SHELL_ENABLE OS_CFG_SHELL_ENABLE
|
187 | 7de0cc90 | Thomas Schöpping | #endif /* !defined(OS_CFG_SHELL_ENABLE) */ |
188 | f4da707a | Thomas Schöpping | |
189 | /**
|
||
190 | * @brief Shell thread stack size.
|
||
191 | */
|
||
192 | #if !defined(OS_CFG_SHELL_STACKSIZE)
|
||
193 | #define AMIROOS_CFG_SHELL_STACKSIZE 1024 |
||
194 | 7de0cc90 | Thomas Schöpping | #else /* !defined(OS_CFG_SHELL_STACKSIZE) */ |
195 | f4da707a | Thomas Schöpping | #define AMIROOS_CFG_SHELL_STACKSIZE OS_CFG_SHELL_STACKSIZE
|
196 | 7de0cc90 | Thomas Schöpping | #endif /* !defined(OS_CFG_SHELL_STACKSIZE) */ |
197 | f4da707a | Thomas Schöpping | |
198 | /**
|
||
199 | * @brief Shell thread priority.
|
||
200 | * @details Thread priorities are specified as an integer value.
|
||
201 | * Predefined ranges are:
|
||
202 | * lowest ┌ THD_LOWPRIO_MIN
|
||
203 | * │ ...
|
||
204 | * └ THD_LOWPRIO_MAX
|
||
205 | * ┌ THD_NORMALPRIO_MIN
|
||
206 | * │ ...
|
||
207 | * └ THD_NORMALPRIO_MAX
|
||
208 | * ┌ THD_HIGHPRIO_MIN
|
||
209 | * │ ...
|
||
210 | * └ THD_HIGHPRIO_MAX
|
||
211 | * ┌ THD_RTPRIO_MIN
|
||
212 | * │ ...
|
||
213 | * highest └ THD_RTPRIO_MAX
|
||
214 | */
|
||
215 | #if !defined(OS_CFG_SHELL_THREADPRIO)
|
||
216 | #define AMIROOS_CFG_SHELL_THREADPRIO AOS_THD_NORMALPRIO_MIN
|
||
217 | 7de0cc90 | Thomas Schöpping | #else /* !defined(OS_CFG_SHELL_THREADPRIO) */ |
218 | f4da707a | Thomas Schöpping | #define AMIROOS_CFG_SHELL_THREADPRIO OS_CFG_SHELL_THREADPRIO
|
219 | 7de0cc90 | Thomas Schöpping | #endif /* !defined(OS_CFG_SHELL_THREADPRIO) */ |
220 | f4da707a | Thomas Schöpping | |
221 | /**
|
||
222 | * @brief Shell maximum input line length.
|
||
223 | */
|
||
224 | #if !defined(OS_CFG_SHELL_LINEWIDTH)
|
||
225 | cc33217b | Thomas Schöpping | #define AMIROOS_CFG_SHELL_LINEWIDTH 80 |
226 | 7de0cc90 | Thomas Schöpping | #else /* !defined(OS_CFG_SHELL_LINEWIDTH) */ |
227 | f4da707a | Thomas Schöpping | #define AMIROOS_CFG_SHELL_LINEWIDTH OS_CFG_SHELL_LINEWIDTH
|
228 | 7de0cc90 | Thomas Schöpping | #endif /* !defined(OS_CFG_SHELL_LINEWIDTH) */ |
229 | f4da707a | Thomas Schöpping | |
230 | /**
|
||
231 | * @brief Shell maximum number of arguments.
|
||
232 | */
|
||
233 | #if !defined(OS_CFG_SHELL_MAXARGS)
|
||
234 | cc33217b | Thomas Schöpping | #define AMIROOS_CFG_SHELL_MAXARGS 8 |
235 | 7de0cc90 | Thomas Schöpping | #else /* !defined(OS_CFG_SHELL_MAXARGS) */ |
236 | f4da707a | Thomas Schöpping | #define AMIROOS_CFG_SHELL_MAXARGS OS_CFG_SHELL_MAXARGS
|
237 | 7de0cc90 | Thomas Schöpping | #endif /* !defined(OS_CFG_SHELL_MAXARGS) */ |
238 | f4da707a | Thomas Schöpping | |
239 | /** @} */
|
||
240 | |||
241 | 6ff06bbf | Thomas Schöpping | #endif /* AOSCONF_H */ |
242 | f4da707a | Thomas Schöpping | |
243 | /** @} */ |