amiro-os / core / inc / aos_confcheck.h @ f5363588
History | View | Annotate | Download (8.105 KB)
1 |
/*
|
---|---|
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 aos_confcheck.h
|
21 |
* @brief Header that checks whether all necessary configurations are correct.
|
22 |
*
|
23 |
* @addtogroup aos_system
|
24 |
* @{
|
25 |
*/
|
26 |
|
27 |
#ifndef AMIROOS_CONFCHECK_H
|
28 |
#define AMIROOS_CONFCHECK_H
|
29 |
|
30 |
#include <amiroos.h> |
31 |
|
32 |
/******************************************************************************/
|
33 |
/* CONSTANTS */
|
34 |
/******************************************************************************/
|
35 |
|
36 |
/******************************************************************************/
|
37 |
/* SETTINGS */
|
38 |
/******************************************************************************/
|
39 |
|
40 |
/******************************************************************************/
|
41 |
/* CHECKS */
|
42 |
/******************************************************************************/
|
43 |
|
44 |
/* kernel parameters and options */
|
45 |
|
46 |
#if !defined(AMIROOS_CFG_DBG)
|
47 |
#error "AMIROOS_CFG_DBG not defined in aosconf.h" |
48 |
#endif /* !defined(AMIROOS_CFG_DBG) */ |
49 |
|
50 |
#if !defined(AMIROOS_CFG_TESTS_ENABLE)
|
51 |
#error "AMIROOS_CFG_TESTS_ENABLE not defined in aosconf.h" |
52 |
#endif /* !defined(AMIROOS_CFG_TESTS_ENABLE) */ |
53 |
|
54 |
#if !defined(AMIROOS_CFG_PROFILE)
|
55 |
#error "AMIROOS_CFG_PROFILE not defined in aosconf.h" |
56 |
#endif /* !defined(AMIROOS_CFG_PROFILE) */ |
57 |
|
58 |
#if !defined(AMIROOS_CFG_MAIN_LOOP_TIMEOUT)
|
59 |
#error "AMIROOS_CFG_MAIN_LOOP_TIMEOUT not defined in aosconf.h" |
60 |
#endif /* !defined(AMIROOS_CFG_MAIN_LOOP_TIMEOUT) */ |
61 |
|
62 |
/* bootloader parameters and options */
|
63 |
|
64 |
#if !defined(AMIROOS_CFG_BOOTLOADER)
|
65 |
#error "AMIROOS_CFG_BOOTLOADER not defined in aosconf.h" |
66 |
#endif /* !defined(AMIROOS_CFG_BOOTLOADER)*/ |
67 |
|
68 |
/* SSSP parameters and options */
|
69 |
|
70 |
#if !defined(AMIROOS_CFG_SSSP_ENABLE)
|
71 |
#error "AMIROOS_CFG_SSSP_ENABLE not defined in aosconf.h" |
72 |
#endif /* !defined(AMIROOS_CFG_SSSP_ENABLE) */ |
73 |
|
74 |
#if (AMIROOS_CFG_SSSP_ENABLE == true) |
75 |
|
76 |
#if !defined(AMIROOS_CFG_SSSP_STARTUP)
|
77 |
#error "AMIROOS_CFG_SSSP_STARTUP not defined in aosconf.h" |
78 |
#else /* !defined(AMIROOS_CFG_SSSP_STARTUP) */ |
79 |
#if (AMIROOS_CFG_SSSP_STARTUP == true) |
80 |
#if (AMIROOS_CFG_BOOTLOADER == AOS_BOOTLOADER_AMiRoBLT)
|
81 |
#error "AMIROOS_CFG_SSSP_STARTUP is enabled in aosconf.h, but SSSP startup phase is already handled by AMiRo-BLT." |
82 |
#endif /* (AMIROOS_CFG_BOOTLOADER == AOS_BOOTLOADER_AMiRoBLT) */ |
83 |
#else /* (AMIROOS_CFG_SSSP_STARTUP == true) */ |
84 |
#if (AMIROOS_CFG_BOOTLOADER == AOS_BOOTLOADER_NONE)
|
85 |
#error "AMIROOS_CFG_SSSP_STARTUP is disabled in aosconf.h, but no bootloader is defined to handle SSSP startup phase instead." |
86 |
#endif /* (AMIROOS_CFG_BOOTLOADER == AOS_BOOTLOADER_NONE) */ |
87 |
#endif /* (AMIROOS_CFG_SSSP_STARTUP == true) */ |
88 |
#endif /* !defined(AMIROOS_CFG_SSSP_STARTUP) */ |
89 |
|
90 |
#if !defined(AMIROOS_CFG_SSSP_SHUTDOWN)
|
91 |
#error "AMIROOS_CFG_SSSP_SHUTDOWN not defined in aosconf.h" |
92 |
#else /* !defined(AMIROOS_CFG_SSSP_SHUTDOWN) */ |
93 |
#if (AMIROOS_CFG_SSSP_SHUTDOWN != true) |
94 |
#if (AMIROOS_CFG_BOOTLOADER == AOS_BOOTLOADER_NONE)
|
95 |
#error "AMIROOS_CFG_SSSP_SHUTDOWN is disabled in aosconf.h, but no bootloader is defined to handle SSSP shutdown phase instead." |
96 |
#endif /* (AMIROOS_CFG_BOOTLOADER == AOS_BOOTLOADER_NONE) */ |
97 |
#endif /* (AMIROOS_CFG_SSSP_SHUTDOWN != true) && (AMIROOS_CFG_BOOTLOADER == AOS_BOOTLOADER_NONE) */ |
98 |
#endif /* !defined(AMIROOS_CFG_SSSP_SHUTDOWN) */ |
99 |
|
100 |
#if !defined(AMIROOS_CFG_SSSP_MSI)
|
101 |
#error "AMIROOS_CFG_SSSP_MSI not defined in aosconf.h" |
102 |
#endif /* !defined(AMIROOS_CFG_SSSP_MSI) */ |
103 |
|
104 |
#if !defined(AMIROOS_CFG_SSSP_MODULEIDWIDTH)
|
105 |
#error "AMIROOS_CFG_SSSP_MODULEIDWIDTH not defined in aosconf.h" |
106 |
#endif /* !defined(AMIROOS_CFG_SSSP_MODULEIDWIDTH) */ |
107 |
|
108 |
#if !defined(AMIROOS_CFG_SSSP_MASTER)
|
109 |
#error "AMIROOS_CFG_SSSP_MASTER not defined in aosconf.h" |
110 |
#endif /* !defined(AMIROOS_CFG_SSSP_MASTER) */ |
111 |
|
112 |
#if !defined(AMIROOS_CFG_SSSP_STACK_START)
|
113 |
#error "AMIROOS_CFG_SSSP_STACK_START not defined in aosconf.h" |
114 |
#endif /* !defined(AMIROOS_CFG_SSSP_STACK_START) */ |
115 |
|
116 |
#if !defined(AMIROOS_CFG_SSSP_STACK_END)
|
117 |
#error "AMIROOS_CFG_SSSP_STACK_END not defined in aosconf.h" |
118 |
#endif /* !defined(AMIROOS_CFG_SSSP_STACK_END) */ |
119 |
|
120 |
#if (AMIROOS_CFG_SSSP_STACK_START == true) && (AMIROOS_CFG_SSSP_STACK_END == true) |
121 |
#warning "AMIROOS_CFG_SSSP_STACK_START and AMIROOS_CFG_SSSP_STACK_END both enabled in aosconf.h" |
122 |
#if (AMIROOS_CFG_SSSP_MASTER != true) |
123 |
#error "AMIROOS_CFG_SSSP_MASTER must be enabled in this case" |
124 |
#endif /* (AMIROOS_CFG_SSSP_MASTER != true) */ |
125 |
#endif /* (AMIROOS_CFG_SSSP_STACK_START == true) && (AMIROOS_CFG_SSSP_STACK_END == true) */ |
126 |
|
127 |
#if !defined(AMIROOS_CFG_SSSP_SIGNALDELAY)
|
128 |
#error "AMIROOS_CFG_SSSP_SIGNALDELAY not defined in aosconf.h" |
129 |
#endif /* !defined(AMIROOS_CFG_SSSP_SIGNALDELAY) */ |
130 |
|
131 |
#if !defined(AMIROOS_CFG_SSSP_SYSSYNCPERIOD)
|
132 |
#error "AMIROOS_CFG_SSSP_SYSSYNCPERIOD not defined in aosconf.h" |
133 |
#endif /* !defined(AMIROOS_CFG_SSSP_SYSSYNCPERIOD) */ |
134 |
|
135 |
#else /* (AMIROOS_CFG_SSSP_ENABLE == true) */ |
136 |
|
137 |
#if (AMIROOS_CFG_BOOTLOADER == AOS_BOOTLOADER_AMiRoBLT)
|
138 |
#warning "SSSP is disabled in aosconf.h, but AMiRo-BLT implements it nevertheless." |
139 |
#endif /* (AMIROOS_CFG_BOOTLOADER == AOS_BOOTLOADER_AMiRoBLT) */ |
140 |
|
141 |
#endif /* (AMIROOS_CFG_SSSP_ENABLE == true) */ |
142 |
|
143 |
/* system shell options */
|
144 |
|
145 |
#if !defined(AMIROOS_CFG_SHELL_ENABLE)
|
146 |
#error "AMIROOS_CFG_SHELL_ENABLE not defined in aosconf.h" |
147 |
#endif /* !defined(AMIROOS_CFG_SHELL_ENABLE) */ |
148 |
|
149 |
#if (AMIROOS_CFG_SHELL_ENABLE == true) |
150 |
|
151 |
#if !defined(AMIROOS_CFG_SHELL_STACKSIZE)
|
152 |
#error "AMIROOS_CFG_SHELL_STACKSIZE not defined in aosconf.h" |
153 |
#endif /* !defined(AMIROOS_CFG_SHELL_STACKSIZE) */ |
154 |
|
155 |
#if !defined(AMIROOS_CFG_SHELL_THREADPRIO)
|
156 |
#error "AMIROOS_CFG_SHELL_THREADPRIO not defined in aosconf.h" |
157 |
#endif /* !defined(AMIROOS_CFG_SHELL_THREADPRIO) */ |
158 |
|
159 |
#if !defined(AMIROOS_CFG_SHELL_LINEWIDTH)
|
160 |
#error "AMIROOS_CFG_SHELL_LINEWIDTH not defined in aosconf.h" |
161 |
#endif /* !defined(AMIROOS_CFG_SHELL_LINEWIDTH) */ |
162 |
|
163 |
#if !defined(AMIROOS_CFG_SHELL_MAXARGS)
|
164 |
#error "AMIROOS_CFG_SHELL_MAXARGS not defined in aosconf.h" |
165 |
#endif /* !defined(AMIROOS_CFG_SHELL_MAXARGS) */ |
166 |
|
167 |
#else /* (AMIROOS_CFG_SHELL_ENABLE == true) */ |
168 |
|
169 |
#if (AMIROOS_CFG_TESTS_ENABLE == true) |
170 |
#error "Enabling AMIROOS_CFG_TESTS_ENABLE in aosconf.h requires AMIROOS_CFG_SHELL_ENABLE to be enabled as well." |
171 |
#endif /* (AMIROOS_CFG_TESTS_ENABLE == true) */ |
172 |
|
173 |
#endif /* (AMIROOS_CFG_SHELL_ENABLE == true) */ |
174 |
|
175 |
/******************************************************************************/
|
176 |
/* DATA STRUCTURES AND TYPES */
|
177 |
/******************************************************************************/
|
178 |
|
179 |
/******************************************************************************/
|
180 |
/* MACROS */
|
181 |
/******************************************************************************/
|
182 |
|
183 |
/******************************************************************************/
|
184 |
/* EXTERN DECLARATIONS */
|
185 |
/******************************************************************************/
|
186 |
|
187 |
/******************************************************************************/
|
188 |
/* INLINE FUNCTIONS */
|
189 |
/******************************************************************************/
|
190 |
|
191 |
#endif /* AMIROOS_CONFCHECK_H */ |
192 |
|
193 |
/** @} */
|