source: rtems/cpukit/sapi/include/confdefs.h @ 8c51e48

4.104.114.84.95
Last change on this file since 8c51e48 was 8c51e48, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 1, 2005 at 1:28:00 PM

2005-09-01 Nuno Costa <nuno-costa@…>

PR 804

  • sapi/include/confdefs.h: Memory for POSIX timers not accounted for. Patch adapted from edit comment in PR filed.
  • Property mode set to 100644
File size: 31.2 KB
Line 
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-2002.
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
43extern "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
52extern rtems_initialization_tasks_table Initialization_tasks[];
53extern rtems_driver_address_table       Device_drivers[];
54extern rtems_configuration_table        Configuration;
55extern rtems_multiprocessing_table      Multiprocessing_configuration;
56#ifdef RTEMS_POSIX_API
57extern posix_api_configuration_table    Configuration_POSIX_API;
58#endif
59#ifdef RTEMS_ITRON_API
60extern 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
87uint32_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 *  Mount Table Configuration
108 */
109
110#include <rtems/imfs.h>
111
112#ifdef CONFIGURE_INIT
113
114#ifndef CONFIGURE_HAS_OWN_MOUNT_TABLE
115rtems_filesystem_mount_table_t configuration_mount_table = {
116#ifdef CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
117  &IMFS_ops,
118#else  /* using miniIMFS as base filesystem */
119  &miniIMFS_ops,
120#endif
121  RTEMS_FILESYSTEM_READ_WRITE,
122  NULL,
123  NULL
124};
125
126rtems_filesystem_mount_table_t
127    *rtems_filesystem_mount_table = &configuration_mount_table;
128int rtems_filesystem_mount_table_size = 1;
129#endif
130
131#endif
132
133
134/*
135 *  Stack Checker Requirements
136 *
137 *  NOTE: This does not automatically enable reporting at program exit.
138 */
139
140#ifdef STACK_CHECKER_ON
141#define CONFIGURE_STACK_CHECKER_EXTENSION 1
142#else
143#define CONFIGURE_STACK_CHECKER_EXTENSION 0
144#endif
145
146/*
147 *  Interrupt Stack Space
148 *
149 *  NOTE: There is currently no way for the application to override
150 *        the interrupt stack size set by the BSP.
151 */
152
153#if (CPU_ALLOCATE_INTERRUPT_STACK == 0)
154#undef CONFIGURE_INTERRUPT_STACK_MEMORY
155#define CONFIGURE_INTERRUPT_STACK_MEMORY 0
156#else
157  #ifndef CONFIGURE_INTERRUPT_STACK_MEMORY
158  #define CONFIGURE_INTERRUPT_STACK_MEMORY RTEMS_MINIMUM_STACK_SIZE
159  #endif
160#endif
161
162/*
163 *  Default User Initialization Task Table.  This table guarantees that
164 *  one user initialization table is defined.
165 */
166
167#ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE
168
169#ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE
170
171/*
172 *  The user is defining their own table information and setting the
173 *  appropriate variables.
174 */
175
176#else
177
178#ifndef CONFIGURE_INIT_TASK_NAME
179#define CONFIGURE_INIT_TASK_NAME          rtems_build_name( 'U', 'I', '1', ' ' )
180#endif
181
182#ifndef CONFIGURE_INIT_TASK_STACK_SIZE
183#define CONFIGURE_INIT_TASK_STACK_SIZE    RTEMS_MINIMUM_STACK_SIZE
184#endif
185
186#ifndef CONFIGURE_INIT_TASK_PRIORITY
187#define CONFIGURE_INIT_TASK_PRIORITY      1
188#endif
189
190#ifndef CONFIGURE_INIT_TASK_ATTRIBUTES
191#define CONFIGURE_INIT_TASK_ATTRIBUTES    RTEMS_DEFAULT_ATTRIBUTES
192#endif
193
194#ifndef CONFIGURE_INIT_TASK_ENTRY_POINT
195#define CONFIGURE_INIT_TASK_ENTRY_POINT   Init
196#endif
197
198#ifndef CONFIGURE_INIT_TASK_INITIAL_MODES
199#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT
200#endif
201
202#ifndef CONFIGURE_INIT_TASK_ARGUMENTS
203#define CONFIGURE_INIT_TASK_ARGUMENTS     0
204#endif
205
206#ifdef CONFIGURE_INIT
207rtems_initialization_tasks_table Initialization_tasks[] = {
208  { CONFIGURE_INIT_TASK_NAME,
209    CONFIGURE_INIT_TASK_STACK_SIZE,
210    CONFIGURE_INIT_TASK_PRIORITY,
211    CONFIGURE_INIT_TASK_ATTRIBUTES,
212    CONFIGURE_INIT_TASK_ENTRY_POINT,
213    CONFIGURE_INIT_TASK_INITIAL_MODES,
214    CONFIGURE_INIT_TASK_ARGUMENTS
215  }
216};
217#endif
218
219#define CONFIGURE_INIT_TASK_TABLE Initialization_tasks
220
221#define CONFIGURE_INIT_TASK_TABLE_SIZE \
222  sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table)
223
224#endif    /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */
225
226#else     /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */
227
228#define CONFIGURE_INIT_TASK_TABLE      NULL
229#define CONFIGURE_INIT_TASK_TABLE_SIZE 0
230#define CONFIGURE_INIT_TASK_STACK_SIZE 0
231
232#endif
233
234/*
235 *  Map obsolete names to current ones
236 *
237 *  NOTE: These should be obsoleted in a future release.
238 */
239
240#ifdef CONFIGURE_TEST_NEEDS_TIMER_DRIVER
241#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
242#endif
243#ifdef CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
244#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
245#endif
246#ifdef CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
247#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
248#endif
249#ifdef CONFIGURE_TEST_NEEDS_RTC_DRIVER
250#define CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
251#endif
252#ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER
253#define CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
254#endif
255
256
257/*
258 *  Default Device Driver Table.  Each driver needed by the test is explicitly
259 *  choosen by that test.  There is always a null driver entry.
260 */
261
262#define NULL_DRIVER_TABLE_ENTRY \
263 { NULL, NULL, NULL, NULL, NULL, NULL }
264
265#ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
266#include <rtems/console.h>
267#endif
268
269#ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
270#include <rtems/clockdrv.h>
271#endif
272
273#ifdef CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
274#include <rtems/timerdrv.h>
275#endif
276
277#ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
278#include <rtems/rtc.h>
279#endif
280
281#ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
282#include <rtems/devnull.h>
283#endif
284
285#ifndef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE
286
287#ifdef CONFIGURE_INIT
288rtems_driver_address_table Device_drivers[] = {
289#ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
290  CONSOLE_DRIVER_TABLE_ENTRY,
291#endif
292#ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
293  CLOCK_DRIVER_TABLE_ENTRY,
294#endif
295#ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
296  RTC_DRIVER_TABLE_ENTRY,
297#endif
298#ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
299  DEVNULL_DRIVER_TABLE_ENTRY,
300#endif
301#ifdef CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER
302  NULL_DRIVER_TABLE_ENTRY
303#elif !defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) && \
304    !defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \
305    !defined(CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER) && \
306    !defined(CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER)
307  NULL_DRIVER_TABLE_ENTRY
308#endif
309};
310#endif
311
312#endif  /* CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE */
313
314/*
315 *  Default the number of drivers per node.  This value may be
316 *  overridden by the user.
317 */
318
319#define CONFIGURE_NUMBER_OF_DRIVERS \
320  ((sizeof(Device_drivers) / sizeof(rtems_driver_address_table)))
321
322#ifndef CONFIGURE_MAXIMUM_DRIVERS
323#define CONFIGURE_MAXIMUM_DRIVERS CONFIGURE_NUMBER_OF_DRIVERS
324#endif
325
326/*
327 *  Default the number of devices per device driver.  This value may be
328 *  overridden by the user.
329 */
330
331#ifndef CONFIGURE_MAXIMUM_DEVICES
332#define CONFIGURE_MAXIMUM_DEVICES   20
333#endif
334
335/*
336 *  Default Multiprocessing Configuration Table.  The defaults are
337 *  appropriate for most of the RTEMS Multiprocessor Test Suite.  Each
338 *  value may be overridden within each test to customize the environment.
339 */
340
341#ifdef CONFIGURE_MP_APPLICATION
342#ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE
343
344#ifndef CONFIGURE_MP_NODE_NUMBER
345#define CONFIGURE_MP_NODE_NUMBER                NODE_NUMBER
346#endif
347
348#ifndef CONFIGURE_MP_MAXIMUM_NODES
349#define CONFIGURE_MP_MAXIMUM_NODES              2
350#endif
351
352#ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS
353#define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS     32
354#endif
355
356#ifndef CONFIGURE_MP_MAXIMUM_PROXIES
357#define CONFIGURE_MP_MAXIMUM_PROXIES            32
358#endif
359
360#ifndef CONFIGURE_MP_MPCI_TABLE_POINTER
361#include <mpci.h>
362#define CONFIGURE_MP_MPCI_TABLE_POINTER         &MPCI_table
363#endif
364
365#ifdef CONFIGURE_INIT
366rtems_multiprocessing_table Multiprocessing_configuration = {
367  CONFIGURE_MP_NODE_NUMBER,              /* local node number */
368  CONFIGURE_MP_MAXIMUM_NODES,            /* maximum # nodes in system */
369  CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS,   /* maximum # global objects */
370  CONFIGURE_MP_MAXIMUM_PROXIES,          /* maximum # proxies */
371  CONFIGURE_MP_MPCI_TABLE_POINTER        /* pointer to MPCI config table */
372};
373#endif
374
375#define CONFIGURE_MULTIPROCESSING_TABLE    &Multiprocessing_configuration
376
377#endif /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */
378
379#else
380
381#define CONFIGURE_MULTIPROCESSING_TABLE    NULL
382
383#endif /* CONFIGURE_MP_APPLICATION */
384
385/*
386 *  Default Configuration Table.
387 */
388
389#ifndef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE
390
391#ifndef CONFIGURE_EXECUTIVE_RAM_WORK_AREA
392#define CONFIGURE_EXECUTIVE_RAM_WORK_AREA     NULL
393#endif
394
395#ifndef CONFIGURE_MAXIMUM_TASKS
396#define CONFIGURE_MAXIMUM_TASKS               0
397#endif
398
399#ifndef CONFIGURE_MAXIMUM_TIMERS
400#define CONFIGURE_MAXIMUM_TIMERS              0
401#endif
402
403#ifndef CONFIGURE_MAXIMUM_SEMAPHORES
404#define CONFIGURE_MAXIMUM_SEMAPHORES          0
405#endif
406
407#ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES
408#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES      0
409#endif
410
411#ifndef CONFIGURE_MAXIMUM_PARTITIONS
412#define CONFIGURE_MAXIMUM_PARTITIONS          0
413#endif
414
415#ifndef CONFIGURE_MAXIMUM_REGIONS
416#define CONFIGURE_MAXIMUM_REGIONS             0
417#endif
418
419#ifndef CONFIGURE_MAXIMUM_PORTS
420#define CONFIGURE_MAXIMUM_PORTS               0
421#endif
422
423#ifndef CONFIGURE_MAXIMUM_PERIODS
424#define CONFIGURE_MAXIMUM_PERIODS             0
425#endif
426
427#ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS
428#define CONFIGURE_MAXIMUM_USER_EXTENSIONS     0
429#endif
430
431#ifndef CONFIGURE_MICROSECONDS_PER_TICK
432#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(10)
433#endif
434
435#ifndef CONFIGURE_TICKS_PER_TIMESLICE
436#define CONFIGURE_TICKS_PER_TIMESLICE        50
437#endif
438
439/*
440 *  Initial Extension Set
441 */
442
443#ifdef CONFIGURE_INIT
444#ifdef STACK_CHECKER_ON
445#include <rtems/stackchk.h>
446#endif
447
448#if defined(CONFIGURE_INITIAL_EXTENSIONS) || \
449    defined(STACK_CHECKER_ON)
450rtems_extensions_table Configuration_Initial_Extensions[] = {
451#ifdef CONFIGURE_INITIAL_EXTENSIONS
452    CONFIGURE_INITIAL_EXTENSIONS,
453#endif
454#ifdef STACK_CHECKER_ON
455    STACK_CHECKER_EXTENSION,
456#endif
457};
458
459#define CONFIGURE_INITIAL_EXTENSION_TABLE Configuration_Initial_Extensions
460#define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \
461  ((sizeof(Configuration_Initial_Extensions) / \
462    sizeof(rtems_extensions_table)))
463#else
464#define CONFIGURE_INITIAL_EXTENSION_TABLE NULL
465#define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS 0
466#endif
467
468
469#endif
470
471/*
472 *  POSIX API Configuration Parameters
473 */
474
475#ifdef RTEMS_POSIX_API
476
477#include <sys/types.h>
478#include <signal.h>
479#include <limits.h>
480#include <mqueue.h>
481#include <rtems/posix/cond.h>
482#include <rtems/posix/mqueue.h>
483#include <rtems/posix/mutex.h>
484#include <rtems/posix/key.h>
485#include <rtems/posix/psignal.h>
486#include <rtems/posix/semaphore.h>
487#include <rtems/posix/threadsup.h>
488#include <rtems/posix/timer.h>
489
490#ifndef CONFIGURE_MAXIMUM_POSIX_THREADS
491#define CONFIGURE_MAXIMUM_POSIX_THREADS      0
492#endif
493
494#ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES
495#define CONFIGURE_MAXIMUM_POSIX_MUTEXES      0
496#endif
497
498#ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
499#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  0
500#endif
501
502#ifndef CONFIGURE_MAXIMUM_POSIX_KEYS
503#define CONFIGURE_MAXIMUM_POSIX_KEYS         0
504#endif
505
506#ifndef CONFIGURE_MAXIMUM_POSIX_TIMERS
507#define CONFIGURE_MAXIMUM_POSIX_TIMERS 0
508#endif
509
510#ifndef CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS
511#define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 0
512#endif
513
514#ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES
515#define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 0
516#endif
517
518#ifndef CONFIGURE_MAXIMUM_POSIX_SEMAPHORES
519#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 0
520#endif
521
522#ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE
523
524#ifdef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE
525
526/*
527 *  The user is defining their own table information and setting the
528 *  appropriate variables for the POSIX Initialization Thread Table.
529 */
530
531#else
532
533#ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT
534#define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT   POSIX_Init
535#endif
536
537#ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
538#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE    (RTEMS_MINIMUM_STACK_SIZE * 2)
539#endif
540
541#ifdef CONFIGURE_INIT
542posix_initialization_threads_table POSIX_Initialization_threads[] = {
543  { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT, \
544      CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE }
545};
546#endif
547
548#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME POSIX_Initialization_threads
549
550#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \
551  sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \
552      sizeof(posix_initialization_threads_table)
553
554#endif    /* CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */
555
556#else     /* CONFIGURE_POSIX_INIT_THREAD_TABLE */
557
558#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL
559#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0
560
561#endif
562
563#define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \
564  ( \
565    sizeof (POSIX_API_Control) + \
566   (sizeof (void *) * (CONFIGURE_GNAT_KEYS + CONFIGURE_MAXIMUM_POSIX_KEYS)) \
567  )
568
569#define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) \
570  ((_mutexes) * \
571   ( sizeof(POSIX_Mutex_Control) + CONFIGURE_OBJECT_TABLE_STUFF + \
572     NAME_MAX ) )
573
574#define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condition_variables) \
575  ((_condition_variables) * \
576   ( sizeof(POSIX_Condition_variables_Control) + \
577        CONFIGURE_OBJECT_TABLE_STUFF ) )
578
579#define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys) \
580  ((_keys) * \
581   ( sizeof(POSIX_Keys_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
582
583#define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) \
584   ((_timers) * (sizeof(POSIX_Timer_Control) + CONFIGURE_OBJECT_TABLE_STUFF))
585
586#define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals) \
587  ((_queued_signals) * \
588   ( sizeof(POSIX_signals_Siginfo_node) + CONFIGURE_OBJECT_TABLE_STUFF ) )
589
590#define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) \
591  ((_message_queues) * \
592   ( sizeof( POSIX_Message_queue_Control) + \
593    CONFIGURE_OBJECT_TABLE_STUFF + \
594    NAME_MAX ) )
595#define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) \
596  ((_semaphores) * \
597   ( sizeof( POSIX_Semaphore_Control) + \
598    CONFIGURE_OBJECT_TABLE_STUFF + \
599    NAME_MAX ) )
600
601#define CONFIGURE_MEMORY_FOR_POSIX \
602  ( \
603    CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES ) + \
604    CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES( \
605        CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES ) + \
606    CONFIGURE_MEMORY_FOR_POSIX_KEYS( CONFIGURE_MAXIMUM_POSIX_KEYS ) + \
607    CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( \
608        CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ) + \
609    CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( \
610        CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ) + \
611    CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( \
612        CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ) + \
613    CONFIGURE_MEMORY_FOR_POSIX_TIMERS( CONFIGURE_MAXIMUM_POSIX_TIMERS ) + \
614    (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE) \
615   )
616
617
618#else
619
620#define CONFIGURE_MAXIMUM_POSIX_THREADS         0
621#define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API 0
622#define CONFIGURE_MEMORY_FOR_POSIX              0
623
624
625#endif    /* RTEMS_POSIX_API */
626
627#ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
628#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE    0
629#endif
630
631/*
632 *  ITRON API Configuration Parameters
633 */
634
635#ifdef RTEMS_ITRON_API
636
637#include <rtems/itron.h>
638#include <rtems/itron/config.h>
639#include <rtems/itron/eventflags.h>
640#include <rtems/itron/fmempool.h>
641#include <rtems/itron/mbox.h>
642#include <rtems/itron/msgbuffer.h>
643#include <rtems/itron/port.h>
644#include <rtems/itron/semaphore.h>
645#include <rtems/itron/task.h>
646#include <rtems/itron/vmempool.h>
647
648#ifndef CONFIGURE_MAXIMUM_ITRON_TASKS
649#define CONFIGURE_MAXIMUM_ITRON_TASKS      0
650#endif
651
652#ifndef CONFIGURE_MAXIMUM_ITRON_SEMAPHORES
653#define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES   0
654#endif
655
656#ifndef CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS
657#define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS   0
658#endif
659
660#ifndef CONFIGURE_MAXIMUM_ITRON_MAILBOXES
661#define CONFIGURE_MAXIMUM_ITRON_MAILBOXES   0
662#endif
663
664#ifndef CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS
665#define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS   0
666#endif
667
668#ifndef CONFIGURE_MAXIMUM_ITRON_PORTS
669#define CONFIGURE_MAXIMUM_ITRON_PORTS   0
670#endif
671
672#ifndef CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS
673#define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS   0
674#endif
675
676#ifndef CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS
677#define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS   0
678#endif
679
680#ifdef CONFIGURE_ITRON_INIT_TASK_TABLE
681
682#ifdef CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE
683
684/*
685 *  The user is defining their own table information and setting the
686 *  appropriate variables for the ITRON Initialization Task Table.
687 */
688
689#else
690
691#ifndef CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT
692#define CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT   ITRON_Init
693#endif
694
695#ifndef CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES
696#define CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES    TA_HLNG
697#endif
698
699#ifndef CONFIGURE_ITRON_INIT_TASK_PRIORITY
700#define CONFIGURE_ITRON_INIT_TASK_PRIORITY      1
701#endif
702
703#ifndef CONFIGURE_ITRON_INIT_TASK_STACK_SIZE
704#define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE    RTEMS_MINIMUM_STACK_SIZE
705#endif
706
707#ifdef CONFIGURE_INIT
708itron_initialization_tasks_table ITRON_Initialization_tasks[] = {
709  { 1,                                    /* ID */
710    { (VP) 0,                                /* exinfo */
711      CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES,  /* task attributes */
712      CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT, /* task start address */
713      CONFIGURE_ITRON_INIT_TASK_PRIORITY,    /* initial task priority */
714      CONFIGURE_ITRON_INIT_TASK_STACK_SIZE   /* stack size */
715    }
716  }
717};
718#endif
719
720#define CONFIGURE_ITRON_INIT_TASK_TABLE_NAME ITRON_Initialization_tasks
721
722#define CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE \
723  sizeof(CONFIGURE_ITRON_INIT_TASK_TABLE_NAME) / \
724      sizeof(itron_initialization_tasks_table)
725
726#endif    /* CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE */
727
728#else     /* CONFIGURE_ITRON_INIT_TASK_TABLE */
729
730#define CONFIGURE_ITRON_INIT_TASK_TABLE_NAME NULL
731#define CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE 0
732
733#endif
734
735#define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API \
736  ( \
737    sizeof (ITRON_API_Control) \
738  )
739
740#define CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES(_semaphores) \
741  ((_semaphores) * \
742   ( sizeof(ITRON_Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
743
744#define CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS(_eventflags) \
745  ((_eventflags) * \
746   ( sizeof(ITRON_Eventflags_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
747
748#define CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES(_mailboxes) \
749  ((_mailboxes) * \
750   ( sizeof(ITRON_Mailbox_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
751
752#define CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS(_message_buffers) \
753  ((_message_buffers) * \
754   ( sizeof(ITRON_Message_buffer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
755
756#define CONFIGURE_MEMORY_FOR_ITRON_PORTS(_ports) \
757  ((_ports) * \
758   ( sizeof(ITRON_Port_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
759
760#define CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS(_memory_pools) \
761  ((_memory_pools) * \
762   (sizeof(ITRON_Variable_memory_pool_Control) + CONFIGURE_OBJECT_TABLE_STUFF))
763
764#define CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS(_fixed_memory_pools) \
765  ((_fixed_memory_pools) * \
766   ( sizeof(ITRON_Fixed_memory_pool_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
767
768#ifndef CONFIGURE_ITRON_INIT_TASK_STACK_SIZE
769#define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2)
770#endif
771
772
773#define CONFIGURE_MEMORY_FOR_ITRON \
774  ( \
775    CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES( \
776        CONFIGURE_MAXIMUM_ITRON_SEMAPHORES ) + \
777    CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS( \
778        CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS ) + \
779    CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES( \
780        CONFIGURE_MAXIMUM_ITRON_MAILBOXES ) + \
781    CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS( \
782        CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS ) + \
783    CONFIGURE_MEMORY_FOR_ITRON_PORTS( \
784        CONFIGURE_MAXIMUM_ITRON_PORTS ) + \
785    CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS( \
786        CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS ) + \
787    CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS( \
788        CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS ) + \
789    CONFIGURE_ITRON_INIT_TASK_STACK_SIZE \
790   )
791
792
793#else
794
795#define CONFIGURE_MAXIMUM_ITRON_TASKS               0
796#define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES          0
797#define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS          0
798#define CONFIGURE_MAXIMUM_ITRON_MAILBOXES           0
799#define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS     0
800#define CONFIGURE_MAXIMUM_ITRON_PORTS               0
801#define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS        0
802#define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS  0
803#define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API     0
804#define CONFIGURE_MEMORY_FOR_ITRON                  0
805
806#endif    /* RTEMS_ITRON_API */
807
808
809/*
810 *  Calculate the RAM size based on the maximum number of objects configured.
811 */
812
813#ifndef CONFIGURE_EXECUTIVE_RAM_SIZE
814
815#define CONFIGURE_OBJECT_TABLE_STUFF \
816  ( sizeof(Objects_Control *) + sizeof(rtems_name *) + sizeof(rtems_name) )
817
818#if defined(RTEMS_NEWLIB)
819#include <reent.h>
820
821#define CONFIGURE_MEMORY_PER_TASK_FOR_LIBC_REENTRANCY sizeof(struct _reent)
822#else
823#define CONFIGURE_MEMORY_PER_TASK_FOR_LIBC_REENTRANCY 0
824#endif
825
826#define CONFIGURE_MEMORY_FOR_TASKS(_tasks) \
827  (((_tasks) + 1 ) * \
828   ((sizeof(Thread_Control) + CONTEXT_FP_SIZE + \
829      STACK_MINIMUM_SIZE + sizeof( RTEMS_API_Control ) + \
830      CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API + \
831      CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API + \
832      CONFIGURE_MEMORY_PER_TASK_FOR_LIBC_REENTRANCY + \
833      CONFIGURE_OBJECT_TABLE_STUFF)) \
834  )
835
836#define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \
837  ((_timers) * ( sizeof(Timer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
838
839#define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \
840  ((_semaphores) * \
841   ( sizeof(Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
842
843#define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \
844  ( (_queues) * \
845    ( sizeof(Message_queue_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
846
847#define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \
848  ( (_partitions) * \
849    ( sizeof(Partition_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
850
851#define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \
852  ( (_regions) * \
853    ( sizeof(Region_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
854
855#define CONFIGURE_MEMORY_FOR_PORTS(_ports) \
856  ( (_ports) * \
857    ( sizeof(Dual_ported_memory_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
858
859#define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \
860  ( (_periods) * \
861    ( sizeof(Rate_monotonic_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
862
863#define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \
864  ( (_extensions) * \
865    ( sizeof(Extension_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
866
867#define CONFIGURE_MEMORY_FOR_DEVICES(_devices) \
868  (((_devices) + 1) * ( sizeof(rtems_driver_name_t) ) )
869
870#ifdef CONFIGURE_MP_APPLICATION
871
872#ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE
873
874#define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \
875  ( ((_proxies) + 1) * ( sizeof(Thread_Proxy_control) )  )
876
877#define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \
878  ((_global_objects)  * ( sizeof(Objects_MP_Control) )  )
879
880#define CONFIGURE_MEMORY_FOR_MP \
881  ( CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \
882    CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) + \
883    CONFIGURE_MEMORY_FOR_TASKS(1) \
884  )
885
886#endif  /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */
887
888#else
889
890#define CONFIGURE_MEMORY_FOR_MP  0
891
892#endif
893
894#ifndef CONFIGURE_MEMORY_OVERHEAD
895#define CONFIGURE_MEMORY_OVERHEAD 0
896#endif
897
898#ifndef CONFIGURE_EXTRA_TASK_STACKS
899#define CONFIGURE_EXTRA_TASK_STACKS 0
900#endif
901
902#define CONFIGURE_API_MUTEX_MEMORY \
903  ( (1) * \
904    ( sizeof(API_Mutex_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) \
905  )
906
907#define CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD \
908  ( CONFIGURE_MEMORY_FOR_TASKS(1) +    /* IDLE */ \
909    (256 * 12) +                       /* Ready chains */ \
910    256        +                       /* name/ptr table overhead */ \
911    CONFIGURE_INTERRUPT_STACK_MEMORY + /* interrupt stack */ \
912    CONFIGURE_API_MUTEX_MEMORY         /* allocation mutex */ \
913  )
914
915/*
916 *  Now account for any extra memory that initialization tasks or threads
917 *  may have requested.
918 */
919
920#ifdef RTEMS_POSIX_API
921#define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART \
922    (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE - RTEMS_MINIMUM_STACK_SIZE)
923#else
924#define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART 0
925#endif
926#ifdef RTEMS_ITRON_API
927#define CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART \
928    (CONFIGURE_ITRON_INIT_TASK_STACK_SIZE - RTEMS_MINIMUM_STACK_SIZE)
929#else
930#define CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART 0
931#endif
932
933#define CONFIGURE_INITIALIZATION_THREADS_STACKS \
934   ((CONFIGURE_INIT_TASK_STACK_SIZE - RTEMS_MINIMUM_STACK_SIZE) + \
935    CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART + \
936    CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART)
937
938#define CONFIGURE_EXECUTIVE_RAM_SIZE \
939(( CONFIGURE_MEMORY_FOR_POSIX + \
940   CONFIGURE_MEMORY_FOR_ITRON + \
941   CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS + \
942      CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS + \
943      CONFIGURE_MAXIMUM_ITRON_TASKS ) + \
944   CONFIGURE_INITIALIZATION_THREADS_STACKS + \
945   CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \
946   CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES + \
947     CONFIGURE_LIBIO_SEMAPHORES + CONFIGURE_TERMIOS_SEMAPHORES) + \
948   CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
949   CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
950   CONFIGURE_MEMORY_FOR_REGIONS( \
951      CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION ) + \
952   CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
953   CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
954   CONFIGURE_MEMORY_FOR_USER_EXTENSIONS( \
955      CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION + \
956      CONFIGURE_STACK_CHECKER_EXTENSION ) + \
957   CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \
958   CONFIGURE_MEMORY_FOR_MP + \
959   CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD + \
960   (((CONFIGURE_MEMORY_OVERHEAD)+1) * 1024) + \
961   (CONFIGURE_EXTRA_TASK_STACKS) + (CONFIGURE_ADA_TASKS_STACK) \
962) & 0xfffffc00)
963#endif
964
965#ifdef CONFIGURE_GNAT_RTEMS
966#define CONFIGURE_GNAT_MUTEXES 10
967#define CONFIGURE_GNAT_KEYS    1
968
969/* 20 are required to run all tests in the ACVC */
970#ifndef CONFIGURE_MAXIMUM_ADA_TASKS
971#define CONFIGURE_MAXIMUM_ADA_TASKS  20
972#endif
973
974/* This is the number of non-Ada tasks which invoked Ada code. */
975#ifndef CONFIGURE_MAXIMUM_FAKE_ADA_TASKS
976#define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0
977#endif
978
979/* Ada tasks are allocated twice the minimum stack space */
980#define CONFIGURE_ADA_TASKS_STACK \
981  (CONFIGURE_MAXIMUM_ADA_TASKS * (RTEMS_MINIMUM_STACK_SIZE + (6 * 1024)))
982
983#else
984#define CONFIGURE_GNAT_MUTEXES           0
985#define CONFIGURE_GNAT_KEYS              0
986#define CONFIGURE_MAXIMUM_ADA_TASKS      0
987#define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0
988#define CONFIGURE_ADA_TASKS_STACK        0
989#endif
990
991
992#ifdef CONFIGURE_INIT
993
994rtems_api_configuration_table Configuration_RTEMS_API = {
995  CONFIGURE_MAXIMUM_TASKS,
996  CONFIGURE_MAXIMUM_TIMERS,
997  CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES +
998    CONFIGURE_TERMIOS_SEMAPHORES,
999  CONFIGURE_MAXIMUM_MESSAGE_QUEUES,
1000  CONFIGURE_MAXIMUM_PARTITIONS,
1001  CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION,
1002  CONFIGURE_MAXIMUM_PORTS,
1003  CONFIGURE_MAXIMUM_PERIODS,
1004  CONFIGURE_INIT_TASK_TABLE_SIZE,
1005  CONFIGURE_INIT_TASK_TABLE
1006};
1007
1008#ifdef RTEMS_POSIX_API
1009posix_api_configuration_table Configuration_POSIX_API = {
1010  CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS,
1011  CONFIGURE_MAXIMUM_POSIX_MUTEXES + CONFIGURE_GNAT_MUTEXES +
1012    CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS,
1013  CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES +
1014    CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS,
1015  CONFIGURE_MAXIMUM_POSIX_KEYS + CONFIGURE_GNAT_KEYS,
1016  CONFIGURE_MAXIMUM_POSIX_TIMERS,
1017  CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS,
1018  CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES,
1019  CONFIGURE_MAXIMUM_POSIX_SEMAPHORES,
1020  CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE,
1021  CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME
1022};
1023#endif
1024
1025#ifdef RTEMS_ITRON_API
1026itron_api_configuration_table Configuration_ITRON_API = {
1027  CONFIGURE_MAXIMUM_ITRON_TASKS,
1028  CONFIGURE_MAXIMUM_ITRON_SEMAPHORES,
1029  CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS,
1030  CONFIGURE_MAXIMUM_ITRON_MAILBOXES,
1031  CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS,
1032  CONFIGURE_MAXIMUM_ITRON_PORTS,
1033  CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS,
1034  CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS,
1035  CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE,
1036  CONFIGURE_ITRON_INIT_TASK_TABLE_NAME
1037};
1038#endif
1039
1040rtems_configuration_table Configuration = {
1041  CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
1042  CONFIGURE_EXECUTIVE_RAM_SIZE,
1043  CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION +
1044      CONFIGURE_STACK_CHECKER_EXTENSION,
1045  CONFIGURE_MICROSECONDS_PER_TICK,
1046  CONFIGURE_TICKS_PER_TIMESLICE,
1047  CONFIGURE_MAXIMUM_DEVICES,
1048  CONFIGURE_MAXIMUM_DRIVERS,
1049  CONFIGURE_NUMBER_OF_DRIVERS,               /* number of device drivers */
1050  Device_drivers,                            /* pointer to driver table */
1051  CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS,    /* number of initial extensions */
1052  CONFIGURE_INITIAL_EXTENSION_TABLE,         /* pointer to initial extensions */
1053  CONFIGURE_MULTIPROCESSING_TABLE,           /* pointer to MP config table */
1054  &Configuration_RTEMS_API,                  /* pointer to RTEMS API config */
1055#ifdef RTEMS_POSIX_API
1056  &Configuration_POSIX_API,                  /* pointer to POSIX API config */
1057#else
1058  NULL,                                      /* pointer to POSIX API config */
1059#endif
1060#ifdef RTEMS_ITRON_API
1061  &Configuration_ITRON_API                   /* pointer to ITRON API config */
1062#else
1063  NULL                                       /* pointer to ITRON API config */
1064#endif
1065};
1066#endif
1067
1068#endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */
1069
1070#ifdef __cplusplus
1071}
1072#endif
1073
1074/*
1075 *  Some warnings and error checking
1076 */
1077
1078/*
1079 *  Make sure a task/thread of some sort is configured
1080 */
1081
1082#if (CONFIGURE_MAXIMUM_TASKS == 0) && \
1083    (CONFIGURE_MAXIMUM_POSIX_THREADS == 0) && \
1084    (CONFIGURE_MAXIMUM_ADA_TASKS == 0) &&  \
1085    (CONFIGURE_MAXIMUM_ITRON_TASKS == 0)
1086#error "CONFIGURATION ERROR: No tasks or threads configured!!"
1087#endif
1088
1089/*
1090 *  Make sure at least one of the initialization task/thread
1091 *  tables was defined.
1092 */
1093
1094#if !defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) && \
1095    !defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) && \
1096    !defined(CONFIGURE_ITRON_INIT_TASK_TABLE)
1097#error "CONFIGURATION ERROR: No initialization tasks or threads configured!!"
1098#endif
1099
1100#endif
1101/* end of include file */
Note: See TracBrowser for help on using the repository browser.