1 | /** |
---|
2 | * @file rtems/confdefs.h |
---|
3 | * |
---|
4 | * This include file contains the configuration table template that will |
---|
5 | * be instantiated by an application based on the setting of a number |
---|
6 | * of macros. The macros are documented in the Configuring a System |
---|
7 | * chapter of the Classic API User's Guide |
---|
8 | * |
---|
9 | * The model is to estimate the memory required for each configured item |
---|
10 | * and sum those estimates. The estimate can be too high or too low for |
---|
11 | * a variety of reasons: |
---|
12 | * |
---|
13 | * Reasons estimate is too high: |
---|
14 | * + FP contexts (not all tasks are FP) |
---|
15 | * |
---|
16 | * Reasons estimate is too low: |
---|
17 | * + stacks greater than minimum size |
---|
18 | * + messages |
---|
19 | * + application must account for device driver resources |
---|
20 | * + application must account for add-on library resource requirements |
---|
21 | * |
---|
22 | * NOTE: Eventually this may be able to take into account some of |
---|
23 | * the above. This procedure has evolved from just enough to |
---|
24 | * support the RTEMS Test Suites into something that can be |
---|
25 | * used remarkably reliably by most applications. |
---|
26 | */ |
---|
27 | |
---|
28 | /* |
---|
29 | * COPYRIGHT (c) 1989-2006. |
---|
30 | * On-Line Applications Research Corporation (OAR). |
---|
31 | * |
---|
32 | * The license and distribution terms for this file may be |
---|
33 | * found in the file LICENSE in this distribution or at |
---|
34 | * http://www.rtems.com/license/LICENSE. |
---|
35 | * |
---|
36 | * $Id$ |
---|
37 | */ |
---|
38 | |
---|
39 | #ifndef __CONFIGURATION_TEMPLATE_h |
---|
40 | #define __CONFIGURATION_TEMPLATE_h |
---|
41 | |
---|
42 | #ifdef __cplusplus |
---|
43 | extern "C" { |
---|
44 | #endif |
---|
45 | |
---|
46 | /* |
---|
47 | * Include the executive's configuration |
---|
48 | */ |
---|
49 | #include <rtems/score/cpuopts.h> |
---|
50 | #include <rtems/score/apimutex.h> |
---|
51 | |
---|
52 | extern rtems_initialization_tasks_table Initialization_tasks[]; |
---|
53 | extern rtems_driver_address_table Device_drivers[]; |
---|
54 | extern rtems_configuration_table Configuration; |
---|
55 | extern rtems_multiprocessing_table Multiprocessing_configuration; |
---|
56 | #ifdef RTEMS_POSIX_API |
---|
57 | extern posix_api_configuration_table Configuration_POSIX_API; |
---|
58 | #endif |
---|
59 | #ifdef RTEMS_ITRON_API |
---|
60 | extern itron_api_configuration_table Configuration_ITRON_API; |
---|
61 | #endif |
---|
62 | |
---|
63 | /* |
---|
64 | * RTEMS C Library and Newlib support |
---|
65 | */ |
---|
66 | |
---|
67 | #ifdef RTEMS_NEWLIB |
---|
68 | #define CONFIGURE_NEWLIB_EXTENSION 1 |
---|
69 | #else |
---|
70 | #define CONFIGURE_NEWLIB_EXTENSION 0 |
---|
71 | #endif |
---|
72 | |
---|
73 | #define CONFIGURE_MALLOC_REGION 1 |
---|
74 | |
---|
75 | /* |
---|
76 | * File descriptors managed by libio |
---|
77 | */ |
---|
78 | |
---|
79 | #ifndef CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS |
---|
80 | #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 3 |
---|
81 | #endif |
---|
82 | |
---|
83 | #define CONFIGURE_LIBIO_SEMAPHORES \ |
---|
84 | (CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS + 1) |
---|
85 | |
---|
86 | #ifdef CONFIGURE_INIT |
---|
87 | uint32_t rtems_libio_number_iops = CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS; |
---|
88 | #endif |
---|
89 | |
---|
90 | /* |
---|
91 | * Termios resources |
---|
92 | */ |
---|
93 | |
---|
94 | #ifdef CONFIGURE_TERMIOS_DISABLED |
---|
95 | #define CONFIGURE_TERMIOS_SEMAPHORES 0 |
---|
96 | #else |
---|
97 | |
---|
98 | #ifndef CONFIGURE_NUMBER_OF_TERMIOS_PORTS |
---|
99 | #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 1 |
---|
100 | #endif |
---|
101 | |
---|
102 | #define CONFIGURE_TERMIOS_SEMAPHORES \ |
---|
103 | ((CONFIGURE_NUMBER_OF_TERMIOS_PORTS * 4) + 1) |
---|
104 | #endif |
---|
105 | |
---|
106 | /* |
---|
107 | * PTYs |
---|
108 | */ |
---|
109 | |
---|
110 | #ifndef CONFIGURE_MAXIMUM_PTYS |
---|
111 | #define CONFIGURE_MAXIMUM_PTYS 0 |
---|
112 | #endif |
---|
113 | |
---|
114 | #ifdef CONFIGURE_INIT |
---|
115 | int rtems_telnetd_maximum_ptys = CONFIGURE_MAXIMUM_PTYS; |
---|
116 | #else |
---|
117 | extern int rtems_telnetd_maximum_ptys; |
---|
118 | #endif |
---|
119 | |
---|
120 | /* |
---|
121 | * Mount Table Configuration |
---|
122 | */ |
---|
123 | |
---|
124 | #include <rtems/imfs.h> |
---|
125 | |
---|
126 | #ifndef CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK |
---|
127 | #define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK \ |
---|
128 | IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK |
---|
129 | #endif |
---|
130 | #ifdef CONFIGURE_INIT |
---|
131 | int imfs_rq_memfile_bytes_per_block = CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK; |
---|
132 | #endif /* CONFIGURE_INIT */ |
---|
133 | |
---|
134 | #ifdef CONFIGURE_INIT |
---|
135 | #ifndef CONFIGURE_HAS_OWN_MOUNT_TABLE |
---|
136 | rtems_filesystem_mount_table_t configuration_mount_table = { |
---|
137 | #ifdef CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM |
---|
138 | &IMFS_ops, |
---|
139 | #else /* using miniIMFS as base filesystem */ |
---|
140 | &miniIMFS_ops, |
---|
141 | #endif |
---|
142 | RTEMS_FILESYSTEM_READ_WRITE, |
---|
143 | NULL, |
---|
144 | NULL |
---|
145 | }; |
---|
146 | |
---|
147 | rtems_filesystem_mount_table_t |
---|
148 | *rtems_filesystem_mount_table = &configuration_mount_table; |
---|
149 | int rtems_filesystem_mount_table_size = 1; |
---|
150 | #endif |
---|
151 | |
---|
152 | #endif |
---|
153 | |
---|
154 | |
---|
155 | /* |
---|
156 | * Stack Checker Requirements |
---|
157 | * |
---|
158 | * NOTE: This does not automatically enable reporting at program exit. |
---|
159 | */ |
---|
160 | |
---|
161 | #ifdef STACK_CHECKER_ON |
---|
162 | #define CONFIGURE_STACK_CHECKER_EXTENSION 1 |
---|
163 | #else |
---|
164 | #define CONFIGURE_STACK_CHECKER_EXTENSION 0 |
---|
165 | #endif |
---|
166 | |
---|
167 | /* |
---|
168 | * Interrupt Stack Space |
---|
169 | * |
---|
170 | * NOTE: There is currently no way for the application to override |
---|
171 | * the interrupt stack size set by the BSP. |
---|
172 | */ |
---|
173 | |
---|
174 | #if (CPU_ALLOCATE_INTERRUPT_STACK == 0) |
---|
175 | #undef CONFIGURE_INTERRUPT_STACK_MEMORY |
---|
176 | #define CONFIGURE_INTERRUPT_STACK_MEMORY 0 |
---|
177 | #else |
---|
178 | #ifndef CONFIGURE_INTERRUPT_STACK_MEMORY |
---|
179 | #define CONFIGURE_INTERRUPT_STACK_MEMORY RTEMS_MINIMUM_STACK_SIZE |
---|
180 | #endif |
---|
181 | #endif |
---|
182 | |
---|
183 | /* |
---|
184 | * Default User Initialization Task Table. This table guarantees that |
---|
185 | * one user initialization table is defined. |
---|
186 | */ |
---|
187 | |
---|
188 | #ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
189 | |
---|
190 | #ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE |
---|
191 | |
---|
192 | /* |
---|
193 | * The user is defining their own table information and setting the |
---|
194 | * appropriate variables. |
---|
195 | */ |
---|
196 | |
---|
197 | #else |
---|
198 | |
---|
199 | #ifndef CONFIGURE_INIT_TASK_NAME |
---|
200 | #define CONFIGURE_INIT_TASK_NAME rtems_build_name( 'U', 'I', '1', ' ' ) |
---|
201 | #endif |
---|
202 | |
---|
203 | #ifndef CONFIGURE_INIT_TASK_STACK_SIZE |
---|
204 | #define CONFIGURE_INIT_TASK_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE |
---|
205 | #endif |
---|
206 | |
---|
207 | #ifndef CONFIGURE_INIT_TASK_PRIORITY |
---|
208 | #define CONFIGURE_INIT_TASK_PRIORITY 1 |
---|
209 | #endif |
---|
210 | |
---|
211 | #ifndef CONFIGURE_INIT_TASK_ATTRIBUTES |
---|
212 | #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES |
---|
213 | #endif |
---|
214 | |
---|
215 | #ifndef CONFIGURE_INIT_TASK_ENTRY_POINT |
---|
216 | #define CONFIGURE_INIT_TASK_ENTRY_POINT Init |
---|
217 | #endif |
---|
218 | |
---|
219 | #ifndef CONFIGURE_INIT_TASK_INITIAL_MODES |
---|
220 | #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT |
---|
221 | #endif |
---|
222 | |
---|
223 | #ifndef CONFIGURE_INIT_TASK_ARGUMENTS |
---|
224 | #define CONFIGURE_INIT_TASK_ARGUMENTS 0 |
---|
225 | #endif |
---|
226 | |
---|
227 | #ifdef CONFIGURE_INIT |
---|
228 | rtems_initialization_tasks_table Initialization_tasks[] = { |
---|
229 | { CONFIGURE_INIT_TASK_NAME, |
---|
230 | CONFIGURE_INIT_TASK_STACK_SIZE, |
---|
231 | CONFIGURE_INIT_TASK_PRIORITY, |
---|
232 | CONFIGURE_INIT_TASK_ATTRIBUTES, |
---|
233 | CONFIGURE_INIT_TASK_ENTRY_POINT, |
---|
234 | CONFIGURE_INIT_TASK_INITIAL_MODES, |
---|
235 | CONFIGURE_INIT_TASK_ARGUMENTS |
---|
236 | } |
---|
237 | }; |
---|
238 | #endif |
---|
239 | |
---|
240 | #define CONFIGURE_INIT_TASK_TABLE Initialization_tasks |
---|
241 | |
---|
242 | #define CONFIGURE_INIT_TASK_TABLE_SIZE \ |
---|
243 | sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table) |
---|
244 | |
---|
245 | #endif /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */ |
---|
246 | |
---|
247 | #else /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */ |
---|
248 | |
---|
249 | #define CONFIGURE_INIT_TASK_TABLE NULL |
---|
250 | #define CONFIGURE_INIT_TASK_TABLE_SIZE 0 |
---|
251 | #define CONFIGURE_INIT_TASK_STACK_SIZE 0 |
---|
252 | |
---|
253 | #endif |
---|
254 | |
---|
255 | /* |
---|
256 | * Default Device Driver Table. Each driver needed by the test is explicitly |
---|
257 | * choosen by that test. There is always a null driver entry. |
---|
258 | */ |
---|
259 | |
---|
260 | #define NULL_DRIVER_TABLE_ENTRY \ |
---|
261 | { NULL, NULL, NULL, NULL, NULL, NULL } |
---|
262 | |
---|
263 | #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
264 | #include <rtems/console.h> |
---|
265 | #endif |
---|
266 | |
---|
267 | #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
---|
268 | #include <rtems/clockdrv.h> |
---|
269 | #endif |
---|
270 | |
---|
271 | #ifdef CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER |
---|
272 | #include <rtems/timerdrv.h> |
---|
273 | #endif |
---|
274 | |
---|
275 | #ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER |
---|
276 | #include <rtems/rtc.h> |
---|
277 | #endif |
---|
278 | |
---|
279 | #ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER |
---|
280 | #include <rtems/devnull.h> |
---|
281 | #endif |
---|
282 | |
---|
283 | #ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER |
---|
284 | /* the ide driver needs the ATA driver */ |
---|
285 | # ifndef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
286 | # define CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
287 | # endif |
---|
288 | #include <libchip/ide_ctrl.h> |
---|
289 | #endif |
---|
290 | |
---|
291 | #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
292 | #include <libchip/ata.h> |
---|
293 | #endif |
---|
294 | |
---|
295 | #ifndef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE |
---|
296 | |
---|
297 | #ifdef CONFIGURE_INIT |
---|
298 | rtems_driver_address_table Device_drivers[] = { |
---|
299 | #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
300 | CONSOLE_DRIVER_TABLE_ENTRY, |
---|
301 | #endif |
---|
302 | #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
---|
303 | CLOCK_DRIVER_TABLE_ENTRY, |
---|
304 | #endif |
---|
305 | #ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER |
---|
306 | RTC_DRIVER_TABLE_ENTRY, |
---|
307 | #endif |
---|
308 | #ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER |
---|
309 | DEVNULL_DRIVER_TABLE_ENTRY, |
---|
310 | #endif |
---|
311 | #ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER |
---|
312 | IDE_CONTROLLER_DRIVER_TABLE_ENTRY, |
---|
313 | #endif |
---|
314 | #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
315 | ATA_DRIVER_TABLE_ENTRY, |
---|
316 | #endif |
---|
317 | #ifdef CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER |
---|
318 | NULL_DRIVER_TABLE_ENTRY |
---|
319 | #elif !defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) && \ |
---|
320 | !defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \ |
---|
321 | !defined(CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER) && \ |
---|
322 | !defined(CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER) && \ |
---|
323 | !defined(CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER) && \ |
---|
324 | !defined(CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER) |
---|
325 | NULL_DRIVER_TABLE_ENTRY |
---|
326 | #endif |
---|
327 | }; |
---|
328 | #endif |
---|
329 | |
---|
330 | #endif /* CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE */ |
---|
331 | |
---|
332 | /* |
---|
333 | * Default the number of drivers per node. This value may be |
---|
334 | * overridden by the user. |
---|
335 | */ |
---|
336 | |
---|
337 | #define CONFIGURE_NUMBER_OF_DRIVERS \ |
---|
338 | ((sizeof(Device_drivers) / sizeof(rtems_driver_address_table))) |
---|
339 | |
---|
340 | #ifndef CONFIGURE_MAXIMUM_DRIVERS |
---|
341 | #define CONFIGURE_MAXIMUM_DRIVERS CONFIGURE_NUMBER_OF_DRIVERS |
---|
342 | #endif |
---|
343 | |
---|
344 | /* |
---|
345 | * Default the number of devices per device driver. This value may be |
---|
346 | * overridden by the user. |
---|
347 | */ |
---|
348 | |
---|
349 | #ifndef CONFIGURE_MAXIMUM_DEVICES |
---|
350 | #define CONFIGURE_MAXIMUM_DEVICES 20 |
---|
351 | #endif |
---|
352 | |
---|
353 | #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
354 | /* |
---|
355 | * configure the priority of the ATA driver task |
---|
356 | */ |
---|
357 | # ifndef CONFIGURE_ATA_DRIVER_TASK_PRIORITY |
---|
358 | # define CONFIGURE_ATA_DRIVER_TASK_PRIORITY ATA_DRIVER_TASK_DEFAULT_PRIORITY |
---|
359 | # endif |
---|
360 | # ifdef CONFIGURE_INIT |
---|
361 | rtems_task_priority ata_driver_task_priority |
---|
362 | = CONFIGURE_ATA_DRIVER_TASK_PRIORITY; |
---|
363 | # endif /* CONFIGURE_INIT */ |
---|
364 | #endif |
---|
365 | |
---|
366 | /* |
---|
367 | * add bdbuf configuration and values for swapout task priority |
---|
368 | */ |
---|
369 | #ifdef CONFIGURE_APPLICATION_NEEDS_LIBBLOCK |
---|
370 | #include <rtems/bdbuf.h> |
---|
371 | /* |
---|
372 | * configure the priority of the bdbuf swapout task |
---|
373 | */ |
---|
374 | #ifndef CONFIGURE_SWAPOUT_TASK_PRIORITY |
---|
375 | #define CONFIGURE_SWAPOUT_TASK_PRIORITY SWAPOUT_TASK_DEFAULT_PRIORITY |
---|
376 | #endif |
---|
377 | #ifdef CONFIGURE_INIT |
---|
378 | rtems_task_priority swapout_task_priority |
---|
379 | = CONFIGURE_SWAPOUT_TASK_PRIORITY; |
---|
380 | #endif /* CONFIGURE_INIT */ |
---|
381 | #ifndef CONFIGURE_HAS_OWN_BDBUF_TABLE |
---|
382 | |
---|
383 | #ifndef CONFIGURE_BDBUF_BUFFER_COUNT |
---|
384 | #define CONFIGURE_BDBUF_BUFFER_COUNT 64 |
---|
385 | #endif /* CONFIGURE_BDBUF_BUFFER_COUNT */ |
---|
386 | |
---|
387 | #ifndef CONFIGURE_BDBUF_BUFFER_SIZE |
---|
388 | #define CONFIGURE_BDBUF_BUFFER_SIZE 512 |
---|
389 | #endif /* CONFIGURE_BDBUF_BUFFER_SIZE */ |
---|
390 | #ifdef CONFIGURE_INIT |
---|
391 | rtems_bdbuf_config rtems_bdbuf_configuration[] = { |
---|
392 | {CONFIGURE_BDBUF_BUFFER_SIZE,CONFIGURE_BDBUF_BUFFER_COUNT,NULL} |
---|
393 | }; |
---|
394 | int rtems_bdbuf_configuration_size =( sizeof(rtems_bdbuf_configuration) |
---|
395 | /sizeof(rtems_bdbuf_configuration[0])); |
---|
396 | #endif /* CONFIGURE_INIT */ |
---|
397 | #endif /* CONFIGURE_HAS_OWN_BDBUF_TABLE */ |
---|
398 | #endif /* CONFIGURE_APPLICATION_NEEDS_LIBBLOCK */ |
---|
399 | /* |
---|
400 | * Default Multiprocessing Configuration Table. The defaults are |
---|
401 | * appropriate for most of the RTEMS Multiprocessor Test Suite. Each |
---|
402 | * value may be overridden within each test to customize the environment. |
---|
403 | */ |
---|
404 | |
---|
405 | #ifdef CONFIGURE_MP_APPLICATION |
---|
406 | #ifndef CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE |
---|
407 | |
---|
408 | #ifndef CONFIGURE_MP_NODE_NUMBER |
---|
409 | #define CONFIGURE_MP_NODE_NUMBER NODE_NUMBER |
---|
410 | #endif |
---|
411 | |
---|
412 | #ifndef CONFIGURE_MP_MAXIMUM_NODES |
---|
413 | #define CONFIGURE_MP_MAXIMUM_NODES 2 |
---|
414 | #endif |
---|
415 | |
---|
416 | #ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS |
---|
417 | #define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 32 |
---|
418 | #endif |
---|
419 | |
---|
420 | #ifndef CONFIGURE_MP_MAXIMUM_PROXIES |
---|
421 | #define CONFIGURE_MP_MAXIMUM_PROXIES 32 |
---|
422 | #endif |
---|
423 | |
---|
424 | #ifndef CONFIGURE_MP_MPCI_TABLE_POINTER |
---|
425 | #include <mpci.h> |
---|
426 | #define CONFIGURE_MP_MPCI_TABLE_POINTER &MPCI_table |
---|
427 | #endif |
---|
428 | |
---|
429 | #ifdef CONFIGURE_INIT |
---|
430 | rtems_multiprocessing_table Multiprocessing_configuration = { |
---|
431 | CONFIGURE_MP_NODE_NUMBER, /* local node number */ |
---|
432 | CONFIGURE_MP_MAXIMUM_NODES, /* maximum # nodes in system */ |
---|
433 | CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS, /* maximum # global objects */ |
---|
434 | CONFIGURE_MP_MAXIMUM_PROXIES, /* maximum # proxies */ |
---|
435 | CONFIGURE_MP_MPCI_TABLE_POINTER /* pointer to MPCI config table */ |
---|
436 | }; |
---|
437 | #endif |
---|
438 | |
---|
439 | #define CONFIGURE_MULTIPROCESSING_TABLE &Multiprocessing_configuration |
---|
440 | |
---|
441 | #endif /* CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE */ |
---|
442 | |
---|
443 | #else |
---|
444 | |
---|
445 | #define CONFIGURE_MULTIPROCESSING_TABLE NULL |
---|
446 | |
---|
447 | #endif /* CONFIGURE_MP_APPLICATION */ |
---|
448 | |
---|
449 | /* |
---|
450 | * Default Configuration Table. |
---|
451 | */ |
---|
452 | |
---|
453 | #ifndef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE |
---|
454 | |
---|
455 | #ifndef CONFIGURE_EXECUTIVE_RAM_WORK_AREA |
---|
456 | #define CONFIGURE_EXECUTIVE_RAM_WORK_AREA NULL |
---|
457 | #endif |
---|
458 | |
---|
459 | #ifndef CONFIGURE_MAXIMUM_TASKS |
---|
460 | #define CONFIGURE_MAXIMUM_TASKS 0 |
---|
461 | #endif |
---|
462 | |
---|
463 | #ifndef CONFIGURE_MAXIMUM_TIMERS |
---|
464 | #define CONFIGURE_MAXIMUM_TIMERS 0 |
---|
465 | #endif |
---|
466 | |
---|
467 | #ifndef CONFIGURE_MAXIMUM_SEMAPHORES |
---|
468 | #define CONFIGURE_MAXIMUM_SEMAPHORES 0 |
---|
469 | #endif |
---|
470 | |
---|
471 | #ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES |
---|
472 | #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 0 |
---|
473 | #endif |
---|
474 | |
---|
475 | #ifndef CONFIGURE_MAXIMUM_PARTITIONS |
---|
476 | #define CONFIGURE_MAXIMUM_PARTITIONS 0 |
---|
477 | #endif |
---|
478 | |
---|
479 | #ifndef CONFIGURE_MAXIMUM_REGIONS |
---|
480 | #define CONFIGURE_MAXIMUM_REGIONS 0 |
---|
481 | #endif |
---|
482 | |
---|
483 | #ifndef CONFIGURE_MAXIMUM_PORTS |
---|
484 | #define CONFIGURE_MAXIMUM_PORTS 0 |
---|
485 | #endif |
---|
486 | |
---|
487 | #ifndef CONFIGURE_MAXIMUM_PERIODS |
---|
488 | #define CONFIGURE_MAXIMUM_PERIODS 0 |
---|
489 | #endif |
---|
490 | |
---|
491 | #ifndef CONFIGURE_MAXIMUM_BARRIERS |
---|
492 | #define CONFIGURE_MAXIMUM_BARRIERS 0 |
---|
493 | #endif |
---|
494 | |
---|
495 | #ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS |
---|
496 | #define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0 |
---|
497 | #endif |
---|
498 | |
---|
499 | #ifndef CONFIGURE_MICROSECONDS_PER_TICK |
---|
500 | #define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(10) |
---|
501 | #endif |
---|
502 | |
---|
503 | #ifndef CONFIGURE_TICKS_PER_TIMESLICE |
---|
504 | #define CONFIGURE_TICKS_PER_TIMESLICE 50 |
---|
505 | #endif |
---|
506 | |
---|
507 | /* |
---|
508 | * Initial Extension Set |
---|
509 | */ |
---|
510 | |
---|
511 | #ifdef CONFIGURE_INIT |
---|
512 | #ifdef STACK_CHECKER_ON |
---|
513 | #include <rtems/stackchk.h> |
---|
514 | #endif |
---|
515 | |
---|
516 | #if defined(CONFIGURE_INITIAL_EXTENSIONS) || \ |
---|
517 | defined(STACK_CHECKER_ON) |
---|
518 | rtems_extensions_table Configuration_Initial_Extensions[] = { |
---|
519 | #ifdef CONFIGURE_INITIAL_EXTENSIONS |
---|
520 | CONFIGURE_INITIAL_EXTENSIONS, |
---|
521 | #endif |
---|
522 | #ifdef STACK_CHECKER_ON |
---|
523 | RTEMS_STACK_CHECKER_EXTENSION, |
---|
524 | #endif |
---|
525 | }; |
---|
526 | |
---|
527 | #define CONFIGURE_INITIAL_EXTENSION_TABLE Configuration_Initial_Extensions |
---|
528 | #define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \ |
---|
529 | ((sizeof(Configuration_Initial_Extensions) / \ |
---|
530 | sizeof(rtems_extensions_table))) |
---|
531 | #else |
---|
532 | #define CONFIGURE_INITIAL_EXTENSION_TABLE NULL |
---|
533 | #define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS 0 |
---|
534 | #endif |
---|
535 | |
---|
536 | |
---|
537 | #endif |
---|
538 | |
---|
539 | /* |
---|
540 | * POSIX API Configuration Parameters |
---|
541 | */ |
---|
542 | |
---|
543 | #ifdef RTEMS_POSIX_API |
---|
544 | |
---|
545 | #include <sys/types.h> |
---|
546 | #include <signal.h> |
---|
547 | #include <limits.h> |
---|
548 | #include <mqueue.h> |
---|
549 | #include <rtems/posix/barrier.h> |
---|
550 | #include <rtems/posix/cond.h> |
---|
551 | #include <rtems/posix/mqueue.h> |
---|
552 | #include <rtems/posix/mutex.h> |
---|
553 | #include <rtems/posix/key.h> |
---|
554 | #include <rtems/posix/psignal.h> |
---|
555 | #include <rtems/posix/rwlock.h> |
---|
556 | #include <rtems/posix/semaphore.h> |
---|
557 | #include <rtems/posix/spinlock.h> |
---|
558 | #include <rtems/posix/threadsup.h> |
---|
559 | #include <rtems/posix/timer.h> |
---|
560 | |
---|
561 | #ifndef CONFIGURE_MAXIMUM_POSIX_THREADS |
---|
562 | #define CONFIGURE_MAXIMUM_POSIX_THREADS 0 |
---|
563 | #endif |
---|
564 | |
---|
565 | #ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES |
---|
566 | #define CONFIGURE_MAXIMUM_POSIX_MUTEXES 0 |
---|
567 | #endif |
---|
568 | |
---|
569 | #ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES |
---|
570 | #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 0 |
---|
571 | #endif |
---|
572 | |
---|
573 | #ifndef CONFIGURE_MAXIMUM_POSIX_KEYS |
---|
574 | #define CONFIGURE_MAXIMUM_POSIX_KEYS 0 |
---|
575 | #endif |
---|
576 | |
---|
577 | #ifndef CONFIGURE_MAXIMUM_POSIX_TIMERS |
---|
578 | #define CONFIGURE_MAXIMUM_POSIX_TIMERS 0 |
---|
579 | #endif |
---|
580 | |
---|
581 | #ifndef CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS |
---|
582 | #define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 0 |
---|
583 | #endif |
---|
584 | |
---|
585 | #ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES |
---|
586 | #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 0 |
---|
587 | #endif |
---|
588 | |
---|
589 | #ifndef CONFIGURE_MAXIMUM_POSIX_SEMAPHORES |
---|
590 | #define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 0 |
---|
591 | #endif |
---|
592 | |
---|
593 | #ifndef CONFIGURE_MAXIMUM_POSIX_BARRIERS |
---|
594 | #define CONFIGURE_MAXIMUM_POSIX_BARRIERS 0 |
---|
595 | #endif |
---|
596 | |
---|
597 | #ifndef CONFIGURE_MAXIMUM_POSIX_SPINLOCKS |
---|
598 | #define CONFIGURE_MAXIMUM_POSIX_SPINLOCKS 0 |
---|
599 | #endif |
---|
600 | |
---|
601 | #ifndef CONFIGURE_MAXIMUM_POSIX_RWLOCKS |
---|
602 | #define CONFIGURE_MAXIMUM_POSIX_RWLOCKS 0 |
---|
603 | #endif |
---|
604 | |
---|
605 | #ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE |
---|
606 | |
---|
607 | #ifdef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE |
---|
608 | |
---|
609 | /* |
---|
610 | * The user is defining their own table information and setting the |
---|
611 | * appropriate variables for the POSIX Initialization Thread Table. |
---|
612 | */ |
---|
613 | |
---|
614 | #else |
---|
615 | |
---|
616 | #ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT |
---|
617 | #define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT POSIX_Init |
---|
618 | #endif |
---|
619 | |
---|
620 | #ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE |
---|
621 | #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2) |
---|
622 | #endif |
---|
623 | |
---|
624 | #ifdef CONFIGURE_INIT |
---|
625 | posix_initialization_threads_table POSIX_Initialization_threads[] = { |
---|
626 | { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT, \ |
---|
627 | CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE } |
---|
628 | }; |
---|
629 | #endif |
---|
630 | |
---|
631 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME POSIX_Initialization_threads |
---|
632 | |
---|
633 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \ |
---|
634 | sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \ |
---|
635 | sizeof(posix_initialization_threads_table) |
---|
636 | |
---|
637 | #endif /* CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */ |
---|
638 | |
---|
639 | #else /* CONFIGURE_POSIX_INIT_THREAD_TABLE */ |
---|
640 | |
---|
641 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL |
---|
642 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0 |
---|
643 | |
---|
644 | #endif |
---|
645 | |
---|
646 | #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \ |
---|
647 | ( \ |
---|
648 | sizeof (POSIX_API_Control) + \ |
---|
649 | (sizeof (void *) * (CONFIGURE_GNAT_KEYS + CONFIGURE_MAXIMUM_POSIX_KEYS)) \ |
---|
650 | ) |
---|
651 | |
---|
652 | #define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) \ |
---|
653 | ((_mutexes) * \ |
---|
654 | ( sizeof(POSIX_Mutex_Control) + CONFIGURE_OBJECT_TABLE_STUFF + \ |
---|
655 | NAME_MAX ) ) |
---|
656 | |
---|
657 | #define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condition_variables) \ |
---|
658 | ((_condition_variables) * \ |
---|
659 | ( sizeof(POSIX_Condition_variables_Control) + \ |
---|
660 | CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
661 | |
---|
662 | #define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys) \ |
---|
663 | ((_keys) * \ |
---|
664 | ( sizeof(POSIX_Keys_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
665 | |
---|
666 | #define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) \ |
---|
667 | ((_timers) * (sizeof(POSIX_Timer_Control) + CONFIGURE_OBJECT_TABLE_STUFF)) |
---|
668 | |
---|
669 | #define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals) \ |
---|
670 | ((_queued_signals) * \ |
---|
671 | ( sizeof(POSIX_signals_Siginfo_node) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
672 | |
---|
673 | #define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) \ |
---|
674 | ((_message_queues) * \ |
---|
675 | ( sizeof( POSIX_Message_queue_Control) + \ |
---|
676 | CONFIGURE_OBJECT_TABLE_STUFF + \ |
---|
677 | NAME_MAX ) ) |
---|
678 | |
---|
679 | #define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) \ |
---|
680 | ((_semaphores) * \ |
---|
681 | ( sizeof( POSIX_Semaphore_Control) + \ |
---|
682 | CONFIGURE_OBJECT_TABLE_STUFF + \ |
---|
683 | NAME_MAX ) ) |
---|
684 | |
---|
685 | #define CONFIGURE_MEMORY_FOR_POSIX_BARRIERS(_barriers) \ |
---|
686 | ((_barriers) * \ |
---|
687 | ( sizeof( POSIX_Barrier_Control) + \ |
---|
688 | CONFIGURE_OBJECT_TABLE_STUFF + \ |
---|
689 | NAME_MAX ) ) |
---|
690 | |
---|
691 | #define CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS(_spinlocks) \ |
---|
692 | ((_spinlocks) * \ |
---|
693 | ( sizeof( POSIX_Spinlock_Control) + \ |
---|
694 | CONFIGURE_OBJECT_TABLE_STUFF + \ |
---|
695 | NAME_MAX ) ) |
---|
696 | |
---|
697 | #define CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS(_rwlocks) \ |
---|
698 | ((_rwlocks) * \ |
---|
699 | ( sizeof( POSIX_RWLock_Control) + \ |
---|
700 | CONFIGURE_OBJECT_TABLE_STUFF + \ |
---|
701 | NAME_MAX ) ) |
---|
702 | |
---|
703 | #define CONFIGURE_MEMORY_FOR_POSIX \ |
---|
704 | ( \ |
---|
705 | CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES ) + \ |
---|
706 | CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES( \ |
---|
707 | CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES ) + \ |
---|
708 | CONFIGURE_MEMORY_FOR_POSIX_KEYS( CONFIGURE_MAXIMUM_POSIX_KEYS ) + \ |
---|
709 | CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( \ |
---|
710 | CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ) + \ |
---|
711 | CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( \ |
---|
712 | CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ) + \ |
---|
713 | CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( \ |
---|
714 | CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ) + \ |
---|
715 | CONFIGURE_MEMORY_FOR_POSIX_BARRIERS( CONFIGURE_MAXIMUM_POSIX_BARRIERS ) + \ |
---|
716 | CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS( \ |
---|
717 | CONFIGURE_MAXIMUM_POSIX_SPINLOCKS ) + \ |
---|
718 | CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS( \ |
---|
719 | CONFIGURE_MAXIMUM_POSIX_RWLOCKS ) + \ |
---|
720 | CONFIGURE_MEMORY_FOR_POSIX_TIMERS( CONFIGURE_MAXIMUM_POSIX_TIMERS ) + \ |
---|
721 | (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE) \ |
---|
722 | ) |
---|
723 | #else |
---|
724 | |
---|
725 | #define CONFIGURE_MAXIMUM_POSIX_THREADS 0 |
---|
726 | #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API 0 |
---|
727 | #define CONFIGURE_MEMORY_FOR_POSIX 0 |
---|
728 | |
---|
729 | |
---|
730 | #endif /* RTEMS_POSIX_API */ |
---|
731 | |
---|
732 | #ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE |
---|
733 | #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE 0 |
---|
734 | #endif |
---|
735 | |
---|
736 | /* |
---|
737 | * ITRON API Configuration Parameters |
---|
738 | */ |
---|
739 | |
---|
740 | #ifdef RTEMS_ITRON_API |
---|
741 | |
---|
742 | #include <rtems/itron.h> |
---|
743 | #include <rtems/itron/config.h> |
---|
744 | #include <rtems/itron/eventflags.h> |
---|
745 | #include <rtems/itron/fmempool.h> |
---|
746 | #include <rtems/itron/mbox.h> |
---|
747 | #include <rtems/itron/msgbuffer.h> |
---|
748 | #include <rtems/itron/port.h> |
---|
749 | #include <rtems/itron/semaphore.h> |
---|
750 | #include <rtems/itron/task.h> |
---|
751 | #include <rtems/itron/vmempool.h> |
---|
752 | |
---|
753 | #ifndef CONFIGURE_MAXIMUM_ITRON_TASKS |
---|
754 | #define CONFIGURE_MAXIMUM_ITRON_TASKS 0 |
---|
755 | #endif |
---|
756 | |
---|
757 | #ifndef CONFIGURE_MAXIMUM_ITRON_SEMAPHORES |
---|
758 | #define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES 0 |
---|
759 | #endif |
---|
760 | |
---|
761 | #ifndef CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS |
---|
762 | #define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS 0 |
---|
763 | #endif |
---|
764 | |
---|
765 | #ifndef CONFIGURE_MAXIMUM_ITRON_MAILBOXES |
---|
766 | #define CONFIGURE_MAXIMUM_ITRON_MAILBOXES 0 |
---|
767 | #endif |
---|
768 | |
---|
769 | #ifndef CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS |
---|
770 | #define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS 0 |
---|
771 | #endif |
---|
772 | |
---|
773 | #ifndef CONFIGURE_MAXIMUM_ITRON_PORTS |
---|
774 | #define CONFIGURE_MAXIMUM_ITRON_PORTS 0 |
---|
775 | #endif |
---|
776 | |
---|
777 | #ifndef CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS |
---|
778 | #define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS 0 |
---|
779 | #endif |
---|
780 | |
---|
781 | #ifndef CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS |
---|
782 | #define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS 0 |
---|
783 | #endif |
---|
784 | |
---|
785 | #ifdef CONFIGURE_ITRON_INIT_TASK_TABLE |
---|
786 | |
---|
787 | #ifdef CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE |
---|
788 | |
---|
789 | /* |
---|
790 | * The user is defining their own table information and setting the |
---|
791 | * appropriate variables for the ITRON Initialization Task Table. |
---|
792 | */ |
---|
793 | |
---|
794 | #else |
---|
795 | |
---|
796 | #ifndef CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT |
---|
797 | #define CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT ITRON_Init |
---|
798 | #endif |
---|
799 | |
---|
800 | #ifndef CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES |
---|
801 | #define CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES TA_HLNG |
---|
802 | #endif |
---|
803 | |
---|
804 | #ifndef CONFIGURE_ITRON_INIT_TASK_PRIORITY |
---|
805 | #define CONFIGURE_ITRON_INIT_TASK_PRIORITY 1 |
---|
806 | #endif |
---|
807 | |
---|
808 | #ifndef CONFIGURE_ITRON_INIT_TASK_STACK_SIZE |
---|
809 | #define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE |
---|
810 | #endif |
---|
811 | |
---|
812 | #ifdef CONFIGURE_INIT |
---|
813 | itron_initialization_tasks_table ITRON_Initialization_tasks[] = { |
---|
814 | { 1, /* ID */ |
---|
815 | { (VP) 0, /* exinfo */ |
---|
816 | CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES, /* task attributes */ |
---|
817 | CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT, /* task start address */ |
---|
818 | CONFIGURE_ITRON_INIT_TASK_PRIORITY, /* initial task priority */ |
---|
819 | CONFIGURE_ITRON_INIT_TASK_STACK_SIZE /* stack size */ |
---|
820 | } |
---|
821 | } |
---|
822 | }; |
---|
823 | #endif |
---|
824 | |
---|
825 | #define CONFIGURE_ITRON_INIT_TASK_TABLE_NAME ITRON_Initialization_tasks |
---|
826 | |
---|
827 | #define CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE \ |
---|
828 | sizeof(CONFIGURE_ITRON_INIT_TASK_TABLE_NAME) / \ |
---|
829 | sizeof(itron_initialization_tasks_table) |
---|
830 | |
---|
831 | #endif /* CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE */ |
---|
832 | |
---|
833 | #else /* CONFIGURE_ITRON_INIT_TASK_TABLE */ |
---|
834 | |
---|
835 | #define CONFIGURE_ITRON_INIT_TASK_TABLE_NAME NULL |
---|
836 | #define CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE 0 |
---|
837 | |
---|
838 | #endif |
---|
839 | |
---|
840 | #define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API \ |
---|
841 | ( \ |
---|
842 | sizeof (ITRON_API_Control) \ |
---|
843 | ) |
---|
844 | |
---|
845 | #define CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES(_semaphores) \ |
---|
846 | ((_semaphores) * \ |
---|
847 | ( sizeof(ITRON_Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
848 | |
---|
849 | #define CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS(_eventflags) \ |
---|
850 | ((_eventflags) * \ |
---|
851 | ( sizeof(ITRON_Eventflags_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
852 | |
---|
853 | #define CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES(_mailboxes) \ |
---|
854 | ((_mailboxes) * \ |
---|
855 | ( sizeof(ITRON_Mailbox_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
856 | |
---|
857 | #define CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS(_message_buffers) \ |
---|
858 | ((_message_buffers) * \ |
---|
859 | ( sizeof(ITRON_Message_buffer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
860 | |
---|
861 | #define CONFIGURE_MEMORY_FOR_ITRON_PORTS(_ports) \ |
---|
862 | ((_ports) * \ |
---|
863 | ( sizeof(ITRON_Port_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
864 | |
---|
865 | #define CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS(_memory_pools) \ |
---|
866 | ((_memory_pools) * \ |
---|
867 | (sizeof(ITRON_Variable_memory_pool_Control) + CONFIGURE_OBJECT_TABLE_STUFF)) |
---|
868 | |
---|
869 | #define CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS(_fixed_memory_pools) \ |
---|
870 | ((_fixed_memory_pools) * \ |
---|
871 | ( sizeof(ITRON_Fixed_memory_pool_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
872 | |
---|
873 | #ifndef CONFIGURE_ITRON_INIT_TASK_STACK_SIZE |
---|
874 | #define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2) |
---|
875 | #endif |
---|
876 | |
---|
877 | |
---|
878 | #define CONFIGURE_MEMORY_FOR_ITRON \ |
---|
879 | ( \ |
---|
880 | CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES( \ |
---|
881 | CONFIGURE_MAXIMUM_ITRON_SEMAPHORES ) + \ |
---|
882 | CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS( \ |
---|
883 | CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS ) + \ |
---|
884 | CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES( \ |
---|
885 | CONFIGURE_MAXIMUM_ITRON_MAILBOXES ) + \ |
---|
886 | CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS( \ |
---|
887 | CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS ) + \ |
---|
888 | CONFIGURE_MEMORY_FOR_ITRON_PORTS( \ |
---|
889 | CONFIGURE_MAXIMUM_ITRON_PORTS ) + \ |
---|
890 | CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS( \ |
---|
891 | CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS ) + \ |
---|
892 | CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS( \ |
---|
893 | CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS ) + \ |
---|
894 | CONFIGURE_ITRON_INIT_TASK_STACK_SIZE \ |
---|
895 | ) |
---|
896 | |
---|
897 | |
---|
898 | #else |
---|
899 | |
---|
900 | #define CONFIGURE_MAXIMUM_ITRON_TASKS 0 |
---|
901 | #define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES 0 |
---|
902 | #define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS 0 |
---|
903 | #define CONFIGURE_MAXIMUM_ITRON_MAILBOXES 0 |
---|
904 | #define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS 0 |
---|
905 | #define CONFIGURE_MAXIMUM_ITRON_PORTS 0 |
---|
906 | #define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS 0 |
---|
907 | #define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS 0 |
---|
908 | #define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API 0 |
---|
909 | #define CONFIGURE_MEMORY_FOR_ITRON 0 |
---|
910 | |
---|
911 | #endif /* RTEMS_ITRON_API */ |
---|
912 | |
---|
913 | |
---|
914 | /* |
---|
915 | * Calculate the RAM size based on the maximum number of objects configured. |
---|
916 | */ |
---|
917 | |
---|
918 | #ifndef CONFIGURE_EXECUTIVE_RAM_SIZE |
---|
919 | |
---|
920 | #define CONFIGURE_OBJECT_TABLE_STUFF \ |
---|
921 | ( sizeof(Objects_Control *) + sizeof(rtems_name *) + sizeof(rtems_name) ) |
---|
922 | |
---|
923 | #if defined(RTEMS_NEWLIB) |
---|
924 | #include <reent.h> |
---|
925 | |
---|
926 | #define CONFIGURE_MEMORY_PER_TASK_FOR_LIBC_REENTRANCY sizeof(struct _reent) |
---|
927 | #else |
---|
928 | #define CONFIGURE_MEMORY_PER_TASK_FOR_LIBC_REENTRANCY 0 |
---|
929 | #endif |
---|
930 | |
---|
931 | #define CONFIGURE_MEMORY_FOR_TASKS(_tasks) \ |
---|
932 | (((_tasks) + 1 ) * \ |
---|
933 | ((sizeof(Thread_Control) + CONTEXT_FP_SIZE + \ |
---|
934 | STACK_MINIMUM_SIZE + sizeof( RTEMS_API_Control ) + \ |
---|
935 | CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API + \ |
---|
936 | CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API + \ |
---|
937 | CONFIGURE_MEMORY_PER_TASK_FOR_LIBC_REENTRANCY + \ |
---|
938 | CONFIGURE_OBJECT_TABLE_STUFF)) \ |
---|
939 | ) |
---|
940 | |
---|
941 | #define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \ |
---|
942 | ((_timers) * ( sizeof(Timer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
943 | |
---|
944 | #define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \ |
---|
945 | ((_semaphores) * \ |
---|
946 | ( sizeof(Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
947 | |
---|
948 | #define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \ |
---|
949 | ( (_queues) * \ |
---|
950 | ( sizeof(Message_queue_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
951 | |
---|
952 | #define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \ |
---|
953 | ( (_partitions) * \ |
---|
954 | ( sizeof(Partition_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
955 | |
---|
956 | #define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \ |
---|
957 | ( (_regions) * \ |
---|
958 | ( sizeof(Region_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
959 | |
---|
960 | #define CONFIGURE_MEMORY_FOR_PORTS(_ports) \ |
---|
961 | ( (_ports) * \ |
---|
962 | ( sizeof(Dual_ported_memory_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
963 | |
---|
964 | #define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \ |
---|
965 | ( (_periods) * \ |
---|
966 | ( sizeof(Rate_monotonic_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
967 | |
---|
968 | #define CONFIGURE_MEMORY_FOR_BARRIERS(_barriers) \ |
---|
969 | ( (_barriers) * \ |
---|
970 | ( sizeof(Barrier_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
971 | |
---|
972 | #define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \ |
---|
973 | ( (_extensions) * \ |
---|
974 | ( sizeof(Extension_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
975 | |
---|
976 | #define CONFIGURE_MEMORY_FOR_DEVICES(_devices) \ |
---|
977 | (((_devices) + 1) * ( sizeof(rtems_driver_name_t) ) ) |
---|
978 | |
---|
979 | #ifdef CONFIGURE_MP_APPLICATION |
---|
980 | |
---|
981 | #ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE |
---|
982 | |
---|
983 | #define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \ |
---|
984 | ( ((_proxies) + 1) * ( sizeof(Thread_Proxy_control) ) ) |
---|
985 | |
---|
986 | #define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \ |
---|
987 | ((_global_objects) * ( sizeof(Objects_MP_Control) ) ) |
---|
988 | |
---|
989 | #define CONFIGURE_MEMORY_FOR_MP \ |
---|
990 | ( CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \ |
---|
991 | CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) + \ |
---|
992 | CONFIGURE_MEMORY_FOR_TASKS(1) \ |
---|
993 | ) |
---|
994 | |
---|
995 | #endif /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */ |
---|
996 | |
---|
997 | #else |
---|
998 | |
---|
999 | #define CONFIGURE_MEMORY_FOR_MP 0 |
---|
1000 | |
---|
1001 | #endif |
---|
1002 | |
---|
1003 | #ifndef CONFIGURE_MEMORY_OVERHEAD |
---|
1004 | #define CONFIGURE_MEMORY_OVERHEAD 0 |
---|
1005 | #endif |
---|
1006 | |
---|
1007 | #ifndef CONFIGURE_EXTRA_TASK_STACKS |
---|
1008 | #define CONFIGURE_EXTRA_TASK_STACKS 0 |
---|
1009 | #endif |
---|
1010 | |
---|
1011 | #define CONFIGURE_API_MUTEX_MEMORY \ |
---|
1012 | ( (1) * \ |
---|
1013 | ( sizeof(API_Mutex_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) \ |
---|
1014 | ) |
---|
1015 | |
---|
1016 | #define CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD \ |
---|
1017 | ( CONFIGURE_MEMORY_FOR_TASKS(1) + /* IDLE */ \ |
---|
1018 | (256 * 12) + /* Ready chains */ \ |
---|
1019 | 256 + /* name/ptr table overhead */ \ |
---|
1020 | CONFIGURE_INTERRUPT_STACK_MEMORY + /* interrupt stack */ \ |
---|
1021 | CONFIGURE_API_MUTEX_MEMORY /* allocation mutex */ \ |
---|
1022 | ) |
---|
1023 | |
---|
1024 | /* |
---|
1025 | * Now account for any extra memory that initialization tasks or threads |
---|
1026 | * may have requested. |
---|
1027 | */ |
---|
1028 | |
---|
1029 | #ifdef RTEMS_POSIX_API |
---|
1030 | #define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART \ |
---|
1031 | (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE - RTEMS_MINIMUM_STACK_SIZE) |
---|
1032 | #else |
---|
1033 | #define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART 0 |
---|
1034 | #endif |
---|
1035 | #ifdef RTEMS_ITRON_API |
---|
1036 | #define CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART \ |
---|
1037 | (CONFIGURE_ITRON_INIT_TASK_STACK_SIZE - RTEMS_MINIMUM_STACK_SIZE) |
---|
1038 | #else |
---|
1039 | #define CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART 0 |
---|
1040 | #endif |
---|
1041 | |
---|
1042 | #define CONFIGURE_INITIALIZATION_THREADS_STACKS \ |
---|
1043 | ((CONFIGURE_INIT_TASK_STACK_SIZE - RTEMS_MINIMUM_STACK_SIZE) + \ |
---|
1044 | CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART + \ |
---|
1045 | CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART) |
---|
1046 | |
---|
1047 | #define CONFIGURE_EXECUTIVE_RAM_SIZE \ |
---|
1048 | (( CONFIGURE_MEMORY_FOR_POSIX + \ |
---|
1049 | CONFIGURE_MEMORY_FOR_ITRON + \ |
---|
1050 | CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS + \ |
---|
1051 | CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS + \ |
---|
1052 | CONFIGURE_MAXIMUM_ITRON_TASKS ) + \ |
---|
1053 | CONFIGURE_INITIALIZATION_THREADS_STACKS + \ |
---|
1054 | CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \ |
---|
1055 | CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES + \ |
---|
1056 | CONFIGURE_LIBIO_SEMAPHORES + CONFIGURE_TERMIOS_SEMAPHORES) + \ |
---|
1057 | CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \ |
---|
1058 | CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \ |
---|
1059 | CONFIGURE_MEMORY_FOR_REGIONS( \ |
---|
1060 | CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION ) + \ |
---|
1061 | CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \ |
---|
1062 | CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \ |
---|
1063 | CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_MAXIMUM_BARRIERS) + \ |
---|
1064 | CONFIGURE_MEMORY_FOR_USER_EXTENSIONS( \ |
---|
1065 | CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION + \ |
---|
1066 | CONFIGURE_STACK_CHECKER_EXTENSION ) + \ |
---|
1067 | CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \ |
---|
1068 | CONFIGURE_MEMORY_FOR_MP + \ |
---|
1069 | CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD + \ |
---|
1070 | (((CONFIGURE_MEMORY_OVERHEAD)+1) * 1024) + \ |
---|
1071 | (CONFIGURE_EXTRA_TASK_STACKS) + (CONFIGURE_ADA_TASKS_STACK) \ |
---|
1072 | ) & 0xfffffc00) |
---|
1073 | #endif |
---|
1074 | |
---|
1075 | #ifdef CONFIGURE_GNAT_RTEMS |
---|
1076 | #define CONFIGURE_GNAT_MUTEXES 10 |
---|
1077 | /* GNAT/RTEMS provides an optimized Ada self and does not use POSIX Keys */ |
---|
1078 | #define CONFIGURE_GNAT_KEYS 0 |
---|
1079 | |
---|
1080 | /* 20 are required to run all tests in the ACVC */ |
---|
1081 | #ifndef CONFIGURE_MAXIMUM_ADA_TASKS |
---|
1082 | #define CONFIGURE_MAXIMUM_ADA_TASKS 20 |
---|
1083 | #endif |
---|
1084 | |
---|
1085 | /* This is the number of non-Ada tasks which invoked Ada code. */ |
---|
1086 | #ifndef CONFIGURE_MAXIMUM_FAKE_ADA_TASKS |
---|
1087 | #define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0 |
---|
1088 | #endif |
---|
1089 | |
---|
1090 | /* Ada tasks are allocated twice the minimum stack space */ |
---|
1091 | #define CONFIGURE_ADA_TASKS_STACK \ |
---|
1092 | (CONFIGURE_MAXIMUM_ADA_TASKS * (RTEMS_MINIMUM_STACK_SIZE + (6 * 1024))) |
---|
1093 | |
---|
1094 | #else |
---|
1095 | #define CONFIGURE_GNAT_MUTEXES 0 |
---|
1096 | #define CONFIGURE_GNAT_KEYS 0 |
---|
1097 | #define CONFIGURE_MAXIMUM_ADA_TASKS 0 |
---|
1098 | #define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0 |
---|
1099 | #define CONFIGURE_ADA_TASKS_STACK 0 |
---|
1100 | #endif |
---|
1101 | |
---|
1102 | |
---|
1103 | #ifdef CONFIGURE_INIT |
---|
1104 | |
---|
1105 | rtems_api_configuration_table Configuration_RTEMS_API = { |
---|
1106 | CONFIGURE_MAXIMUM_TASKS, |
---|
1107 | CONFIGURE_MAXIMUM_TIMERS, |
---|
1108 | CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES + |
---|
1109 | CONFIGURE_TERMIOS_SEMAPHORES, |
---|
1110 | CONFIGURE_MAXIMUM_MESSAGE_QUEUES, |
---|
1111 | CONFIGURE_MAXIMUM_PARTITIONS, |
---|
1112 | CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION, |
---|
1113 | CONFIGURE_MAXIMUM_PORTS, |
---|
1114 | CONFIGURE_MAXIMUM_PERIODS, |
---|
1115 | CONFIGURE_MAXIMUM_BARRIERS, |
---|
1116 | CONFIGURE_INIT_TASK_TABLE_SIZE, |
---|
1117 | CONFIGURE_INIT_TASK_TABLE |
---|
1118 | }; |
---|
1119 | |
---|
1120 | #ifdef RTEMS_POSIX_API |
---|
1121 | posix_api_configuration_table Configuration_POSIX_API = { |
---|
1122 | CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS, |
---|
1123 | CONFIGURE_MAXIMUM_POSIX_MUTEXES + CONFIGURE_GNAT_MUTEXES + |
---|
1124 | CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS, |
---|
1125 | CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES + |
---|
1126 | CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS, |
---|
1127 | CONFIGURE_MAXIMUM_POSIX_KEYS + CONFIGURE_GNAT_KEYS, |
---|
1128 | CONFIGURE_MAXIMUM_POSIX_TIMERS, |
---|
1129 | CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS, |
---|
1130 | CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES, |
---|
1131 | CONFIGURE_MAXIMUM_POSIX_SEMAPHORES, |
---|
1132 | CONFIGURE_MAXIMUM_POSIX_BARRIERS, |
---|
1133 | CONFIGURE_MAXIMUM_POSIX_RWLOCKS, |
---|
1134 | CONFIGURE_MAXIMUM_POSIX_SPINLOCKS, |
---|
1135 | CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE, |
---|
1136 | CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME |
---|
1137 | }; |
---|
1138 | #endif |
---|
1139 | |
---|
1140 | #ifdef RTEMS_ITRON_API |
---|
1141 | itron_api_configuration_table Configuration_ITRON_API = { |
---|
1142 | CONFIGURE_MAXIMUM_ITRON_TASKS, |
---|
1143 | CONFIGURE_MAXIMUM_ITRON_SEMAPHORES, |
---|
1144 | CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS, |
---|
1145 | CONFIGURE_MAXIMUM_ITRON_MAILBOXES, |
---|
1146 | CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS, |
---|
1147 | CONFIGURE_MAXIMUM_ITRON_PORTS, |
---|
1148 | CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS, |
---|
1149 | CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS, |
---|
1150 | CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE, |
---|
1151 | CONFIGURE_ITRON_INIT_TASK_TABLE_NAME |
---|
1152 | }; |
---|
1153 | #endif |
---|
1154 | |
---|
1155 | rtems_configuration_table Configuration = { |
---|
1156 | CONFIGURE_EXECUTIVE_RAM_WORK_AREA, |
---|
1157 | CONFIGURE_EXECUTIVE_RAM_SIZE, |
---|
1158 | CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION + |
---|
1159 | CONFIGURE_STACK_CHECKER_EXTENSION, |
---|
1160 | CONFIGURE_MICROSECONDS_PER_TICK, |
---|
1161 | CONFIGURE_TICKS_PER_TIMESLICE, |
---|
1162 | CONFIGURE_MAXIMUM_DEVICES, |
---|
1163 | CONFIGURE_MAXIMUM_DRIVERS, |
---|
1164 | CONFIGURE_NUMBER_OF_DRIVERS, /* number of device drivers */ |
---|
1165 | Device_drivers, /* pointer to driver table */ |
---|
1166 | CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS, /* number of initial extensions */ |
---|
1167 | CONFIGURE_INITIAL_EXTENSION_TABLE, /* pointer to initial extensions */ |
---|
1168 | CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */ |
---|
1169 | &Configuration_RTEMS_API, /* pointer to RTEMS API config */ |
---|
1170 | #ifdef RTEMS_POSIX_API |
---|
1171 | &Configuration_POSIX_API, /* pointer to POSIX API config */ |
---|
1172 | #else |
---|
1173 | NULL, /* pointer to POSIX API config */ |
---|
1174 | #endif |
---|
1175 | #ifdef RTEMS_ITRON_API |
---|
1176 | &Configuration_ITRON_API /* pointer to ITRON API config */ |
---|
1177 | #else |
---|
1178 | NULL /* pointer to ITRON API config */ |
---|
1179 | #endif |
---|
1180 | }; |
---|
1181 | #endif |
---|
1182 | |
---|
1183 | #endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */ |
---|
1184 | |
---|
1185 | /* |
---|
1186 | * If the user has configured a set of Classic API Initialization Tasks, |
---|
1187 | * then we need to install the code that runs that loop. |
---|
1188 | */ |
---|
1189 | #ifdef CONFIGURE_INIT |
---|
1190 | #ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
1191 | void (_RTEMS_tasks_Initialize_user_tasks_body)(void); |
---|
1192 | void (*_RTEMS_tasks_Initialize_user_tasks_p)(void) = |
---|
1193 | _RTEMS_tasks_Initialize_user_tasks_body; |
---|
1194 | #else |
---|
1195 | void (*_RTEMS_tasks_Initialize_user_tasks_p)(void) = NULL; |
---|
1196 | #endif |
---|
1197 | #endif |
---|
1198 | |
---|
1199 | /* |
---|
1200 | * If the user has configured a set of POSIX Initialization Threads, |
---|
1201 | * then we need to install the code that runs that loop. |
---|
1202 | */ |
---|
1203 | #ifdef CONFIGURE_INIT |
---|
1204 | #ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE |
---|
1205 | void _POSIX_Threads_Initialize_user_threads_body(void); |
---|
1206 | void (*_POSIX_Threads_Initialize_user_threads_p)(void) = |
---|
1207 | _POSIX_Threads_Initialize_user_threads_body; |
---|
1208 | #else |
---|
1209 | void (*_POSIX_Threads_Initialize_user_threads_p)(void) = NULL; |
---|
1210 | #endif |
---|
1211 | #endif |
---|
1212 | |
---|
1213 | /* |
---|
1214 | * If the user has configured a set of ITRON Initialization Tasks, |
---|
1215 | * then we need to install the code that runs that loop. |
---|
1216 | */ |
---|
1217 | #ifdef CONFIGURE_INIT |
---|
1218 | #ifdef CONFIGURE_ITRON_INIT_TASK_TABLE |
---|
1219 | void _ITRON_Task_Initialize_user_tasks_body(void); |
---|
1220 | void (*_ITRON_Initialize_user_tasks_p)(void) = |
---|
1221 | _ITRON_Task_Initialize_user_tasks_body; |
---|
1222 | #else |
---|
1223 | void (*_ITRON_Initialize_user_tasks_p)(void) = NULL; |
---|
1224 | #endif |
---|
1225 | #endif |
---|
1226 | |
---|
1227 | #ifdef __cplusplus |
---|
1228 | } |
---|
1229 | #endif |
---|
1230 | |
---|
1231 | /* |
---|
1232 | * Some warnings and error checking |
---|
1233 | */ |
---|
1234 | |
---|
1235 | /* |
---|
1236 | * Make sure a task/thread of some sort is configured |
---|
1237 | */ |
---|
1238 | |
---|
1239 | #if (CONFIGURE_MAXIMUM_TASKS == 0) && \ |
---|
1240 | (CONFIGURE_MAXIMUM_POSIX_THREADS == 0) && \ |
---|
1241 | (CONFIGURE_MAXIMUM_ADA_TASKS == 0) && \ |
---|
1242 | (CONFIGURE_MAXIMUM_ITRON_TASKS == 0) |
---|
1243 | #error "CONFIGURATION ERROR: No tasks or threads configured!!" |
---|
1244 | #endif |
---|
1245 | |
---|
1246 | /* |
---|
1247 | * Make sure at least one of the initialization task/thread |
---|
1248 | * tables was defined. |
---|
1249 | */ |
---|
1250 | |
---|
1251 | #if !defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) && \ |
---|
1252 | !defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) && \ |
---|
1253 | !defined(CONFIGURE_ITRON_INIT_TASK_TABLE) |
---|
1254 | #error "CONFIGURATION ERROR: No initialization tasks or threads configured!!" |
---|
1255 | #endif |
---|
1256 | |
---|
1257 | /* |
---|
1258 | * These names have been obsoleted so make the user application stop compiling |
---|
1259 | */ |
---|
1260 | #if defined(CONFIGURE_TEST_NEEDS_TIMER_DRIVER) || \ |
---|
1261 | defined(CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER) || \ |
---|
1262 | defined(CONFIGURE_TEST_NEEDS_CLOCK_DRIVER) || \ |
---|
1263 | defined(CONFIGURE_TEST_NEEDS_RTC_DRIVER) || \ |
---|
1264 | defined(CONFIGURE_TEST_NEEDS_STUB_DRIVER) |
---|
1265 | #error "CONFIGURATION ERROR: CONFIGURE_TEST_XXX constants are obsolete" |
---|
1266 | #endif |
---|
1267 | |
---|
1268 | |
---|
1269 | #endif |
---|
1270 | /* end of include file */ |
---|