Statistics
| Branch: | Tag: | Revision:

amiro-os / modules / NUCLEO-L476RG / aosconf.h @ 00843891

History | View | Annotate | Download (8.18 KB)

1 27d0378b Simon Welzel
/*
2
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
3 8543d0d9 Thomas Schöpping
Copyright (C) 2016..2019  Thomas Schöpping et al.
4 27d0378b Simon Welzel

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 8543d0d9 Thomas Schöpping
 * @file
21 126ace3c Thomas Schöpping
 * @brief   AMiRo-OS Configuration file for the NUCLEO-L476RG module.
22 27d0378b Simon Welzel
 * @details Contains the application specific AMiRo-OS settings.
23
 *
24 126ace3c Thomas Schöpping
 * @addtogroup NUCLEO-L476RG_aos_config
25 27d0378b Simon Welzel
 * @{
26
 */
27
28 6ff06bbf Thomas Schöpping
#ifndef AOSCONF_H
29
#define AOSCONF_H
30 27d0378b Simon Welzel
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 27d0378b Simon Welzel
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 27d0378b Simon Welzel
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 27d0378b Simon Welzel
  #define AMIROOS_CFG_DBG                       OS_CFG_DBG
61 7de0cc90 Thomas Schöpping
#endif /* !defined(OS_CFG_DBG) */
62 27d0378b Simon Welzel
63
/**
64
 * @brief   Flag to enable/disable unit tests.
65 8543d0d9 Thomas Schöpping
 * @note    Setting this flag will implicitely enable the shell.
66 27d0378b Simon Welzel
 */
67
#if !defined(OS_CFG_TESTS_ENABLE)
68 a0301104 Thomas Schöpping
  #define AMIROOS_CFG_TESTS_ENABLE              true
69 7de0cc90 Thomas Schöpping
#else /* !defined(OS_CFG_TESTS_ENABLE) */
70 27d0378b Simon Welzel
  #define AMIROOS_CFG_TESTS_ENABLE              OS_CFG_TESTS_ENABLE
71 7de0cc90 Thomas Schöpping
#endif /* !defined(OS_CFG_TESTS_ENABLE) */
72 27d0378b Simon Welzel
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 27d0378b Simon Welzel
  #define AMIROOS_CFG_PROFILE                   OS_CFG_PROFILE
80 7de0cc90 Thomas Schöpping
#endif /* !defined(OS_CFG_PROFILE) */
81 27d0378b Simon Welzel
82
/**
83 8543d0d9 Thomas Schöpping
 * @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
  #define AMIROOS_CFG_MAIN_LOOP_IOEVENT_MASK    MODULE_OS_IOEVENTFLAGS_USERBUTTON
88 7de0cc90 Thomas Schöpping
#else /* !defined(OS_CFG_MAIN_LOOP_IOEVENT_MASK) */
89 8543d0d9 Thomas Schöpping
  #define AMIROOS_CFG_MAIN_LOOP_IOEVENT_MASK    OS_CFG_MAIN_LOOP_IOEVENT_MASK
90 7de0cc90 Thomas Schöpping
#endif /* !defined(OS_CFG_MAIN_LOOP_IOEVENT_MASK) */
91 8543d0d9 Thomas Schöpping
92
/**
93 27d0378b Simon Welzel
 * @brief   Timeout value when waiting for events in the main loop in microseconds.
94
 * @details A value of 0 deactivates the timeout.
95
 */
96
#if !defined(OS_CFG_MAIN_LOOP_TIMEOUT)
97
  #define AMIROOS_CFG_MAIN_LOOP_TIMEOUT         0
98 7de0cc90 Thomas Schöpping
#else /* !defined(OS_CFG_MAIN_LOOP_TIMEOUT) */
99 27d0378b Simon Welzel
  #define AMIROOS_CFG_MAIN_LOOP_TIMEOUT         OS_CFG_MAIN_LOOP_TIMEOUT
100 7de0cc90 Thomas Schöpping
#endif /* !defined(OS_CFG_MAIN_LOOP_TIMEOUT) */
101 27d0378b Simon Welzel
102
/** @} */
103
104
/*===========================================================================*/
105
/**
106
 * @name SSSP (Startup Shutdown Synchronization Protocol) configuration.
107
 * @{
108
 */
109
/*===========================================================================*/
110
111
/**
112
 * @brief   Flag to enable SSSP.
113
 */
