amiro-blt / Target / Source / plausibility.h @ c9c97bb3
History | View | Annotate | Download (17.188 KB)
1 |
/************************************************************************************//** |
---|---|
2 |
* \file Source\plausibility.h
|
3 |
* \brief Bootloader plausibility check header file, for checking the configuration
|
4 |
* at compile time.
|
5 |
* \ingroup Core
|
6 |
* \internal
|
7 |
*----------------------------------------------------------------------------------------
|
8 |
* C O P Y R I G H T
|
9 |
*----------------------------------------------------------------------------------------
|
10 |
* Copyright (c) 2011 by Feaser http://www.feaser.com All rights reserved
|
11 |
*
|
12 |
*----------------------------------------------------------------------------------------
|
13 |
* L I C E N S E
|
14 |
*----------------------------------------------------------------------------------------
|
15 |
* This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or
|
16 |
* modify it under the terms of the GNU General Public License as published by the Free
|
17 |
* Software Foundation, either version 3 of the License, or (at your option) any later
|
18 |
* version.
|
19 |
*
|
20 |
* OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
21 |
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
22 |
* PURPOSE. See the GNU General Public License for more details.
|
23 |
*
|
24 |
* You should have received a copy of the GNU General Public License along with OpenBLT.
|
25 |
* If not, see <http://www.gnu.org/licenses/>.
|
26 |
*
|
27 |
* A special exception to the GPL is included to allow you to distribute a combined work
|
28 |
* that includes OpenBLT without being obliged to provide the source code for any
|
29 |
* proprietary components. The exception text is included at the bottom of the license
|
30 |
* file <license.html>.
|
31 |
*
|
32 |
* \endinternal
|
33 |
****************************************************************************************/
|
34 |
#ifndef PLAUSIBILITY_H
|
35 |
#define PLAUSIBILITY_H
|
36 |
|
37 |
/****************************************************************************************
|
38 |
* C P U D R I V E R C O N F I G U R A T I O N C H E C K
|
39 |
****************************************************************************************/
|
40 |
#ifndef BOOT_CPU_XTAL_SPEED_KHZ
|
41 |
#error "BOOT_CPU_XTAL_SPEED_KHZ is missing in blt_conf.h" |
42 |
#endif
|
43 |
|
44 |
#if (BOOT_CPU_XTAL_SPEED_KHZ <= 0) |
45 |
#error "BOOT_CPU_XTAL_SPEED_KHZ must be > 0" |
46 |
#endif
|
47 |
|
48 |
#ifndef BOOT_CPU_SYSTEM_SPEED_KHZ
|
49 |
#error "BOOT_CPU_SYSTEM_SPEED_KHZ is missing in blt_conf.h" |
50 |
#endif
|
51 |
|
52 |
#if (BOOT_CPU_SYSTEM_SPEED_KHZ <= 0) |
53 |
#error "BOOT_CPU_SYSTEM_SPEED_KHZ must be > 0" |
54 |
#endif
|
55 |
|
56 |
#ifndef BOOT_CPU_BYTE_ORDER_MOTOROLA
|
57 |
#error "BOOT_CPU_BYTE_ORDER_MOTOROLA is missing in blt_conf.h" |
58 |
#endif
|
59 |
|
60 |
#if (BOOT_CPU_BYTE_ORDER_MOTOROLA < 0) || (BOOT_CPU_BYTE_ORDER_MOTOROLA > 1) |
61 |
#error "BOOT_CPU_BYTE_ORDER_MOTOROLA must be 0 or 1" |
62 |
#endif
|
63 |
|
64 |
#ifndef BOOT_CPU_USER_PROGRAM_START_HOOK
|
65 |
#define BOOT_CPU_USER_PROGRAM_START_HOOK (0) |
66 |
#endif
|
67 |
|
68 |
#if (BOOT_CPU_USER_PROGRAM_START_HOOK < 0) || (BOOT_CPU_USER_PROGRAM_START_HOOK > 1) |
69 |
#error "BOOT_CPU_USER_PROGRAM_START_HOOK must be 0 or 1" |
70 |
#endif
|
71 |
|
72 |
|
73 |
/****************************************************************************************
|
74 |
* B O O T L O A D E R O F M A I N D E V I C E
|
75 |
****************************************************************************************/
|
76 |
#ifndef BOOTLOADER_OF_MAIN_DEVICE
|
77 |
#define BOOTLOADER_OF_MAIN_DEVICE (0) |
78 |
#endif
|
79 |
|
80 |
#if (BOOTLOADER_OF_MAIN_DEVICE > 1) || (BOOTLOADER_OF_MAIN_DEVICE < 0) |
81 |
#error "BOOTLOADER_OF_MAIN_DEVICE must be 0 or 1" |
82 |
#endif
|
83 |
|
84 |
|
85 |
/****************************************************************************************
|
86 |
* C O M M U N I C A T I O N I N T E R F A C E C O N F I G U R A T I O N C H E C K
|
87 |
****************************************************************************************/
|
88 |
#ifndef BOOT_COM_DEVICE_ID
|
89 |
#error "BOOT_COM_DEVICE_ID must be defined!" |
90 |
#endif
|
91 |
|
92 |
#if (BOOT_COM_DEVICE_ID <= 0) |
93 |
#error "BOOT_COM_DEVICE_ID must be > 0" |
94 |
#endif
|
95 |
|
96 |
#ifndef BOOT_COM_CAN_TX_MAX_DATA
|
97 |
#define BOOT_COM_CAN_TX_MAX_DATA (0) |
98 |
#endif
|
99 |
|
100 |
#ifndef BOOT_COM_CAN_RX_MAX_DATA
|
101 |
#define BOOT_COM_CAN_RX_MAX_DATA (0) |
102 |
#endif
|
103 |
|
104 |
#ifndef BOOT_COM_UART_TX_MAX_DATA
|
105 |
#define BOOT_COM_UART_TX_MAX_DATA (0) |
106 |
#endif
|
107 |
|
108 |
#ifndef BOOT_COM_UART_RX_MAX_DATA
|
109 |
#define BOOT_COM_UART_RX_MAX_DATA (0) |
110 |
#endif
|
111 |
|
112 |
#ifndef BOOT_COM_USB_TX_MAX_DATA
|
113 |
#define BOOT_COM_USB_TX_MAX_DATA (0) |
114 |
#endif
|
115 |
|
116 |
#ifndef BOOT_COM_USB_RX_MAX_DATA
|
117 |
#define BOOT_COM_USB_RX_MAX_DATA (0) |
118 |
#endif
|
119 |
|
120 |
#ifndef BOOT_COM_NET_TX_MAX_DATA
|
121 |
#define BOOT_COM_NET_TX_MAX_DATA (0) |
122 |
#endif
|
123 |
|
124 |
#ifndef BOOT_COM_NET_RX_MAX_DATA
|
125 |
#define BOOT_COM_NET_RX_MAX_DATA (0) |
126 |
#endif
|
127 |
|
128 |
|
129 |
#ifndef BOOT_COM_CAN_ENABLE
|
130 |
#define BOOT_COM_CAN_ENABLE (0) |
131 |
#endif
|
132 |
|
133 |
#ifndef BOOT_GATE_CAN_ENABLE
|
134 |
#define BOOT_GATE_CAN_ENABLE (0) |
135 |
#endif
|
136 |
|
137 |
#if (BOOT_COM_CAN_ENABLE > 0 || BOOT_GATE_CAN_ENABLE > 0) |
138 |
#ifndef BOOT_COM_CAN_BAUDRATE
|
139 |
#error "BOOT_COM_CAN_BAUDRATE is missing in blt_conf.h" |
140 |
#endif
|
141 |
|
142 |
#if (BOOT_COM_CAN_BAUDRATE <= 0) |
143 |
#error "BOOT_COM_CAN_BAUDRATE must be > 0" |
144 |
#endif
|
145 |
|
146 |
#ifndef BOOT_COM_CAN_TX_MSG_ID
|
147 |
#error "BOOT_COM_CAN_TX_MSG_ID is missing in blt_conf.h" |
148 |
#endif
|
149 |
|
150 |
#if (BOOT_COM_CAN_TX_MSG_ID <= 0) |
151 |
#error "BOOT_COM_CAN_TX_MSG_ID must be > 0" |
152 |
#endif
|
153 |
|
154 |
#ifndef BOOT_COM_CAN_TX_MAX_DATA
|
155 |
#error "BOOT_COM_CAN_TX_MAX_DATA is missing in blt_conf.h" |
156 |
#endif
|
157 |
|
158 |
#if (BOOT_COM_CAN_TX_MAX_DATA <= 0) |
159 |
#error "BOOT_COM_CAN_TX_MAX_DATA must be > 0" |
160 |
#endif
|
161 |
|
162 |
// #if (BOOT_COM_CAN_TX_MAX_DATA > 8)
|
163 |
// #error "BOOT_COM_CAN_TX_MAX_DATA must be <= 8"
|
164 |
#if (BOOT_COM_CAN_TX_MAX_DATA > 255) |
165 |
#error "BOOT_COM_CAN_TX_MAX_DATA must be <= 255" |
166 |
#endif
|
167 |
|
168 |
#ifndef BOOT_COM_CAN_RX_MSG_ID
|
169 |
#error "BOOT_COM_CAN_RX_MSG_ID is missing in blt_conf.h" |
170 |
#endif
|
171 |
|
172 |
#if (BOOT_COM_CAN_RX_MSG_ID <= 0) |
173 |
#error "BOOT_COM_CAN_RX_MSG_ID must be > 0" |
174 |
#endif
|
175 |
|
176 |
#ifndef BOOT_COM_CAN_RX_MAX_DATA
|
177 |
#error "BOOT_COM_CAN_RX_MAX_DATA is missing in blt_conf.h" |
178 |
#endif
|
179 |
|
180 |
#if (BOOT_COM_CAN_RX_MAX_DATA <= 0) |
181 |
#error "BOOT_COM_CAN_RX_MAX_DATA must be > 0" |
182 |
#endif
|
183 |
|
184 |
// #if (BOOT_COM_CAN_RX_MAX_DATA > 8)
|
185 |
// #error "BOOT_COM_CAN_RX_MAX_DATA must be <= 8"
|
186 |
#if (BOOT_COM_CAN_RX_MAX_DATA > 255) |
187 |
#error "BOOT_COM_CAN_RX_MAX_DATA must be <= 255" |
188 |
#endif
|
189 |
|
190 |
#ifndef BOOT_COM_CAN_CHANNEL_INDEX
|
191 |
#error "BOOT_COM_CAN_CHANNEL_INDEX is missing in blt_conf.h" |
192 |
#endif
|
193 |
|
194 |
#if (BOOT_COM_CAN_CHANNEL_INDEX < 0) |
195 |
#error "BOOT_COM_CAN_CHANNEL_INDEX must be >= 0" |
196 |
#endif
|
197 |
#endif /* BOOT_COM_CAN_ENABLE > 0 */ |
198 |
|
199 |
#ifndef BOOT_COM_UART_ENABLE
|
200 |
#define BOOT_COM_UART_ENABLE (0) |
201 |
#endif
|
202 |
|
203 |
#ifndef BOOT_GATE_UART_ENABLE
|
204 |
#define BOOT_GATE_UART_ENABLE (0) |
205 |
#endif
|
206 |
|
207 |
#ifndef BOOT_COM_BLUETOOTH_UART_ENABLE
|
208 |
#define BOOT_COM_BLUETOOTH_UART_ENABLE (0) |
209 |
#endif
|
210 |
|
211 |
#ifndef BOOT_GATE_BLUETOOTH_UART_ENABLE
|
212 |
#define BOOT_GATE_BLUETOOTH_UART_ENABLE (0) |
213 |
#endif
|
214 |
|
215 |
#if (BOOT_COM_UART_ENABLE > 0 || BOOT_GATE_UART_ENABLE > 0 || BOOT_COM_BLUETOOTH_UART_ENABLE > 0 || BOOT_GATE_BLUETOOTH_UART_ENABLE > 0) |
216 |
#ifndef BOOT_COM_UART_BAUDRATE
|
217 |
#error "BOOT_COM_UART_BAUDRATE is missing in blt_conf.h" |
218 |
#endif
|
219 |
|
220 |
#if (BOOT_COM_UART_BAUDRATE <= 0) |
221 |
#error "BOOT_COM_UART_BAUDRATE must be > 0" |
222 |
#endif
|
223 |
|
224 |
#ifndef BOOT_COM_UART_TX_MAX_DATA
|
225 |
#error "BOOT_COM_UART_TX_MAX_DATA is missing in blt_conf.h" |
226 |
#endif
|
227 |
|
228 |
#if (BOOT_COM_UART_TX_MAX_DATA <= 0) |
229 |
#error "BOOT_COM_UART_TX_MAX_DATA must be > 0" |
230 |
#endif
|
231 |
|
232 |
#if (BOOT_COM_UART_TX_MAX_DATA > 255) |
233 |
#error "BOOT_COM_UART_TX_MAX_DATA must be <= 255" |
234 |
#endif
|
235 |
|
236 |
#ifndef BOOT_COM_UART_RX_MAX_DATA
|
237 |
#error "BOOT_COM_UART_RX_MAX_DATA is missing in blt_conf.h" |
238 |
#endif
|
239 |
|
240 |
#if (BOOT_COM_UART_RX_MAX_DATA <= 0) |
241 |
#error "BOOT_COM_UART_RX_MAX_DATA must be > 0" |
242 |
#endif
|
243 |
|
244 |
#if (BOOT_COM_UART_RX_MAX_DATA > 255) |
245 |
#error "BOOT_COM_UART_RX_MAX_DATA must be <= 255" |
246 |
#endif
|
247 |
|
248 |
#if (BOOT_COM_UART_ENABLE > 0 || BOOT_GATE_UART_ENABLE > 0) |
249 |
#ifndef BOOT_COM_UART_CHANNEL_INDEX
|
250 |
#error "BOOT_COM_UART_CHANNEL_INDEX is missing in blt_conf.h" |
251 |
#endif
|
252 |
|
253 |
#if (BOOT_COM_UART_CHANNEL_INDEX < 0) |
254 |
#error "BOOT_COM_UART_CHANNEL_INDEX must be >= 0" |
255 |
#endif
|
256 |
#endif /* (BOOT_COM_UART_ENABLE > 0 || BOOT_GATE_UART_ENABLE > 0) */ |
257 |
|
258 |
#if (BOOT_COM_BLUETOOTH_UART_ENABLE > 0 || BOOT_GATE_BLUETOOTH_UART_ENABLE > 0) |
259 |
#ifndef BOOT_COM_BLUETOOTH_UART_CHANNEL_INDEX
|
260 |
#error "BOOT_COM_BLUETOOTH_UART_CHANNEL_INDEX is missing in blt_conf.h" |
261 |
#endif
|
262 |
|
263 |
#if (BOOT_COM_BLUETOOTH_UART_CHANNEL_INDEX < 0) |
264 |
#error "BOOT_COM_BLUETOOTH_UART_CHANNEL_INDEX must be >= 0" |
265 |
#endif
|
266 |
#endif /* (BOOT_COM_BLUETOOTH_UART_ENABLE > 0 || BOOT_GATE_BLUETOOTH_UART_ENABLE > 0) */ |
267 |
|
268 |
#if (BOOT_COM_UART_CHANNEL_INDEX == 1) |
269 |
#define BOOT_DEBUGGING_UART2_ENABLE (0) |
270 |
#endif
|
271 |
|
272 |
#ifndef BOOT_DEBUGGING_UART2_ENABLE
|
273 |
#define BOOT_DEBUGGING_UART2_ENABLE (0) |
274 |
#endif
|
275 |
#endif /* BOOT_COM_UART_ENABLE > 0 */ |
276 |
|
277 |
#ifndef BOOT_COM_USB_ENABLE
|
278 |
#define BOOT_COM_USB_ENABLE (0) |
279 |
#endif
|
280 |
|
281 |
#ifndef BOOT_GATE_USB_ENABLE
|
282 |
#define BOOT_GATE_USB_ENABLE (0) |
283 |
#endif
|
284 |
|
285 |
#if (BOOT_COM_USB_ENABLE > 0 || BOOT_GATE_USB_ENABLE > 0) |
286 |
#ifndef BOOT_COM_USB_TX_MAX_DATA
|
287 |
#error "BOOT_COM_USB_TX_MAX_DATA is missing in blt_conf.h" |
288 |
#endif
|
289 |
|
290 |
#if (BOOT_COM_USB_TX_MAX_DATA <= 0) |
291 |
#error "BOOT_COM_USB_TX_MAX_DATA must be > 0" |
292 |
#endif
|
293 |
|
294 |
#ifndef BOOT_COM_USB_RX_MAX_DATA
|
295 |
#error "BOOT_COM_USB_RX_MAX_DATA is missing in blt_conf.h" |
296 |
#endif
|
297 |
|
298 |
#if (BOOT_COM_USB_RX_MAX_DATA <= 0) |
299 |
#error "BOOT_COM_USB_RX_MAX_DATA must be > 0" |
300 |
#endif
|
301 |
#endif /* BOOT_COM_USB_ENABLE > 0 */ |
302 |
|
303 |
|
304 |
|
305 |
#ifndef BOOT_COM_NET_ENABLE
|
306 |
#define BOOT_COM_NET_ENABLE (0) |
307 |
#endif
|
308 |
|
309 |
#ifndef BOOT_GATE_NET_ENABLE
|
310 |
#define BOOT_GATE_NET_ENABLE (0) |
311 |
#endif
|
312 |
|
313 |
#if (BOOT_COM_NET_ENABLE > 0 || BOOT_GATE_NET_ENABLE > 0) |
314 |
#ifndef BOOT_COM_NET_TX_MAX_DATA
|
315 |
#error "BOOT_COM_NET_TX_MAX_DATA is missing in blt_conf.h" |
316 |
#endif
|
317 |
|
318 |
#if (BOOT_COM_NET_TX_MAX_DATA <= 0) |
319 |
#error "BOOT_COM_NET_TX_MAX_DATA must be > 0" |
320 |
#endif
|
321 |
|
322 |
#ifndef BOOT_COM_NET_RX_MAX_DATA
|
323 |
#error "BOOT_COM_NET_RX_MAX_DATA is missing in blt_conf.h" |
324 |
#endif
|
325 |
|
326 |
#if (BOOT_COM_NET_RX_MAX_DATA <= 0) |
327 |
#error "BOOT_COM_NET_RX_MAX_DATA must be > 0" |
328 |
#endif
|
329 |
|
330 |
#ifndef BOOT_COM_NET_IPADDR0
|
331 |
#error "BOOT_COM_NET_IPADDR0 is missing in blt_conf.h" |
332 |
#endif
|
333 |
|
334 |
#if (BOOT_COM_NET_IPADDR0 < 0) |
335 |
#error "BOOT_COM_NET_IPADDR0 must be >= 0" |
336 |
#endif
|
337 |
|
338 |
#ifndef BOOT_COM_NET_IPADDR1
|
339 |
#error "BOOT_COM_NET_IPADDR1 is missing in blt_conf.h" |
340 |
#endif
|
341 |
|
342 |
#if (BOOT_COM_NET_IPADDR1 < 0) |
343 |
#error "BOOT_COM_NET_IPADDR1 must be >= 0" |
344 |
#endif
|
345 |
|
346 |
#ifndef BOOT_COM_NET_IPADDR2
|
347 |
#error "BOOT_COM_NET_IPADDR2 is missing in blt_conf.h" |
348 |
#endif
|
349 |
|
350 |
#if (BOOT_COM_NET_IPADDR2 < 0) |
351 |
#error "BOOT_COM_NET_IPADDR2 must be >= 0" |
352 |
#endif
|
353 |
|
354 |
#ifndef BOOT_COM_NET_IPADDR3
|
355 |
#error "BOOT_COM_NET_IPADDR3 is missing in blt_conf.h" |
356 |
#endif
|
357 |
|
358 |
#if (BOOT_COM_NET_IPADDR3 < 0) |
359 |
#error "BOOT_COM_NET_IPADDR3 must be >= 0" |
360 |
#endif
|
361 |
|
362 |
#ifndef BOOT_COM_NET_NETMASK0
|
363 |
#error "BOOT_COM_NET_NETMASK0 is missing in blt_conf.h" |
364 |
#endif
|
365 |
|
366 |
#if (BOOT_COM_NET_NETMASK0 < 0) |
367 |
#error "BOOT_COM_NET_NETMASK0 must be >= 0" |
368 |
#endif
|
369 |
|
370 |
#ifndef BOOT_COM_NET_NETMASK1
|
371 |
#error "BOOT_COM_NET_NETMASK1 is missing in blt_conf.h" |
372 |
#endif
|
373 |
|
374 |
#if (BOOT_COM_NET_NETMASK1 < 0) |
375 |
#error "BOOT_COM_NET_NETMASK1 must be >= 0" |
376 |
#endif
|
377 |
|
378 |
#ifndef BOOT_COM_NET_NETMASK2
|
379 |
#error "BOOT_COM_NET_NETMASK2 is missing in blt_conf.h" |
380 |
#endif
|
381 |
|
382 |
#if (BOOT_COM_NET_NETMASK2 < 0) |
383 |
#error "BOOT_COM_NET_NETMASK2 must be >= 0" |
384 |
#endif
|
385 |
|
386 |
#ifndef BOOT_COM_NET_NETMASK3
|
387 |
#error "BOOT_COM_NET_NETMASK3 is missing in blt_conf.h" |
388 |
#endif
|
389 |
|
390 |
#if (BOOT_COM_NET_NETMASK3 < 0) |
391 |
#error "BOOT_COM_NET_NETMASK3 must be >= 0" |
392 |
#endif
|
393 |
|
394 |
#ifndef BOOT_COM_NET_GATEWAY0
|
395 |
#error "BOOT_COM_NET_GATEWAY0 is missing in blt_conf.h" |
396 |
#endif
|
397 |
|
398 |
#if (BOOT_COM_NET_GATEWAY0 < 0) |
399 |
#error "BOOT_COM_NET_GATEWAY0 must be >= 0" |
400 |
#endif
|
401 |
|
402 |
#ifndef BOOT_COM_NET_GATEWAY1
|
403 |
#error "BOOT_COM_NET_GATEWAY1 is missing in blt_conf.h" |
404 |
#endif
|
405 |
|
406 |
#if (BOOT_COM_NET_GATEWAY1 < 0) |
407 |
#error "BOOT_COM_NET_GATEWAY1 must be >= 0" |
408 |
#endif
|
409 |
|
410 |
#ifndef BOOT_COM_NET_GATEWAY2
|
411 |
#error "BOOT_COM_NET_GATEWAY2 is missing in blt_conf.h" |
412 |
#endif
|
413 |
|
414 |
#if (BOOT_COM_NET_GATEWAY2 < 0) |
415 |
#error "BOOT_COM_NET_GATEWAY2 must be >= 0" |
416 |
#endif
|
417 |
|
418 |
#ifndef BOOT_COM_NET_GATEWAY3
|
419 |
#error "BOOT_COM_NET_GATEWAY3 is missing in blt_conf.h" |
420 |
#endif
|
421 |
|
422 |
#if (BOOT_COM_NET_GATEWAY3 < 0) |
423 |
#error "BOOT_COM_NET_GATEWAY3 must be >= 0" |
424 |
#endif
|
425 |
|
426 |
#ifndef BOOT_COM_NET_PORT
|
427 |
#error "BOOT_COM_NET_PORT is missing in blt_conf.h" |
428 |
#endif
|
429 |
|
430 |
#if (BOOT_COM_NET_PORT < 0) |
431 |
#error "BOOT_COM_NET_PORT must be >= 0" |
432 |
#endif
|
433 |
|
434 |
#ifndef BOOT_COM_NET_IPADDR_HOOK_ENABLE
|
435 |
#define BOOT_COM_NET_IPADDR_HOOK_ENABLE (0) |
436 |
#endif
|
437 |
|
438 |
#ifndef BOOT_COM_NET_NETMASK_HOOK_ENABLE
|
439 |
#define BOOT_COM_NET_NETMASK_HOOK_ENABLE (0) |
440 |
#endif
|
441 |
|
442 |
#ifndef BOOT_COM_NET_GATEWAY_HOOK_ENABLE
|
443 |
#define BOOT_COM_NET_GATEWAY_HOOK_ENABLE (0) |
444 |
#endif
|
445 |
|
446 |
#endif /* BOOT_COM_USB_ENABLE > 0 */ |
447 |
|
448 |
#ifndef BOOT_FILE_SYS_ENABLE
|
449 |
#define BOOT_FILE_SYS_ENABLE (0) |
450 |
#endif
|
451 |
|
452 |
#if (BOOT_FILE_SYS_ENABLE < 0) || (BOOT_FILE_SYS_ENABLE > 1) |
453 |
#error "BOOT_FILE_SYS_ENABLE must be 0 or 1" |
454 |
#endif
|
455 |
|
456 |
#if (BOOT_FILE_SYS_ENABLE > 0) |
457 |
#ifndef BOOT_FILE_LOGGING_ENABLE
|
458 |
#define BOOT_FILE_LOGGING_ENABLE (0) |
459 |
#endif
|
460 |
|
461 |
#if (BOOT_FILE_LOGGING_ENABLE < 0) || (BOOT_FILE_LOGGING_ENABLE > 1) |
462 |
#error "BOOT_FILE_LOGGING_ENABLE must be 0 or 1" |
463 |
#endif
|
464 |
|
465 |
#ifndef BOOT_FILE_ERROR_HOOK_ENABLE
|
466 |
#define BOOT_FILE_ERROR_HOOK_ENABLE (0) |
467 |
#endif
|
468 |
|
469 |
#if (BOOT_FILE_ERROR_HOOK_ENABLE < 0) || (BOOT_FILE_ERROR_HOOK_ENABLE > 1) |
470 |
#error "BOOT_FILE_ERROR_HOOK_ENABLE must be 0 or 1" |
471 |
#endif
|
472 |
|
473 |
#ifndef BOOT_FILE_STARTED_HOOK_ENABLE
|
474 |
#define BOOT_FILE_STARTED_HOOK_ENABLE (0) |
475 |
#endif
|
476 |
|
477 |
#if (BOOT_FILE_STARTED_HOOK_ENABLE < 0) || (BOOT_FILE_STARTED_HOOK_ENABLE > 1) |
478 |
#error "BOOT_FILE_STARTED_HOOK_ENABLE must be 0 or 1" |
479 |
#endif
|
480 |
|
481 |
#ifndef BOOT_FILE_COMPLETED_HOOK_ENABLE
|
482 |
#define BOOT_FILE_COMPLETED_HOOK_ENABLE (0) |
483 |
#endif
|
484 |
|
485 |
#if (BOOT_FILE_COMPLETED_HOOK_ENABLE < 0) || (BOOT_FILE_COMPLETED_HOOK_ENABLE > 1) |
486 |
#error "BOOT_FILE_COMPLETED_HOOK_ENABLE must be 0 or 1" |
487 |
#endif
|
488 |
#endif /* BOOT_FILE_SYS_ENABLE > 0 */ |
489 |
|
490 |
#if (BOOT_COM_CAN_ENABLE == 1) || (BOOT_COM_UART_ENABLE == 1) || (BOOT_COM_NET_ENABLE == 1) || (BOOT_COM_USB_ENABLE == 1) |
491 |
#define BOOT_COM_ENABLE (1) |
492 |
#else
|
493 |
#define BOOT_COM_ENABLE (0) |
494 |
#endif
|
495 |
|
496 |
#if (BOOT_GATE_CAN_ENABLE == 1) || (BOOT_GATE_UART_ENABLE == 1) || (BOOT_GATE_NET_ENABLE == 1) || (BOOT_GATE_USB_ENABLE == 1) |
497 |
#define BOOT_GATE_ENABLE (1) |
498 |
#else
|
499 |
#define BOOT_GATE_ENABLE (0) |
500 |
#endif
|
501 |
|
502 |
/* Proof if the the bootloader is main device one of the communication interfaces has to be gateway */
|
503 |
#if (BOOTLOADER_OF_MAIN_DEVICE == 1) && (BOOT_GATE_ENABLE == 0) |
504 |
#error "If BOOT_GATE_ENABLE=1 then one communication interface has to be configured as gateway!" |
505 |
#endif
|
506 |
|
507 |
|
508 |
/****************************************************************************************
|
509 |
* B A C K D O O R E N T R Y C H E C K
|
510 |
****************************************************************************************/
|
511 |
#ifndef BOOT_BACKDOOR_HOOKS_ENABLE
|
512 |
#define BOOT_BACKDOOR_HOOKS_ENABLE (0) |
513 |
#endif
|
514 |
|
515 |
#if (BOOT_BACKDOOR_HOOKS_ENABLE < 0) || (BOOT_BACKDOOR_HOOKS_ENABLE > 1) |
516 |
#error "BOOT_BACKDOOR_HOOKS_ENABLE must be 0 or 1" |
517 |
#endif
|
518 |
|
519 |
|
520 |
/****************************************************************************************
|
521 |
* N V M D R I V E R C O N F I G U R A T I O N C H E C K
|
522 |
****************************************************************************************/
|
523 |
#ifndef BOOT_NVM_HOOKS_ENABLE
|
524 |
#define BOOT_NVM_HOOKS_ENABLE (0) |
525 |
#endif
|
526 |
|
527 |
#if (BOOT_NVM_HOOKS_ENABLE < 0) || (BOOT_NVM_HOOKS_ENABLE > 1) |
528 |
#error "BOOT_NVM_HOOKS_ENABLE must be 0 or 1" |
529 |
#endif
|
530 |
|
531 |
#ifndef BOOT_NVM_SIZE_KB
|
532 |
#error "BOOT_NVM_SIZE_KB is missing in blt_conf.h" |
533 |
#endif
|
534 |
|
535 |
#if (BOOT_NVM_SIZE_KB <= 0) |
536 |
#error "BOOT_NVM_SIZE_KB must be > 0" |
537 |
#endif
|
538 |
|
539 |
#ifndef BOOT_NVM_CHECKSUM_HOOKS_ENABLE
|
540 |
#define BOOT_NVM_CHECKSUM_HOOKS_ENABLE (0) |
541 |
#endif
|
542 |
|
543 |
#if (BOOT_NVM_CHECKSUM_HOOKS_ENABLE < 0) || (BOOT_NVM_CHECKSUM_HOOKS_ENABLE > 1) |
544 |
#error "BOOT_NVM_CHECKSUM_HOOKS_ENABLE must be 0 or 1" |
545 |
#endif
|
546 |
|
547 |
|
548 |
/****************************************************************************************
|
549 |
* W A T C H D O G D R I V E R C O N F I G U R A T I O N C H E C K
|
550 |
****************************************************************************************/
|
551 |
#ifndef BOOT_COP_HOOKS_ENABLE
|
552 |
#define BOOT_COP_HOOKS_ENABLE (0) |
553 |
#endif
|
554 |
|
555 |
#if (BOOT_COP_HOOKS_ENABLE < 0) || (BOOT_COP_HOOKS_ENABLE > 1) |
556 |
#error "BOOT_COP_HOOKS_ENABLE must be 0 or 1" |
557 |
#endif
|
558 |
|
559 |
|
560 |
/****************************************************************************************
|
561 |
* S E E D / K E Y S E C U R I T Y C O N F I G U R A T I O N
|
562 |
****************************************************************************************/
|
563 |
#ifndef BOOT_XCP_SEED_KEY_ENABLE
|
564 |
#define BOOT_XCP_SEED_KEY_ENABLE (0) |
565 |
#endif
|
566 |
|
567 |
#if (BOOT_XCP_SEED_KEY_ENABLE < 0) || (BOOT_XCP_SEED_KEY_ENABLE > 1) |
568 |
#error "BOOT_XCP_SEED_KEY_ENABLE must be 0 or 1" |
569 |
#endif
|
570 |
|
571 |
|
572 |
#endif /* PLAUSIBILITY_H */ |
573 |
/*********************************** end of plausibility.h *****************************/
|