1 | /* confdefs.h |
---|
2 | * |
---|
3 | * This include file contains the configuration table template that will |
---|
4 | * be used by the single processor tests to define its default configuration |
---|
5 | * parameters. |
---|
6 | * |
---|
7 | * COPYRIGHT (c) 1989-1998. |
---|
8 | * On-Line Applications Research Corporation (OAR). |
---|
9 | * Copyright assigned to U.S. Government, 1994. |
---|
10 | * |
---|
11 | * The license and distribution terms for this file may be |
---|
12 | * found in the file LICENSE in this distribution or at |
---|
13 | * http://www.OARcorp.com/rtems/license.html. |
---|
14 | * |
---|
15 | * $Id$ |
---|
16 | */ |
---|
17 | |
---|
18 | #ifndef __CONFIGURATION_TEMPLATE_h |
---|
19 | #define __CONFIGURATION_TEMPLATE_h |
---|
20 | |
---|
21 | #ifdef __cplusplus |
---|
22 | extern "C" { |
---|
23 | #endif |
---|
24 | |
---|
25 | extern rtems_initialization_tasks_table Initialization_tasks[]; |
---|
26 | extern rtems_driver_address_table Device_drivers[]; |
---|
27 | extern rtems_configuration_table Configuration; |
---|
28 | extern rtems_multiprocessing_table Multiprocessing_configuration; |
---|
29 | #ifdef RTEMS_POSIX_API |
---|
30 | extern posix_api_configuration_table Configuration_POSIX_API; |
---|
31 | #endif |
---|
32 | #ifdef RTEMS_ITRON_API |
---|
33 | extern itron_api_configuration_table Configuration_ITRON_API; |
---|
34 | #endif |
---|
35 | |
---|
36 | /* |
---|
37 | * RTEMS C Library and Newlib support |
---|
38 | * |
---|
39 | * NOTE: This ends up defining these even when newlib is not used. |
---|
40 | */ |
---|
41 | |
---|
42 | #define CONFIGURE_NEWLIB_EXTENSION 1 |
---|
43 | #define CONFIGURE_MALLOC_REGION 1 |
---|
44 | |
---|
45 | #ifndef CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS |
---|
46 | #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20 |
---|
47 | #endif |
---|
48 | |
---|
49 | #define CONFIGURE_LIBIO_SEMAPHORES \ |
---|
50 | (CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS + 1) |
---|
51 | |
---|
52 | #ifdef CONFIGURE_INIT |
---|
53 | unsigned32 rtems_libio_number_iops = CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS; |
---|
54 | #endif |
---|
55 | |
---|
56 | /* |
---|
57 | * Mount Table Configuration |
---|
58 | */ |
---|
59 | |
---|
60 | #include <imfs.h> |
---|
61 | |
---|
62 | #ifdef CONFIGURE_INIT |
---|
63 | |
---|
64 | #ifndef CONFIGURE_HAS_OWN_MOUNT_TABLE |
---|
65 | rtems_filesystem_mount_table_t configuration_mount_table = { |
---|
66 | #ifdef CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM |
---|
67 | &miniIMFS_ops, |
---|
68 | #else /* using IMFS as base filesystem */ |
---|
69 | &IMFS_ops, |
---|
70 | #endif |
---|
71 | RTEMS_FILESYSTEM_READ_WRITE, |
---|
72 | NULL, |
---|
73 | NULL |
---|
74 | }; |
---|
75 | |
---|
76 | rtems_filesystem_mount_table_t |
---|
77 | *rtems_filesystem_mount_table = &configuration_mount_table; |
---|
78 | int rtems_filesystem_mount_table_size = 1; |
---|
79 | #endif |
---|
80 | |
---|
81 | #endif |
---|
82 | |
---|
83 | |
---|
84 | /* |
---|
85 | * Stack Checker Requirements |
---|
86 | * |
---|
87 | * NOTE: This does not automatically enable reporting at program exit. |
---|
88 | */ |
---|
89 | |
---|
90 | #ifdef STACK_CHECKER_ON |
---|
91 | #define CONFIGURE_STACK_CHECKER_EXTENSION 1 |
---|
92 | #else |
---|
93 | #define CONFIGURE_STACK_CHECKER_EXTENSION 0 |
---|
94 | #endif |
---|
95 | |
---|
96 | /* |
---|
97 | * Interrupt Stack Space |
---|
98 | */ |
---|
99 | |
---|
100 | #if (CPU_ALLOCATE_INTERRUPT_STACK == 0) |
---|
101 | #define CONFIGURE_INTERRUPT_STACK_MEMORY 0 |
---|
102 | #else |
---|
103 | #ifndef CONFIGURE_INTERRUPT_STACK_MEMORY |
---|
104 | #define CONFIGURE_INTERRUPT_STACK_MEMORY RTEMS_MINIMUM_STACK_SIZE |
---|
105 | #else |
---|
106 | #define CONFIGURE_INTERRUPT_STACK_MEMORY 0 |
---|
107 | #endif |
---|
108 | #endif |
---|
109 | |
---|
110 | /* |
---|
111 | * Default User Initialization Task Table. This table guarantees that |
---|
112 | * one user initialization table is defined. |
---|
113 | */ |
---|
114 | |
---|
115 | #ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
116 | |
---|
117 | #ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE |
---|
118 | |
---|
119 | /* |
---|
120 | * The user is defining their own table information and setting the |
---|
121 | * appropriate variables. |
---|
122 | */ |
---|
123 | |
---|
124 | #else |
---|
125 | |
---|
126 | #ifndef CONFIGURE_INIT_TASK_NAME |
---|
127 | #define CONFIGURE_INIT_TASK_NAME rtems_build_name( 'U', 'I', '1', ' ' ) |
---|
128 | #endif |
---|
129 | |
---|
130 | #ifndef CONFIGURE_INIT_TASK_STACK_SIZE |
---|
131 | #define CONFIGURE_INIT_TASK_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE |
---|
132 | #endif |
---|
133 | |
---|
134 | #ifndef CONFIGURE_INIT_TASK_PRIORITY |
---|
135 | #define CONFIGURE_INIT_TASK_PRIORITY 1 |
---|
136 | #endif |
---|
137 | |
---|
138 | #ifndef CONFIGURE_INIT_TASK_ATTRIBUTES |
---|
139 | #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES |
---|
140 | #endif |
---|
141 | |
---|
142 | #ifndef CONFIGURE_INIT_TASK_ENTRY_POINT |
---|
143 | #define CONFIGURE_INIT_TASK_ENTRY_POINT Init |
---|
144 | #endif |
---|
145 | |
---|
146 | #ifndef CONFIGURE_INIT_TASK_INITIAL_MODES |
---|
147 | #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT |
---|
148 | #endif |
---|
149 | |
---|
150 | #ifndef CONFIGURE_INIT_TASK_ARGUMENTS |
---|
151 | #define CONFIGURE_INIT_TASK_ARGUMENTS 0 |
---|
152 | #endif |
---|
153 | |
---|
154 | #ifdef CONFIGURE_INIT |
---|
155 | rtems_initialization_tasks_table Initialization_tasks[] = { |
---|
156 | { CONFIGURE_INIT_TASK_NAME, |
---|
157 | CONFIGURE_INIT_TASK_STACK_SIZE, |
---|
158 | CONFIGURE_INIT_TASK_PRIORITY, |
---|
159 | CONFIGURE_INIT_TASK_ATTRIBUTES, |
---|
160 | CONFIGURE_INIT_TASK_ENTRY_POINT, |
---|
161 | CONFIGURE_INIT_TASK_INITIAL_MODES, |
---|
162 | CONFIGURE_INIT_TASK_ARGUMENTS |
---|
163 | } |
---|
164 | }; |
---|
165 | #endif |
---|
166 | |
---|
167 | #define CONFIGURE_INIT_TASK_TABLE Initialization_tasks |
---|
168 | |
---|
169 | #define CONFIGURE_INIT_TASK_TABLE_SIZE \ |
---|
170 | sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table) |
---|
171 | |
---|
172 | #endif /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */ |
---|
173 | |
---|
174 | #else /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */ |
---|
175 | |
---|
176 | #define CONFIGURE_INIT_TASK_TABLE NULL |
---|
177 | #define CONFIGURE_INIT_TASK_TABLE_SIZE 0 |
---|
178 | |
---|
179 | #endif |
---|
180 | |
---|
181 | /* |
---|
182 | * Default Device Driver Table. Each driver needed by the test is explicitly |
---|
183 | * choosen by that test. There is always a null driver entry. |
---|
184 | */ |
---|
185 | |
---|
186 | #define NULL_DRIVER_TABLE_ENTRY \ |
---|
187 | { NULL, NULL, NULL, NULL, NULL, NULL } |
---|
188 | |
---|
189 | #ifdef CONFIGURE_TEST_NEEDS_TIMER_DRIVER |
---|
190 | #include <timerdrv.h> |
---|
191 | #endif |
---|
192 | |
---|
193 | #ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER |
---|
194 | #include <stubdrv.h> |
---|
195 | #endif |
---|
196 | |
---|
197 | #ifndef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE |
---|
198 | |
---|
199 | #ifdef CONFIGURE_INIT |
---|
200 | rtems_driver_address_table Device_drivers[] = { |
---|
201 | #ifdef CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER |
---|
202 | CONSOLE_DRIVER_TABLE_ENTRY, |
---|
203 | #endif |
---|
204 | #ifdef CONFIGURE_TEST_NEEDS_CLOCK_DRIVER |
---|
205 | CLOCK_DRIVER_TABLE_ENTRY, |
---|
206 | #endif |
---|
207 | #ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER |
---|
208 | STUB_DRIVER_TABLE_ENTRY, |
---|
209 | #endif |
---|
210 | NULL_DRIVER_TABLE_ENTRY |
---|
211 | }; |
---|
212 | #endif |
---|
213 | |
---|
214 | #endif /* CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE */ |
---|
215 | |
---|
216 | /* |
---|
217 | * Default the number of devices per device driver. This value may be |
---|
218 | * overridden by the user. |
---|
219 | */ |
---|
220 | |
---|
221 | #ifndef CONFIGURE_HAS_OWN_NUMBER_OF_DEVICES |
---|
222 | |
---|
223 | #ifndef CONFIGURE_MAXIMUM_DEVICES |
---|
224 | #define CONFIGURE_MAXIMUM_DEVICES 20 |
---|
225 | #endif |
---|
226 | |
---|
227 | #endif /* CONFIGURE_HAS_OWN_NUMBER_OF_DEVICES */ |
---|
228 | |
---|
229 | /* |
---|
230 | * Default Configuration Table. This table contains the most values set in |
---|
231 | * the RTEMS Test Suite. Each value may be overridden within each test to |
---|
232 | * customize the environment. |
---|
233 | */ |
---|
234 | |
---|
235 | #ifdef CONFIGURE_MPTEST |
---|
236 | #ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE |
---|
237 | |
---|
238 | #ifndef CONFIGURE_MP_NODE_NUMBER |
---|
239 | #define CONFIGURE_MP_NODE_NUMBER NODE_NUMBER |
---|
240 | #endif |
---|
241 | |
---|
242 | #ifndef CONFIGURE_MP_MAXIMUM_NODES |
---|
243 | #define CONFIGURE_MP_MAXIMUM_NODES 2 |
---|
244 | #endif |
---|
245 | |
---|
246 | #ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS |
---|
247 | #define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 32 |
---|
248 | #endif |
---|
249 | |
---|
250 | #ifndef CONFIGURE_MP_MAXIMUM_PROXIES |
---|
251 | #define CONFIGURE_MP_MAXIMUM_PROXIES 32 |
---|
252 | #endif |
---|
253 | |
---|
254 | #ifndef CONFIGURE_MP_MPCI_TABLE_POINTER |
---|
255 | #include <mpci.h> |
---|
256 | #define CONFIGURE_MP_MPCI_TABLE_POINTER &MPCI_table |
---|
257 | #endif |
---|
258 | |
---|
259 | #ifdef CONFIGURE_INIT |
---|
260 | rtems_multiprocessing_table Multiprocessing_configuration = { |
---|
261 | CONFIGURE_MP_NODE_NUMBER, /* local node number */ |
---|
262 | CONFIGURE_MP_MAXIMUM_NODES, /* maximum # nodes in system */ |
---|
263 | CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS, /* maximum # global objects */ |
---|
264 | CONFIGURE_MP_MAXIMUM_PROXIES, /* maximum # proxies */ |
---|
265 | CONFIGURE_MP_MPCI_TABLE_POINTER /* pointer to MPCI config table */ |
---|
266 | }; |
---|
267 | #endif |
---|
268 | |
---|
269 | #define CONFIGURE_MULTIPROCESSING_TABLE &Multiprocessing_configuration |
---|
270 | |
---|
271 | #endif /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */ |
---|
272 | |
---|
273 | #else |
---|
274 | |
---|
275 | #define CONFIGURE_MULTIPROCESSING_TABLE NULL |
---|
276 | |
---|
277 | #endif /* CONFIGURE_MPTEST */ |
---|
278 | |
---|
279 | /* |
---|
280 | * Default Configuration Table. This table contains the most values set in |
---|
281 | * the RTEMS Test Suite. Each value may be overridden within each test to |
---|
282 | * customize the environment. |
---|
283 | */ |
---|
284 | |
---|
285 | #ifndef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE |
---|
286 | |
---|
287 | #ifndef CONFIGURE_EXECUTIVE_RAM_WORK_AREA |
---|
288 | #define CONFIGURE_EXECUTIVE_RAM_WORK_AREA NULL |
---|
289 | #endif |
---|
290 | |
---|
291 | #ifndef CONFIGURE_MAXIMUM_TASKS |
---|
292 | #define CONFIGURE_MAXIMUM_TASKS 10 |
---|
293 | #endif |
---|
294 | |
---|
295 | #ifndef CONFIGURE_MAXIMUM_TIMERS |
---|
296 | #define CONFIGURE_MAXIMUM_TIMERS 0 |
---|
297 | #endif |
---|
298 | |
---|
299 | #ifndef CONFIGURE_MAXIMUM_SEMAPHORES |
---|
300 | #define CONFIGURE_MAXIMUM_SEMAPHORES 0 |
---|
301 | #endif |
---|
302 | |
---|
303 | #ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES |
---|
304 | #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 0 |
---|
305 | #endif |
---|
306 | |
---|
307 | #ifndef CONFIGURE_MAXIMUM_PARTITIONS |
---|
308 | #define CONFIGURE_MAXIMUM_PARTITIONS 0 |
---|
309 | #endif |
---|
310 | |
---|
311 | #ifndef CONFIGURE_MAXIMUM_REGIONS |
---|
312 | #define CONFIGURE_MAXIMUM_REGIONS 0 |
---|
313 | #endif |
---|
314 | |
---|
315 | #ifndef CONFIGURE_MAXIMUM_PORTS |
---|
316 | #define CONFIGURE_MAXIMUM_PORTS 0 |
---|
317 | #endif |
---|
318 | |
---|
319 | #ifndef CONFIGURE_MAXIMUM_PERIODS |
---|
320 | #define CONFIGURE_MAXIMUM_PERIODS 0 |
---|
321 | #endif |
---|
322 | |
---|
323 | #ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS |
---|
324 | #define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0 |
---|
325 | #endif |
---|
326 | |
---|
327 | #ifndef CONFIGURE_MICROSECONDS_PER_TICK |
---|
328 | #define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(10) |
---|
329 | #endif |
---|
330 | |
---|
331 | #ifndef CONFIGURE_TICKS_PER_TIMESLICE |
---|
332 | #define CONFIGURE_TICKS_PER_TIMESLICE 50 |
---|
333 | #endif |
---|
334 | |
---|
335 | /* |
---|
336 | * Initial Extension Set |
---|
337 | */ |
---|
338 | |
---|
339 | #ifdef CONFIGURE_INIT |
---|
340 | #ifdef STACK_CHECKER_ON |
---|
341 | #include <rtems/stackchk.h> |
---|
342 | #endif |
---|
343 | |
---|
344 | rtems_extensions_table Configuration_Initial_Extensions[] = { |
---|
345 | #ifdef CONFIGURE_INITIAL_EXTENSIONS |
---|
346 | CONFIGURE_INITIAL_EXTENSIONS, |
---|
347 | #endif |
---|
348 | #ifdef STACK_CHECKER_ON |
---|
349 | STACK_CHECKER_EXTENSION, |
---|
350 | #endif |
---|
351 | { NULL, NULL, NULL, NULL, NULL, NULL, NULL } |
---|
352 | }; |
---|
353 | |
---|
354 | #define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \ |
---|
355 | ((sizeof(Configuration_Initial_Extensions) / \ |
---|
356 | sizeof(rtems_extensions_table)) - 1) |
---|
357 | |
---|
358 | #endif |
---|
359 | |
---|
360 | /* |
---|
361 | * POSIX API Configuration Parameters |
---|
362 | */ |
---|
363 | |
---|
364 | #ifdef RTEMS_POSIX_API |
---|
365 | |
---|
366 | #include <sys/types.h> |
---|
367 | #include <sys/siginfo.h> |
---|
368 | #include <mqueue.h> |
---|
369 | #include <rtems/posix/cond.h> |
---|
370 | #include <rtems/posix/mqueue.h> |
---|
371 | #include <rtems/posix/mutex.h> |
---|
372 | #include <rtems/posix/key.h> |
---|
373 | #include <rtems/posix/psignal.h> |
---|
374 | #include <rtems/posix/semaphore.h> |
---|
375 | #include <rtems/posix/threadsup.h> |
---|
376 | |
---|
377 | #ifndef CONFIGURE_MAXIMUM_POSIX_THREADS |
---|
378 | #define CONFIGURE_MAXIMUM_POSIX_THREADS 10 |
---|
379 | #endif |
---|
380 | |
---|
381 | #ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES |
---|
382 | #define CONFIGURE_MAXIMUM_POSIX_MUTEXES 0 |
---|
383 | #endif |
---|
384 | |
---|
385 | #ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES |
---|
386 | #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 0 |
---|
387 | #endif |
---|
388 | |
---|
389 | #ifndef CONFIGURE_MAXIMUM_POSIX_KEYS |
---|
390 | #define CONFIGURE_MAXIMUM_POSIX_KEYS 0 |
---|
391 | #endif |
---|
392 | |
---|
393 | #ifndef CONFIGURE_MAXIMUM_POSIX_TIMERS |
---|
394 | #define CONFIGURE_MAXIMUM_POSIX_TIMERS 0 |
---|
395 | #endif |
---|
396 | |
---|
397 | #ifndef CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS |
---|
398 | #define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 0 |
---|
399 | #endif |
---|
400 | |
---|
401 | #ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES |
---|
402 | #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 0 |
---|
403 | #endif |
---|
404 | |
---|
405 | #ifndef CONFIGURE_MAXIMUM_POSIX_SEMAPHORES |
---|
406 | #define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 0 |
---|
407 | #endif |
---|
408 | |
---|
409 | #ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE |
---|
410 | |
---|
411 | #ifdef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE |
---|
412 | |
---|
413 | /* |
---|
414 | * The user is defining their own table information and setting the |
---|
415 | * appropriate variables. |
---|
416 | */ |
---|
417 | |
---|
418 | #else |
---|
419 | |
---|
420 | #ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT |
---|
421 | #define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT POSIX_Init |
---|
422 | #endif |
---|
423 | |
---|
424 | #ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE |
---|
425 | #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2) |
---|
426 | #endif |
---|
427 | |
---|
428 | #ifdef CONFIGURE_INIT |
---|
429 | posix_initialization_threads_table POSIX_Initialization_threads[] = { |
---|
430 | { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT, \ |
---|
431 | CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE } |
---|
432 | }; |
---|
433 | #endif |
---|
434 | |
---|
435 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME POSIX_Initialization_threads |
---|
436 | |
---|
437 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \ |
---|
438 | sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \ |
---|
439 | sizeof(posix_initialization_threads_table) |
---|
440 | |
---|
441 | #endif /* CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */ |
---|
442 | |
---|
443 | #else /* CONFIGURE_POSIX_INIT_THREAD_TABLE */ |
---|
444 | |
---|
445 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL |
---|
446 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0 |
---|
447 | |
---|
448 | #endif |
---|
449 | |
---|
450 | #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \ |
---|
451 | ( \ |
---|
452 | sizeof (POSIX_API_Control) + \ |
---|
453 | (sizeof (void *) * (CONFIGURE_GNAT_KEYS + CONFIGURE_MAXIMUM_POSIX_KEYS)) \ |
---|
454 | ) |
---|
455 | |
---|
456 | #define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) \ |
---|
457 | ((_mutexes) * \ |
---|
458 | ( sizeof(POSIX_Mutex_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
459 | |
---|
460 | #define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condition_variables) \ |
---|
461 | ((_condition_variables) * \ |
---|
462 | ( sizeof(POSIX_Condition_variables_Control) + \ |
---|
463 | CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
464 | |
---|
465 | #define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys) \ |
---|
466 | ((_keys) * \ |
---|
467 | ( sizeof(POSIX_Keys_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
468 | |
---|
469 | #define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) \ |
---|
470 | ((_timers) * \ |
---|
471 | ( 0 ) ) |
---|
472 | |
---|
473 | #define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals) \ |
---|
474 | ((_queued_signals) * \ |
---|
475 | ( sizeof(POSIX_signals_Siginfo_node) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
476 | |
---|
477 | #define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) \ |
---|
478 | ((_message_queues) * \ |
---|
479 | ( sizeof( POSIX_Message_queue_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
480 | #define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) \ |
---|
481 | ((_semaphores) * \ |
---|
482 | ( sizeof( POSIX_Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
483 | |
---|
484 | |
---|
485 | #define CONFIGURE_MEMORY_FOR_POSIX \ |
---|
486 | ( \ |
---|
487 | CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES ) + \ |
---|
488 | CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES( \ |
---|
489 | CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES ) + \ |
---|
490 | CONFIGURE_MEMORY_FOR_POSIX_KEYS( CONFIGURE_MAXIMUM_POSIX_KEYS ) + \ |
---|
491 | CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( \ |
---|
492 | CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ) + \ |
---|
493 | CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( \ |
---|
494 | CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ) + \ |
---|
495 | CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( \ |
---|
496 | CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ) + \ |
---|
497 | (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE) \ |
---|
498 | ) |
---|
499 | |
---|
500 | |
---|
501 | #else |
---|
502 | |
---|
503 | #define CONFIGURE_MAXIMUM_POSIX_THREADS 0 |
---|
504 | #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API 0 |
---|
505 | #define CONFIGURE_MEMORY_FOR_POSIX 0 |
---|
506 | |
---|
507 | |
---|
508 | #endif /* RTEMS_POSIX_API */ |
---|
509 | |
---|
510 | #ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE |
---|
511 | #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE 0 |
---|
512 | #endif |
---|
513 | |
---|
514 | /* |
---|
515 | * ITRON API Configuration Parameters |
---|
516 | */ |
---|
517 | |
---|
518 | #ifdef RTEMS_ITRON_API |
---|
519 | |
---|
520 | #include <itron.h> |
---|
521 | #include <rtems/itron/config.h> |
---|
522 | #include <rtems/itron/eventflags.h> |
---|
523 | #include <rtems/itron/fmempool.h> |
---|
524 | #include <rtems/itron/mbox.h> |
---|
525 | #include <rtems/itron/msgbuffer.h> |
---|
526 | #include <rtems/itron/port.h> |
---|
527 | #include <rtems/itron/semaphore.h> |
---|
528 | #include <rtems/itron/task.h> |
---|
529 | #include <rtems/itron/vmempool.h> |
---|
530 | |
---|
531 | #ifndef CONFIGURE_MAXIMUM_ITRON_TASKS |
---|
532 | #define CONFIGURE_MAXIMUM_ITRON_TASKS 10 |
---|
533 | #endif |
---|
534 | |
---|
535 | #ifndef CONFIGURE_MAXIMUM_ITRON_SEMAPHORES |
---|
536 | #define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES 0 |
---|
537 | #endif |
---|
538 | |
---|
539 | #ifndef CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS |
---|
540 | #define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS 0 |
---|
541 | #endif |
---|
542 | |
---|
543 | #ifndef CONFIGURE_MAXIMUM_ITRON_MAILBOXES |
---|
544 | #define CONFIGURE_MAXIMUM_ITRON_MAILBOXES 0 |
---|
545 | #endif |
---|
546 | |
---|
547 | #ifndef CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS |
---|
548 | #define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS 0 |
---|
549 | #endif |
---|
550 | |
---|
551 | #ifndef CONFIGURE_MAXIMUM_ITRON_PORTS |
---|
552 | #define CONFIGURE_MAXIMUM_ITRON_PORTS 0 |
---|
553 | #endif |
---|
554 | |
---|
555 | #ifndef CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS |
---|
556 | #define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS 0 |
---|
557 | #endif |
---|
558 | |
---|
559 | #ifndef CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS |
---|
560 | #define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS 0 |
---|
561 | #endif |
---|
562 | |
---|
563 | #ifdef CONFIGURE_ITRON_INIT_TASK_TABLE |
---|
564 | |
---|
565 | #ifdef CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE |
---|
566 | |
---|
567 | /* |
---|
568 | * The user is defining their own table information and setting the |
---|
569 | * appropriate variables. |
---|
570 | */ |
---|
571 | |
---|
572 | #else |
---|
573 | |
---|
574 | #ifndef CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT |
---|
575 | #define CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT ITRON_Init |
---|
576 | #endif |
---|
577 | |
---|
578 | #ifndef CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES |
---|
579 | #define CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES TA_HLNG |
---|
580 | #endif |
---|
581 | |
---|
582 | #ifndef CONFIGURE_ITRON_INIT_TASK_PRIORITY |
---|
583 | #define CONFIGURE_ITRON_INIT_TASK_PRIORITY 1 |
---|
584 | #endif |
---|
585 | |
---|
586 | #ifndef CONFIGURE_ITRON_INIT_TASK_STACK_SIZE |
---|
587 | #define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE |
---|
588 | #endif |
---|
589 | |
---|
590 | #ifdef CONFIGURE_INIT |
---|
591 | itron_initialization_tasks_table ITRON_Initialization_tasks[] = { |
---|
592 | { 1, /* ID */ |
---|
593 | { (VP) 0, /* exinfo */ |
---|
594 | CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES, /* task attributes */ |
---|
595 | CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT, /* task start address */ |
---|
596 | CONFIGURE_ITRON_INIT_TASK_PRIORITY, /* initial task priority */ |
---|
597 | CONFIGURE_ITRON_INIT_TASK_STACK_SIZE /* stack size */ |
---|
598 | } |
---|
599 | } |
---|
600 | }; |
---|
601 | #endif |
---|
602 | |
---|
603 | #define CONFIGURE_ITRON_INIT_TASK_TABLE_NAME ITRON_Initialization_tasks |
---|
604 | |
---|
605 | #define CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE \ |
---|
606 | sizeof(CONFIGURE_ITRON_INIT_TASK_TABLE_NAME) / \ |
---|
607 | sizeof(itron_initialization_tasks_table) |
---|
608 | |
---|
609 | #endif /* CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE */ |
---|
610 | |
---|
611 | #else /* CONFIGURE_ITRON_INIT_TASK_TABLE */ |
---|
612 | |
---|
613 | #define CONFIGURE_ITRON_INIT_TASK_TABLE_NAME NULL |
---|
614 | #define CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE 0 |
---|
615 | |
---|
616 | #endif |
---|
617 | |
---|
618 | #define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API \ |
---|
619 | ( \ |
---|
620 | sizeof (ITRON_API_Control) \ |
---|
621 | ) |
---|
622 | |
---|
623 | #define CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES(_semaphores) \ |
---|
624 | ((_semaphores) * \ |
---|
625 | ( sizeof(ITRON_Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
626 | |
---|
627 | #define CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS(_eventflags) \ |
---|
628 | ((_eventflags) * \ |
---|
629 | ( sizeof(ITRON_Eventflags_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
630 | |
---|
631 | #define CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES(_mailboxes) \ |
---|
632 | ((_mailboxes) * \ |
---|
633 | ( sizeof(ITRON_Mailbox_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
634 | |
---|
635 | #define CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS(_message_buffers) \ |
---|
636 | ((_message_buffers) * \ |
---|
637 | ( sizeof(ITRON_Message_buffer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
638 | |
---|
639 | #define CONFIGURE_MEMORY_FOR_ITRON_PORTS(_ports) \ |
---|
640 | ((_ports) * \ |
---|
641 | ( sizeof(ITRON_Port_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
642 | |
---|
643 | #define CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS(_memory_pools) \ |
---|
644 | ((_memory_pools) * \ |
---|
645 | (sizeof(ITRON_Variable_memory_pool_Control) + CONFIGURE_OBJECT_TABLE_STUFF)) |
---|
646 | |
---|
647 | #define CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS(_fixed_memory_pools) \ |
---|
648 | ((_fixed_memory_pools) * \ |
---|
649 | ( sizeof(ITRON_Fixed_memory_pool_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
650 | |
---|
651 | #ifndef CONFIGURE_ITRON_INIT_TASK_STACK_SIZES |
---|
652 | #define CONFIGURE_ITRON_INIT_TASK_STACK_SIZES (RTEMS_MINIMUM_STACK_SIZE * 2) |
---|
653 | #endif |
---|
654 | |
---|
655 | |
---|
656 | #define CONFIGURE_MEMORY_FOR_ITRON \ |
---|
657 | ( \ |
---|
658 | CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES( \ |
---|
659 | CONFIGURE_MAXIMUM_ITRON_SEMAPHORES ) + \ |
---|
660 | CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS( \ |
---|
661 | CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS ) + \ |
---|
662 | CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES( \ |
---|
663 | CONFIGURE_MAXIMUM_ITRON_MAILBOXES ) + \ |
---|
664 | CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS( \ |
---|
665 | CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS ) + \ |
---|
666 | CONFIGURE_MEMORY_FOR_ITRON_PORTS( \ |
---|
667 | CONFIGURE_MAXIMUM_ITRON_PORTS ) + \ |
---|
668 | CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS( \ |
---|
669 | CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS ) + \ |
---|
670 | CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS( \ |
---|
671 | CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS ) + \ |
---|
672 | CONFIGURE_ITRON_INIT_TASK_STACK_SIZES \ |
---|
673 | ) |
---|
674 | |
---|
675 | |
---|
676 | #else |
---|
677 | |
---|
678 | #define CONFIGURE_MAXIMUM_ITRON_TASKS 0 |
---|
679 | #define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES 0 |
---|
680 | #define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS 0 |
---|
681 | #define CONFIGURE_MAXIMUM_ITRON_MAILBOXES 0 |
---|
682 | #define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS 0 |
---|
683 | #define CONFIGURE_MAXIMUM_ITRON_PORTS 0 |
---|
684 | #define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS 0 |
---|
685 | #define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS 0 |
---|
686 | #define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API 0 |
---|
687 | #define CONFIGURE_MEMORY_FOR_ITRON 0 |
---|
688 | |
---|
689 | #endif /* RTEMS_ITRON_API */ |
---|
690 | |
---|
691 | |
---|
692 | /* |
---|
693 | * Calculate the RAM size based on the maximum number of objects configured. |
---|
694 | * The model is to estimate the memory required for each configured item, |
---|
695 | * sum the memory requirements and insure that there is at least 32K greater |
---|
696 | * than that for things not directly addressed such as: |
---|
697 | * |
---|
698 | * + stacks greater than minimum size |
---|
699 | * + FP contexts |
---|
700 | * + API areas (should be optional) |
---|
701 | * + messages |
---|
702 | * + object name and local pointer table overhead |
---|
703 | * + per node memory requirements |
---|
704 | * + executive fixed requirements (including at least internal threads |
---|
705 | * and the Ready chains) |
---|
706 | * |
---|
707 | * NOTE: Eventually this should take into account some of the above. |
---|
708 | * Basically, this is a "back of the envelope" estimate for |
---|
709 | * memory requirements. It could be more accurate. |
---|
710 | */ |
---|
711 | |
---|
712 | #ifndef CONFIGURE_EXECUTIVE_RAM_SIZE |
---|
713 | |
---|
714 | #define CONFIGURE_OBJECT_TABLE_STUFF \ |
---|
715 | ( sizeof(Objects_Control *) + sizeof(rtems_name *) + sizeof(rtems_name) ) |
---|
716 | |
---|
717 | #define CONFIGURE_MEMORY_FOR_TASKS(_tasks) \ |
---|
718 | (((_tasks) + 1 ) * \ |
---|
719 | ((sizeof(Thread_Control) + CONTEXT_FP_SIZE + \ |
---|
720 | STACK_MINIMUM_SIZE + sizeof( RTEMS_API_Control ) + \ |
---|
721 | CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API + \ |
---|
722 | CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API + \ |
---|
723 | CONFIGURE_OBJECT_TABLE_STUFF)) \ |
---|
724 | ) |
---|
725 | |
---|
726 | #define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \ |
---|
727 | ((_timers) * ( sizeof(Timer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
728 | |
---|
729 | #define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \ |
---|
730 | ((_semaphores) * \ |
---|
731 | ( sizeof(Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
732 | |
---|
733 | #define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \ |
---|
734 | ( (_queues) * \ |
---|
735 | ( sizeof(Message_queue_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
736 | |
---|
737 | #define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \ |
---|
738 | ( (_partitions) * \ |
---|
739 | ( sizeof(Partition_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
740 | |
---|
741 | #define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \ |
---|
742 | ( (_regions) * \ |
---|
743 | ( sizeof(Region_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
744 | |
---|
745 | #define CONFIGURE_MEMORY_FOR_PORTS(_ports) \ |
---|
746 | ( (_ports) * \ |
---|
747 | ( sizeof(Dual_ported_memory_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
748 | |
---|
749 | #define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \ |
---|
750 | ( (_periods) * \ |
---|
751 | ( sizeof(Rate_monotonic_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
752 | |
---|
753 | #define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \ |
---|
754 | ( (_extensions) * \ |
---|
755 | ( sizeof(Extension_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
756 | |
---|
757 | #define CONFIGURE_MEMORY_FOR_DEVICES(_devices) \ |
---|
758 | (((_devices) + 1) * ( sizeof(rtems_driver_name_t) ) ) |
---|
759 | |
---|
760 | #ifdef CONFIGURE_MPTEST |
---|
761 | |
---|
762 | #ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE |
---|
763 | |
---|
764 | #define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \ |
---|
765 | ( ((_proxies) + 1) * ( sizeof(Thread_Proxy_control) ) ) |
---|
766 | |
---|
767 | #define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \ |
---|
768 | ((_global_objects) * ( sizeof(Objects_MP_Control) ) ) |
---|
769 | |
---|
770 | #define CONFIGURE_MEMORY_FOR_MP \ |
---|
771 | ( CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \ |
---|
772 | CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) + \ |
---|
773 | CONFIGURE_MEMORY_FOR_TASKS(1) \ |
---|
774 | ) |
---|
775 | |
---|
776 | #endif /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */ |
---|
777 | |
---|
778 | #else |
---|
779 | |
---|
780 | #define CONFIGURE_MEMORY_FOR_MP 0 |
---|
781 | |
---|
782 | #endif |
---|
783 | |
---|
784 | #ifndef CONFIGURE_MEMORY_OVERHEAD |
---|
785 | #define CONFIGURE_MEMORY_OVERHEAD 0 |
---|
786 | #endif |
---|
787 | |
---|
788 | #ifndef CONFIGURE_EXTRA_TASK_STACKS |
---|
789 | #define CONFIGURE_EXTRA_TASK_STACKS 0 |
---|
790 | #endif |
---|
791 | |
---|
792 | #define CONFIGURE_MEMORY_FOR_SYSTEM_OVEREHAD \ |
---|
793 | ( CONFIGURE_MEMORY_FOR_TASKS(1) + /* IDLE */ \ |
---|
794 | (256 * 12) + /* Ready chains */ \ |
---|
795 | 256 + /* name/ptr table overhead */ \ |
---|
796 | CONFIGURE_INTERRUPT_STACK_MEMORY /* interrupt stack */ \ |
---|
797 | ) |
---|
798 | |
---|
799 | #define CONFIGURE_EXECUTIVE_RAM_SIZE \ |
---|
800 | (( CONFIGURE_MEMORY_FOR_POSIX + \ |
---|
801 | CONFIGURE_MEMORY_FOR_ITRON + \ |
---|
802 | CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS + \ |
---|
803 | CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS + \ |
---|
804 | CONFIGURE_MAXIMUM_ITRON_TASKS ) + \ |
---|
805 | CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \ |
---|
806 | CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES + \ |
---|
807 | CONFIGURE_LIBIO_SEMAPHORES) + \ |
---|
808 | CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \ |
---|
809 | CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \ |
---|
810 | CONFIGURE_MEMORY_FOR_REGIONS( \ |
---|
811 | CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION ) + \ |
---|
812 | CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \ |
---|
813 | CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \ |
---|
814 | CONFIGURE_MEMORY_FOR_USER_EXTENSIONS( \ |
---|
815 | CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION + \ |
---|
816 | CONFIGURE_STACK_CHECKER_EXTENSION ) + \ |
---|
817 | CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \ |
---|
818 | CONFIGURE_MEMORY_FOR_MP + \ |
---|
819 | CONFIGURE_MEMORY_FOR_SYSTEM_OVEREHAD + \ |
---|
820 | (((CONFIGURE_MEMORY_OVERHEAD)+1) * 1024) + \ |
---|
821 | (CONFIGURE_EXTRA_TASK_STACKS) + (CONFIGURE_ADA_TASKS_STACK) \ |
---|
822 | ) & 0xfffffc00) |
---|
823 | #endif |
---|
824 | |
---|
825 | #ifdef CONFIGURE_GNAT_RTEMS |
---|
826 | #define CONFIGURE_GNAT_MUTEXES 10 |
---|
827 | #define CONFIGURE_GNAT_KEYS 1 |
---|
828 | |
---|
829 | /* 20 are required to run all tests in the ACVC */ |
---|
830 | #ifndef CONFIGURE_MAXIMUM_ADA_TASKS |
---|
831 | #define CONFIGURE_MAXIMUM_ADA_TASKS 20 |
---|
832 | #endif |
---|
833 | |
---|
834 | /* This is the number of non-Ada tasks which invoked Ada code. */ |
---|
835 | #ifndef CONFIGURE_MAXIMUM_FAKE_ADA_TASKS |
---|
836 | #define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0 |
---|
837 | #endif |
---|
838 | |
---|
839 | /* Ada tasks are allocated twice the minimum stack space */ |
---|
840 | #define CONFIGURE_ADA_TASKS_STACK \ |
---|
841 | (CONFIGURE_MAXIMUM_ADA_TASKS * (RTEMS_MINIMUM_STACK_SIZE + (6 * 1024))) |
---|
842 | |
---|
843 | #else |
---|
844 | #define CONFIGURE_GNAT_MUTEXES 0 |
---|
845 | #define CONFIGURE_GNAT_KEYS 0 |
---|
846 | #define CONFIGURE_MAXIMUM_ADA_TASKS 0 |
---|
847 | #define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0 |
---|
848 | #define CONFIGURE_ADA_TASKS_STACK 0 |
---|
849 | #endif |
---|
850 | |
---|
851 | |
---|
852 | #ifdef CONFIGURE_INIT |
---|
853 | |
---|
854 | rtems_api_configuration_table Configuration_RTEMS_API = { |
---|
855 | CONFIGURE_MAXIMUM_TASKS, |
---|
856 | CONFIGURE_MAXIMUM_TIMERS, |
---|
857 | CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES, |
---|
858 | CONFIGURE_MAXIMUM_MESSAGE_QUEUES, |
---|
859 | CONFIGURE_MAXIMUM_PARTITIONS, |
---|
860 | CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION, |
---|
861 | CONFIGURE_MAXIMUM_PORTS, |
---|
862 | CONFIGURE_MAXIMUM_PERIODS, |
---|
863 | CONFIGURE_INIT_TASK_TABLE_SIZE, |
---|
864 | CONFIGURE_INIT_TASK_TABLE |
---|
865 | }; |
---|
866 | |
---|
867 | #ifdef RTEMS_POSIX_API |
---|
868 | posix_api_configuration_table Configuration_POSIX_API = { |
---|
869 | CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS, |
---|
870 | CONFIGURE_MAXIMUM_POSIX_MUTEXES + CONFIGURE_GNAT_MUTEXES + |
---|
871 | CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS, |
---|
872 | CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES + |
---|
873 | CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS, |
---|
874 | CONFIGURE_MAXIMUM_POSIX_KEYS + CONFIGURE_GNAT_KEYS, |
---|
875 | CONFIGURE_MAXIMUM_POSIX_TIMERS, |
---|
876 | CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS, |
---|
877 | CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES, |
---|
878 | CONFIGURE_MAXIMUM_POSIX_SEMAPHORES, |
---|
879 | CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE, |
---|
880 | CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME |
---|
881 | }; |
---|
882 | #endif |
---|
883 | |
---|
884 | #ifdef RTEMS_ITRON_API |
---|
885 | itron_api_configuration_table Configuration_ITRON_API = { |
---|
886 | CONFIGURE_MAXIMUM_ITRON_TASKS, |
---|
887 | CONFIGURE_MAXIMUM_ITRON_SEMAPHORES, |
---|
888 | CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS, |
---|
889 | CONFIGURE_MAXIMUM_ITRON_MAILBOXES, |
---|
890 | CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS, |
---|
891 | CONFIGURE_MAXIMUM_ITRON_PORTS, |
---|
892 | CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS, |
---|
893 | CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS, |
---|
894 | CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE, |
---|
895 | CONFIGURE_ITRON_INIT_TASK_TABLE_NAME |
---|
896 | }; |
---|
897 | #endif |
---|
898 | |
---|
899 | rtems_configuration_table Configuration = { |
---|
900 | CONFIGURE_EXECUTIVE_RAM_WORK_AREA, |
---|
901 | CONFIGURE_EXECUTIVE_RAM_SIZE, |
---|
902 | CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION + |
---|
903 | CONFIGURE_STACK_CHECKER_EXTENSION, |
---|
904 | CONFIGURE_MICROSECONDS_PER_TICK, |
---|
905 | CONFIGURE_TICKS_PER_TIMESLICE, |
---|
906 | CONFIGURE_MAXIMUM_DEVICES, |
---|
907 | sizeof (Device_drivers)/ |
---|
908 | sizeof(rtems_driver_address_table), /* number of device drivers */ |
---|
909 | Device_drivers, /* pointer to driver table */ |
---|
910 | CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS, /* number of initial extensions */ |
---|
911 | Configuration_Initial_Extensions, /* pointer to initial extensions */ |
---|
912 | CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */ |
---|
913 | &Configuration_RTEMS_API, /* pointer to RTEMS API config */ |
---|
914 | #ifdef RTEMS_POSIX_API |
---|
915 | &Configuration_POSIX_API, /* pointer to POSIX API config */ |
---|
916 | #else |
---|
917 | NULL, /* pointer to POSIX API config */ |
---|
918 | #endif |
---|
919 | #ifdef RTEMS_ITRON_API |
---|
920 | &Configuration_ITRON_API /* pointer to ITRON API config */ |
---|
921 | #else |
---|
922 | NULL /* pointer to ITRON API config */ |
---|
923 | #endif |
---|
924 | }; |
---|
925 | #endif |
---|
926 | |
---|
927 | #endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */ |
---|
928 | |
---|
929 | #ifdef __cplusplus |
---|
930 | } |
---|
931 | #endif |
---|
932 | |
---|
933 | #endif |
---|
934 | /* end of include file */ |
---|