114
#if !defined(OS_CFG_SSSP_ENABLE)
115 960338cc Simon Welzel
  #define AMIROOS_CFG_SSSP_ENABLE               false
116 7de0cc90 Thomas Schöpping
#else /* !defined(OS_CFG_SSSP_ENABLE) */
117 27d0378b Simon Welzel
  #define AMIROOS_CFG_SSSP_ENABLE               OS_CFG_SSSP_ENABLE
118 7de0cc90 Thomas Schöpping
#endif /* !defined(OS_CFG_SSSP_ENABLE) */
119 27d0378b Simon Welzel
120
/**
121
 * @brief   Flag to set the module as SSSP master.
122
 * @details There must be only one module with this flag set to true in a system.
123
 */
124
#if !defined(OS_CFG_SSSP_MASTER)
125 8543d0d9 Thomas Schöpping
  #define AMIROOS_CFG_SSSP_MASTER               false
126 7de0cc90 Thomas Schöpping
#else /* !defined(OS_CFG_SSSP_MASTER) */
127 27d0378b Simon Welzel
  #define AMIROOS_CFG_SSSP_MASTER               OS_CFG_SSSP_MASTER
128 7de0cc90 Thomas Schöpping
#endif /* !defined(OS_CFG_SSSP_MASTER) */
129 27d0378b Simon Welzel
130
/**
131
 * @brief   Flag to set the module to be the first in the stack.
132
 * @details There must be only one module with this flag set to true in a system.
133
 */
134
#if !defined(OS_CFG_SSSP_STACK_START)
135 8543d0d9 Thomas Schöpping
  #define AMIROOS_CFG_SSSP_STACK_START          false
136 7de0cc90 Thomas Schöpping
#else /* !defined(OS_CFG_SSSP_STACK_START) */
137 27d0378b Simon Welzel
  #define AMIROOS_CFG_SSSP_STACK_START          OS_CFG_SSSP_STACK_START
138 7de0cc90 Thomas Schöpping
#endif /* !defined(OS_CFG_SSSP_STACK_START) */
139 27d0378b Simon Welzel
140
/**
141
 * @brief   Flag to set the module to be the last in the stack.
142
 * @details There must be only one module with this flag set to true in a system.
143
 */
144
#if !defined(OS_CFG_SSSP_STACK_END)
145 8543d0d9 Thomas Schöpping
  #define AMIROOS_CFG_SSSP_STACK_END            false
146 7de0cc90 Thomas Schöpping
#else /* !defined(OS_CFG_SSSP_STACK_END) */
147 27d0378b Simon Welzel
  #define AMIROOS_CFG_SSSP_STACK_END            OS_CFG_SSSP_STACK_END
148 7de0cc90 Thomas Schöpping
#endif /* !defined(OS_CFG_SSSP_STACK_END) */
149 27d0378b Simon Welzel
150
/**
151
 * @brief   Delay time (in microseconds) how long a SSSP signal must be active.
152
 */
153
#if !defined(OS_CFG_SSSP_SIGNALDELAY)
154
  #define AMIROOS_CFG_SSSP_SIGNALDELAY          1000
155 7de0cc90 Thomas Schöpping
#else /* !defined(OS_CFG_SSSP_SIGNALDELAY) */
156 27d0378b Simon Welzel
  #define AMIROOS_CFG_SSSP_SIGNALDELAY          OS_CFG_SSSP_SIGNALDELAY
157 7de0cc90 Thomas Schöpping
#endif /* !defined(OS_CFG_SSSP_SIGNALDELAY) */
158 27d0378b Simon Welzel
159
/**
160
 * @brief   Time boundary for robot wide clock synchronization in microseconds.
161
 * @details Whenever the SSSP S (snychronization) signal gets logically deactivated,
162
 *          All modules need to align their local uptime to the nearest multiple of this value.
163
 */
164
#if !defined(OS_CFG_SSSP_SYSSYNCPERIOD)
165
  #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD        1000000
166 7de0cc90 Thomas Schöpping
#else /* !defined(OS_CFG_SSSP_SYSSYNCPERIOD) */
167 27d0378b Simon Welzel
  #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD        OS_CFG_SSSP_SYSSYNCPERIOD
168 7de0cc90 Thomas Schöpping
#endif /* !defined(OS_CFG_SSSP_SYSSYNCPERIOD) */
169 27d0378b Simon Welzel
170
/** @} */
171
172
/*===========================================================================*/
173
/**
174
 * @name System shell options
175
 * @{
176
 */
177
/*===========================================================================*/
178
179
/**
180
 * @brief   Shell enable flag.
181
 */
182 8543d0d9 Thomas Schöpping
#if !defined(OS_CFG_SHELL_ENABLE)
183 27d0378b Simon Welzel
  #define AMIROOS_CFG_SHELL_ENABLE              true
184 7de0cc90 Thomas Schöpping
#else /* !defined(OS_CFG_SHELL_ENABLE) */
185 27d0378b Simon Welzel
  #define AMIROOS_CFG_SHELL_ENABLE              OS_CFG_SHELL_ENABLE
186 7de0cc90 Thomas Schöpping
#endif /* !defined(OS_CFG_SHELL_ENABLE) */
187 27d0378b Simon Welzel
188
/**
189
 * @brief   Shell thread stack size.
190
 */
191
#if !defined(OS_CFG_SHELL_STACKSIZE)
192
  #define AMIROOS_CFG_SHELL_STACKSIZE           1024
193 7de0cc90 Thomas Schöpping
#else /* !defined(OS_CFG_SHELL_STACKSIZE) */
194 27d0378b Simon Welzel
  #define AMIROOS_CFG_SHELL_STACKSIZE           OS_CFG_SHELL_STACKSIZE
195 7de0cc90 Thomas Schöpping
#endif /* !defined(OS_CFG_SHELL_STACKSIZE) */
196 27d0378b Simon Welzel
197
/**
198
 * @brief   Shell thread priority.
199
 * @details Thread priorities are specified as an integer value.
200
 *          Predefined ranges are:
201
 *            lowest  ┌ THD_LOWPRIO_MIN
202
 *                    │ ...
203
 *                    └ THD_LOWPRIO_MAX
204
 *                    ┌ THD_NORMALPRIO_MIN
205
 *                    │ ...
206
 *                    └ THD_NORMALPRIO_MAX
207
 *                    ┌ THD_HIGHPRIO_MIN
208
 *                    │ ...
209
 *                    └ THD_HIGHPRIO_MAX
210
 *                    ┌ THD_RTPRIO_MIN
211
 *                    │ ...
212
 *            highest └ THD_RTPRIO_MAX
213
 */
214
#if !defined(OS_CFG_SHELL_THREADPRIO)
215
  #define AMIROOS_CFG_SHELL_THREADPRIO          AOS_THD_NORMALPRIO_MIN
216 7de0cc90 Thomas Schöpping
#else /* !defined(OS_CFG_SHELL_THREADPRIO) */
217 27d0378b Simon Welzel
  #define AMIROOS_CFG_SHELL_THREADPRIO          OS_CFG_SHELL_THREADPRIO
218 7de0cc90 Thomas Schöpping
#endif /* !defined(OS_CFG_SHELL_THREADPRIO) */
219 27d0378b Simon Welzel
220
/**
221
 * @brief   Shell maximum input line length.
222
 */
223
#if !defined(OS_CFG_SHELL_LINEWIDTH)
224 b0ede265 Thomas Schöpping
  #define AMIROOS_CFG_SHELL_LINEWIDTH           128
225 7de0cc90 Thomas Schöpping
#else /* !defined(OS_CFG_SHELL_LINEWIDTH) */
226 27d0378b Simon Welzel
  #define AMIROOS_CFG_SHELL_LINEWIDTH           OS_CFG_SHELL_LINEWIDTH
227 7de0cc90 Thomas Schöpping
#endif /* !defined(OS_CFG_SHELL_LINEWIDTH) */
228 27d0378b Simon Welzel
229
/**
230
 * @brief   Shell maximum number of arguments.
231
 */
232
#if !defined(OS_CFG_SHELL_MAXARGS)
233 b0ede265 Thomas Schöpping
  #define AMIROOS_CFG_SHELL_MAXARGS             16
234 7de0cc90 Thomas Schöpping
#else /* !defined(OS_CFG_SHELL_MAXARGS) */
235 27d0378b Simon Welzel
  #define AMIROOS_CFG_SHELL_MAXARGS             OS_CFG_SHELL_MAXARGS
236 7de0cc90 Thomas Schöpping
#endif /* !defined(OS_CFG_SHELL_MAXARGS) */
237 27d0378b Simon Welzel
238
/** @} */
239
240 6ff06bbf Thomas Schöpping
#endif /* AOSCONF_H */
241 27d0378b Simon Welzel
242
/** @} */