source: rtems/doc/user/conf.t @ da78fee

4.104.114.95
Last change on this file since da78fee was da78fee, checked in by Joel Sherrill <joel.sherrill@…>, on 05/14/08 at 14:27:26

2008-05-14 Joel Sherrill <joel.sherrill@…>

  • user/conf.t: Fix text on CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER.
  • Property mode set to 100644
File size: 74.9 KB
Line 
1@c  COPYRIGHT (c) 1988-2008.
2@c  On-Line Applications Research Corporation (OAR).
3@c  All rights reserved.
4@c
5@c  $Id$
6@c
7
8@c The following macros from confdefs.h have not been discussed in this
9@c chapter:
10@c
11@c CONFIGURE_NEWLIB_EXTENSION - probably not needed
12@c
13@c In addition, there should be examples of defining your own
14@c Device Driver Table, Init task table, etc.
15@c
16@c Regardless, this is a big step up. :)
17@c
18
19@chapter Configuring a System
20
21@section Introduction
22
23RTEMS must be configured for an application.  This configuration
24information encompasses a variety of information including
25the length of each clock tick, the maximum number of each RTEMS
26object that can be created, the application initialization tasks,
27and the device drivers in the application.  This information
28is placed in data structures that are given to RTEMS at
29system initialization time.  This chapter details the
30format of these data structures as well as a simpler
31mechanism to automate the generation of these structures.
32
33@ifset is-Ada
34System configuration is ALWAYS done from C.  When developing
35an Ada application, the user is responsible for creating at
36least one C file which contains the Ada run-time initialization
37and the RTEMS System Configuration.  There is no Ada binding
38for RTEMS System Configuration information.  Thus all examples
39and data structures shown in this chapter are in C.
40@end ifset
41
42@section Automatic Generation of System Configuration
43
44@cindex confdefs.h
45@findex confdefs.h
46
47RTEMS provides the @code{rtems/confdefs.h} C language header file that
48based on the setting of a variety of macros can automatically
49produce nearly all of the configuration tables required
50by an RTEMS application.  Rather than building the individual
51tables by hand, the application simply specifies the values
52for the configuration parameters it wishes to set.  In the following
53example, the configuration information for a simple system with
54a message queue and a time slice of 50 milliseconds is configured:
55
56@example
57@group
58#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
59#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
60
61#define CONFIGURE_MICROSECONDS_PER_TICK   1000 /* 1 millisecond */
62#define CONFIGURE_TICKS_PER_TIMESLICE       50 /* 50 milliseconds */
63
64#define CONFIGURE_MAXIMUM_TASKS 4
65#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
66@end group
67@end example
68
69This system will begin execution with the single initialization task
70named @code{Init}.  It will be configured to have both a console
71device driver (for standard I/O) and a clock tick device driver.
72
73For each configuration parameter in the configuration tables, the
74macro corresponding to that field is discussed.  Most systems
75can be easily configured using the @code{rtems/confdefs.h} mechanism.
76
77The @code{CONFIGURE_INIT} constant must be defined in order to
78make @code{rtems/confdefs.h} instantiate the configuration data
79structures.  This can only be defined in one source file per
80application that includes @code{rtems/confdefs.h} or the symbol
81table will be instantiated multiple times and linking errors
82produced.
83
84The user should be aware that the defaults are intentionally
85set as low as possible.  By default, no application resources
86are configured.  The @code{rtems/confdefs.h} file ensures that
87at least one application tasks or thread is configured
88and that at least one of the initialization task/thread
89tables is configured.
90
91The @code{rtems/confdefs.h} file estimates the amount of
92memory required for the RTEMS Executive Workspace.  This
93estimate is only as accurate as the information given
94to @code{rtems/confdefs.h} and may be either too high or too
95low for a variety of reasons.  Some of the reasons that
96@code{rtems/confdefs.h} may reserve too much memory for RTEMS
97are:
98
99@itemize @bullet
100@item All tasks/threads are assumed to be floating point.
101@end itemize
102
103Conversely, there are many more reasons, the resource
104estimate could be too low:
105
106@itemize @bullet
107@item Task/thread stacks greater than minimum size must be
108accounted for explicitly by developer.
109
110@item Memory for messages is not included.
111
112@item Device driver requirements are not included.
113
114
115@item Network stack requirements are not included.
116
117@item Requirements for add-on libraries are not included.
118@end itemize
119
120In general, @code{rtems/confdefs.h} is very accurate when given
121enough information.  However, it is quite easy to use
122a library and not account for its resources.
123
124The following subsection list all of the constants which can be
125set by the user.
126
127@subsection Library Support Definitions
128
129This section defines the file system and IO library
130related configuration parameters supported by
131@code{rtems/confdefs.h}.
132
133@itemize @bullet
134@findex CONFIGURE_MALLOC_STATISTICS
135@item @code{CONFIGURE_MALLOC_STATISTICS} is defined when the application
136wishes to enable the gathering of more detailed statistics on the
137C Malloc Family of routines.
138
139@findex CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK
140@item @code{CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK} is defined by a BSP
141to indicate that it does not allocate all available memory to the
142C Program Heap used by the Malloc Family of routines.  If defined,
143when @code{malloc()} is unable to allocate memory, it will call
144the BSP supplied @code{sbrk()} to obtain more memory.
145
146@findex CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
147@item @code{CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS} is set to the
148maximum number of files that can be concurrently open.  Libio requires
149a Classic RTEMS semaphore for each file descriptor as well as one
150global one.  The default value is 3 file descriptors which is
151enough to support standard input, output, and error output.
152
153@findex CONFIGURE_TERMIOS_DISABLED
154@item @code{CONFIGURE_TERMIOS_DISABLED} is defined if the
155software implementing POSIX termios functionality is
156not going to be used by this application.  By default, this
157is not defined and resources are reserved for the
158termios functionality.
159
160@findex CONFIGURE_NUMBER_OF_TERMIOS_PORTS
161@item @code{CONFIGURE_NUMBER_OF_TERMIOS_PORTS} is set to the
162number of ports using the termios functionality.  Each
163concurrently active termios port requires resources.
164By default, this is set to 1 so a console port can be
165used.
166
167@findex CONFIGURE_HAS_OWN_MOUNT_TABLE
168@item @code{CONFIGURE_HAS_OWN_MOUNT_TABLE} is defined when the
169application provides their own filesystem mount table.  The
170mount table is an array of @code{rtems_filesystem_mount_table_t}
171entries pointed to by the global variable
172@code{rtems_filesystem_mount_table}.  The number of
173entries in this table is in an integer variable named
174@code{rtems_filesystem_mount_table_t}.
175
176@findex CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
177@item @code{CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM} is defined
178if the application wishes to use the full functionality
179IMFS.  By default, the miniIMFS is used.  The miniIMFS
180is a minimal functionality subset of the In-Memory
181FileSystem (IMFS).  The miniIMFS is comparable
182in functionality to the pseudo-filesystem name space provided
183before RTEMS release 4.5.0.  The miniIMFS supports
184only directories and device nodes and is smaller in executable
185code size than the full IMFS.
186
187@findex STACK_CHECKER_ON
188@item @code{STACK_CHECKER_ON} is defined when the application
189wishes to enable run-time stack bounds checking.  This increases
190the time required to create tasks as well as adding overhead
191to each context switch.  By default, this is not defined and
192thus stack checking is disabled.
193
194@end itemize
195
196@subsection Basic System Information
197
198This section defines the general system configuration parameters supported by
199@code{rtems/confdefs.h}.
200
201@itemize @bullet
202@findex CONFIGURE_HAS_OWN_CONFIGURATION_TABLE
203@item @code{CONFIGURE_HAS_OWN_CONFIGURATION_TABLE} should only be defined
204if the application is providing their own complete set of configuration
205tables.
206
207@findex CONFIGURE_INTERRUPT_STACK_SIZE
208@item @code{CONFIGURE_INTERRUPT_STACK_SIZE} is set to the
209size of the interrupt stack.  The interrupt stack size is
210usually set by the BSP but since this memory is allocated
211from the RTEMS Ram Workspace, it must be accounted for.  The
212default for this field is RTEMS_MINIMUM_STACK_SIZE.  [NOTE:
213In some BSPs, changing this constant does NOT change the
214size of the interrupt stack, only the amount of memory
215reserved for it.]
216
217@findex CONFIGURE_EXECUTIVE_RAM_WORK_AREA
218@item @code{CONFIGURE_EXECUTIVE_RAM_WORK_AREA} is the base
219address of the RTEMS RAM Workspace.  By default, this value
220is NULL indicating that the BSP is to determine the location
221of the RTEMS RAM Workspace.
222
223@findex CONFIGURE_MICROSECONDS_PER_TICK
224@item @code{CONFIGURE_MICROSECONDS_PER_TICK} is the length
225of time between clock ticks.  By default, this is set to
22610000 microseconds.
227
228@findex CONFIGURE_TICKS_PER_TIMESLICE
229@item @code{CONFIGURE_TICKS_PER_TIMESLICE} is the length
230of the timeslice quantum in ticks for each task.  By
231default, this is 50.
232
233@fnindex CONFIGURE_INTERRUPT_STACK_SIZE
234@item @code{CONFIGURE_INTERRUPT_STACK_SIZE} is set to the
235desired stack size for the interrupt.  If not specified,
236the interrupt stack will be of minimum size.  The default
237value is @code{RTEMS_MINIMUM_STACK_SIZE}.
238
239@findex CONFIGURE_TASK_STACK_ALLOCATOR
240@item @code{CONFIGURE_TASK_STACK_ALLOCATOR}
241may point to a user provided routine to allocate task stacks.
242The default value for this field is NULL which indicates that
243task stacks will be allocated from the RTEMS Workspace.
244
245@findex CONFIGURE_TASK_STACK_DEALLOCATOR
246@item @code{CONFIGURE_TASK_STACK_DEALLOCATOR}
247may point to a user provided routine to free task stacks.
248The default value for this field is NULL which indicates that
249task stacks will be allocated from the RTEMS Workspace.
250
251@findex CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY
252@item @code{CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY}
253indicates whether RTEMS should zero the RTEMS Workspace and
254C Program Heap as part of its initialization.  If set to
255TRUE, the Workspace is zeroed.  Otherwise, it is not.
256Unless overridden by the BSP, the default value for this
257field is FALSE.
258
259@findex CONFIGURE_MESSAGE_BUFFER_MEMORY
260@item @code{CONFIGURE_MESSAGE_BUFFER_MEMORY} is set to the number of
261bytes the application requires to be reserved for pending message queue
262buffers.  This value should include memory for all buffers across
263all APIs.  The default value is 0.
264
265@findex CONFIGURE_MEMORY_OVERHEAD
266@item @code{CONFIGURE_MEMORY_OVERHEAD} is set to the number of
267kilobytes the application wishes to add to the requirements calculated
268by @code{rtems/confdefs.h}.  The default value is 0.
269
270@findex CONFIGURE_EXTRA_TASK_STACKS
271@item @code{CONFIGURE_EXTRA_TASK_STACKS} is set to the number of
272bytes the applications wishes to add to the task stack requirements
273calculated by @code{rtems/confdefs.h}.  This parameter is very important.
274If the application creates tasks with stacks larger then the
275minimum, then that memory is NOT accounted for by @code{rtems/confdefs.h}.
276The default value is 0.
277
278@end itemize
279
280NOTE: The required size of the Executive RAM Work Area is calculated
281automatically when using the @code{rtems/confdefs.h} mechanism.
282
283@c
284@c
285@c
286@subsection Idle Task Configuration
287
288This section defines the IDLE task related configuration parameters
289supported by @code{rtems/confdefs.h}.
290
291@itemize @bullet
292
293@fnindex CONFIGURE_IDLE_TASK_BODY
294@item @code{CONFIGURE_IDLE_TASK_BODY} is set to the method name
295corresponding to the application specific IDLE thread body.  If
296not specified, the BSP or RTEMS default IDLE thread body will
297be used.  The default value is NULL.
298
299@fnindex CONFIGURE_IDLE_TASK_STACK_SIZE
300@item @code{CONFIGURE_IDLE_TASK_STACK_SIZE} is set to the
301desired stack size for the IDLE task.  If not specified,
302the IDLE task will have a stack of minimum size.  The default
303value is @code{RTEMS_MINIMUM_STACK_SIZE}.
304
305@end itemize
306
307@c
308@c
309@c
310@subsection Device Driver Table
311
312This section defines the configuration parameters related
313to the automatic generation of a Device Driver Table.  As
314@code{rtems/confdefs.h} only is aware of a small set of
315standard device drivers, the generated Device Driver
316Table is suitable for simple applications with no
317custom device drivers.
318
319@itemize @bullet
320@findex CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE
321@item @code{CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE} is defined if
322the application wishes to provide their own Device Driver Table.
323The table generated is an array of @code{rtems_driver_address_table}
324entries named @code{Device_drivers}.  By default, this is not
325defined indicating the @code{rtems/confdefs.h} is providing the
326device driver table.
327
328@findex CONFIGURE_MAXIMUM_DRIVERS
329@item @code{CONFIGURE_MAXIMUM_DRIVERS} is defined
330as the number of device drivers per node.  By default, this is
331set to 10.
332
333@findex CONFIGURE_MAXIMUM_DEVICES
334@item @code{CONFIGURE_MAXIMUM_DEVICES} is defined
335to the number of individual devices that may be registered
336in the system.  By default, this is set to 20.
337
338@findex CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
339@item @code{CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER}
340is defined
341if the application wishes to include the Console Device Driver.
342This device driver is responsible for providing standard input
343and output using "/dev/console".  By default, this is not
344defined.
345
346@findex CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
347@item @code{CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER}
348is defined
349if the application wishes to include the Clock Device Driver.
350This device driver is responsible for providing a regular
351interrupt which invokes the @code{rtems_clock_tick} directive.
352By default, this is not defined.
353
354@findex CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
355@item @code{CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER}
356is defined if the application wishes to include the Timer Driver.
357This device driver is used to benchmark execution times
358by the RTEMS Timing Test Suites.  By default, this is not
359defined.
360
361@findex CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
362@item @code{CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER} is defined
363when the application does @b{NOT} want the Clock Device Driver
364and is @b{NOT} using the Timer Driver.  The inclusion or
365exclusion of the Clock Driver must be explicit in typical
366user applications.  This is intended to prevent the common
367user error of using the Hello World example as the baseline
368for an application and leaving out a clock tick source.
369
370@findex CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
371@item @code{CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER}
372is defined
373if the application wishes to include the Real-Time Clock Driver.
374By default, this is not defined.
375
376@findex CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
377@item @code{CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER}
378is defined if the application wishes to include the Stub Device Driver.
379This device driver simply provides entry points that return
380successful and is primarily a test fixture.
381By default, this is not defined.
382
383@findex CONFIGURE_APPLICATION_EXTRA_DRIVERS
384@item @code{CONFIGURE_APPLICATION_EXTRA_DRIVERS}
385is defined if the application has device drivers it needs to
386include in the Device Driver Table.  This should be defined
387to the set of device driver entries that will be placed in
388the table.  By default, this is not defined.
389
390@end itemize
391
392@subsection Multiprocessing Configuration
393
394This section defines the multiprocessing related
395system configuration parameters supported by @code{rtems/confdefs.h}.
396This class of Configuration Constants are only applicable if
397@code{CONFIGURE_MP_APPLICATION} is defined.
398
399@itemize @bullet
400@findex CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE
401@item @code{CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE} is defined
402if the application wishes to provide their own Multiprocessing
403Configuration Table.  The generated table is named
404@code{Multiprocessing_configuration}.  By default, this
405is not defined.
406
407@findex CONFIGURE_MP_NODE_NUMBER
408@item @code{CONFIGURE_MP_NODE_NUMBER} is the node number of
409this node in a multiprocessor system.  The default node number
410is @code{NODE_NUMBER} which is set directly in RTEMS test Makefiles.
411
412@findex CONFIGURE_MP_MAXIMUM_NODES
413@item @code{CONFIGURE_MP_MAXIMUM_NODES} is the maximum number
414of nodes in a multiprocessor system.  The default is 2.
415
416@findex CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS
417@item @code{CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS}
418is the maximum number
419of concurrently active global objects in a multiprocessor
420system.  The default is 32.
421
422@findex CONFIGURE_MP_MAXIMUM_PROXIES
423@item @code{CONFIGURE_MP_MAXIMUM_PROXIES} is the maximum number
424of concurrently active thread/task proxies in a multiprocessor
425system.  The default is 32.
426
427@findex CONFIGURE_MP_MPCI_TABLE_POINTER
428@item @code{CONFIGURE_MP_MPCI_TABLE_POINTER} is the pointer
429to the MPCI Configuration Table.  The default value of
430this field is @code{&MPCI_table}.
431@end itemize
432
433@subsection Classic API Configuration
434
435This section defines the Classic API related
436system configuration parameters supported by @code{rtems/confdefs.h}.
437
438@itemize @bullet
439@findex CONFIGURE_MAXIMUM_TASKS
440@item @code{CONFIGURE_MAXIMUM_TASKS} is the maximum number of
441Classic API tasks that can be concurrently active.
442The default for this field is 0.
443
444@findex CONFIGURE_MAXIMUM_TIMERS
445@item @code{CONFIGURE_MAXIMUM_TIMERS} is the maximum number of
446Classic API timers that can be concurrently active.
447The default for this field is 0.
448
449@findex CONFIGURE_MAXIMUM_SEMAPHORES
450@item @code{CONFIGURE_MAXIMUM_SEMAPHORES} is the maximum number of
451Classic API semaphores that can be concurrently active.
452The default for this field is 0.
453
454@findex CONFIGURE_MAXIMUM_MESSAGE_QUEUES
455@item @code{CONFIGURE_MAXIMUM_MESSAGE_QUEUES} is the maximum number of
456Classic API message queues that can be concurrently active.
457The default for this field is 0.
458
459@findex CONFIGURE_MAXIMUM_PARTITIONS
460@item @code{CONFIGURE_MAXIMUM_PARTITIONS} is the maximum number of
461Classic API partitions that can be concurrently active.
462The default for this field is 0.
463
464@findex CONFIGURE_MAXIMUM_REGIONS
465@item @code{CONFIGURE_MAXIMUM_REGIONS} is the maximum number of
466Classic API regions that can be concurrently active.
467The default for this field is 0.
468
469@findex CONFIGURE_MAXIMUM_PORTS
470@item @code{CONFIGURE_MAXIMUM_PORTS} is the maximum number of
471Classic API ports that can be concurrently active.
472The default for this field is 0.
473
474@findex CONFIGURE_MAXIMUM_PERIODS
475@item @code{CONFIGURE_MAXIMUM_PERIODS} is the maximum number of
476Classic API rate monotonic periods that can be concurrently active.
477The default for this field is 0.
478
479@findex CONFIGURE_MAXIMUM_USER_EXTENSIONS
480@item @code{CONFIGURE_MAXIMUM_USER_EXTENSIONS} is the maximum number of
481Classic API user extensions that can be concurrently active.
482The default for this field is 0.
483
484@end itemize
485
486@subsection Classic API Initialization Tasks Table Configuration
487
488The @code{rtems/confdefs.h} configuration system can automatically
489generate an Initialization Tasks Table named
490@code{Initialization_tasks} with a single entry.  The following
491parameters control the generation of that table.
492
493@itemize @bullet
494@findex CONFIGURE_RTEMS_INIT_TASKS_TABLE
495@item @code{CONFIGURE_RTEMS_INIT_TASKS_TABLE} is defined
496if the user wishes to use a Classic RTEMS API Initialization
497Task Table.  The application may choose to use the initialization
498tasks or threads table from another API.  By default, this
499field is not defined as the user MUST select their own
500API for initialization tasks.
501
502@findex CONFIGURE_HAS_OWN_INIT_TASK_TABLE
503@item @code{CONFIGURE_HAS_OWN_INIT_TASK_TABLE} is defined
504if the user wishes to define their own Classic API Initialization
505Tasks Table.  This table should be named @code{Initialization_tasks}.
506By default, this is not defined.
507
508@findex CONFIGURE_INIT_TASK_NAME
509@item @code{CONFIGURE_INIT_TASK_NAME} is the name
510of the single initialization task defined by the
511Classic API Initialization Tasks Table.  By default
512the value is @code{rtems_build_name( 'U', 'I', '1', ' ' )}.
513
514@findex CONFIGURE_INIT_TASK_STACK_SIZE
515@item @code{CONFIGURE_INIT_TASK_STACK_SIZE}
516is the stack size
517of the single initialization task defined by the
518Classic API Initialization Tasks Table.  By default
519the value is @code{RTEMS_MINIMUM_STACK_SIZE}.
520
521@findex CONFIGURE_INIT_TASK_PRIORITY
522@item @code{CONFIGURE_INIT_TASK_PRIORITY}
523is the initial priority
524of the single initialization task defined by the
525Classic API Initialization Tasks Table.  By default
526the value is 1 which is the highest priority
527in the Classic API.
528
529@findex CONFIGURE_INIT_TASK_ATTRIBUTES
530@item @code{CONFIGURE_INIT_TASK_ATTRIBUTES}
531is the task attributes
532of the single initialization task defined by the
533Classic API Initialization Tasks Table.  By default
534the value is @code{RTEMS_DEFAULT_ATTRIBUTES}.
535
536@findex CONFIGURE_INIT_TASK_ENTRY_POINT
537@item @code{CONFIGURE_INIT_TASK_ENTRY_POINT}
538is the entry point (a.k.a. function name)
539of the single initialization task defined by the
540Classic API Initialization Tasks Table.  By default
541the value is @code{Init}.
542
543@findex CONFIGURE_INIT_TASK_INITIAL_MODES
544@item @code{CONFIGURE_INIT_TASK_INITIAL_MODES}
545is the initial execution mode
546of the single initialization task defined by the
547Classic API Initialization Tasks Table.  By default
548the value is @code{RTEMS_NO_PREEMPT}.
549
550@findex CONFIGURE_INIT_TASK_ARGUMENTS
551@item @code{CONFIGURE_INIT_TASK_ARGUMENTS}
552is the task argument
553of the single initialization task defined by the
554Classic API Initialization Tasks Table.  By default
555the value is 0.
556
557@end itemize
558
559
560@subsection POSIX API Configuration
561
562The parameters in this section are used to configure resources
563for the RTEMS POSIX API.  They are only relevant if the POSIX API
564is enabled at configure time using the @code{--enable-posix} option.
565
566@itemize @bullet
567@findex CONFIGURE_MAXIMUM_POSIX_THREADS
568@item @code{CONFIGURE_MAXIMUM_POSIX_THREADS} is the maximum number of
569POSIX API threads that can be concurrently active.
570The default is 0.
571
572@findex CONFIGURE_MAXIMUM_POSIX_MUTEXES
573@item @code{CONFIGURE_MAXIMUM_POSIX_MUTEXES} is the maximum number of
574POSIX API mutexes that can be concurrently active.
575The default is 0.
576
577@findex CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
578@item @code{CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES} is the maximum number of
579POSIX API condition variables that can be concurrently active.
580The default is 0.
581
582@findex CONFIGURE_MAXIMUM_POSIX_KEYS
583@item @code{CONFIGURE_MAXIMUM_POSIX_KEYS} is the maximum number of
584POSIX API keys that can be concurrently active.
585The default is 0.
586
587@findex CONFIGURE_MAXIMUM_POSIX_TIMERS
588@item @code{CONFIGURE_MAXIMUM_POSIX_TIMERS} is the maximum number of
589POSIX API timers that can be concurrently active.
590The default is 0.
591
592@findex CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS
593@item @code{CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS} is the maximum number of
594POSIX API queued signals that can be concurrently active.
595The default is 0.
596
597@findex CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES
598@item @code{CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES} is the maximum number of
599POSIX API message queues that can be concurrently active.
600The default is 0.
601
602@findex CONFIGURE_MAXIMUM_POSIX_SEMAPHORES
603@item @code{CONFIGURE_MAXIMUM_POSIX_SEMAPHORES} is the maximum number of
604POSIX API semaphores that can be concurrently active.
605The default is 0.
606
607@end itemize
608
609@subsection POSIX Initialization Threads Table Configuration
610
611The @code{rtems/confdefs.h} configuration system can automatically
612generate a POSIX Initialization Threads Table named
613@code{POSIX_Initialization_threads} with a single entry.  The following
614parameters control the generation of that table.
615
616@itemize @bullet
617@findex CONFIGURE_POSIX_INIT_THREAD_TABLE
618@item @code{CONFIGURE_POSIX_INIT_THREAD_TABLE}
619is defined
620if the user wishes to use a POSIX API Initialization
621Threads Table.  The application may choose to use the initialization
622tasks or threads table from another API.  By default, this
623field is not defined as the user MUST select their own
624API for initialization tasks.
625
626@findex CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE
627@item @code{CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE}
628is defined if the user wishes to define their own POSIX API Initialization
629Threads Table.  This table should be named @code{POSIX_Initialization_threads}.
630By default, this is not defined.
631
632@findex CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT
633@item @code{CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT}
634is the entry point (a.k.a. function name)
635of the single initialization thread defined by the
636POSIX API Initialization Threads Table.  By default
637the value is @code{POSIX_Init}.
638
639@findex CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
640@item @code{CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE}
641is the stack size of the single initialization thread defined by the
642POSIX API Initialization Threads Table.  By default
643the value is @code{RTEMS_MINIMUM_STACK_SIZE * 2}.
644
645@end itemize
646
647@subsection ITRON API Configuration
648
649The parameters in this section are used to configure resources
650for the RTEMS ITRON API.  They are only relevant if the POSIX API
651is enabled at configure time using the @code{--enable-itron} option.
652
653@itemize @bullet
654@findex CONFIGURE_MAXIMUM_ITRON_TASKS
655@item @code{CONFIGURE_MAXIMUM_ITRON_TASKS}
656is the maximum number of
657ITRON API tasks that can be concurrently active.
658The default is 0.
659
660@findex CONFIGURE_MAXIMUM_ITRON_SEMAPHORES
661@item @code{CONFIGURE_MAXIMUM_ITRON_SEMAPHORES}
662is the maximum number of
663ITRON API semaphores that can be concurrently active.
664The default is 0.
665
666@findex CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS
667@item @code{CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS}
668is the maximum number of
669ITRON API eventflags that can be concurrently active.
670The default is 0.
671
672@findex CONFIGURE_MAXIMUM_ITRON_MAILBOXES
673@item @code{CONFIGURE_MAXIMUM_ITRON_MAILBOXES}
674is the maximum number of
675ITRON API mailboxes that can be concurrently active.
676The default is 0.
677
678@findex CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS
679@item @code{CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS}
680is the maximum number of
681ITRON API message buffers that can be concurrently active.
682The default is 0.
683
684@findex CONFIGURE_MAXIMUM_ITRON_PORTS
685@item @code{CONFIGURE_MAXIMUM_ITRON_PORTS}
686is the maximum number of
687ITRON API ports that can be concurrently active.
688The default is 0.
689
690@findex CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS
691@item @code{CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS}
692is the maximum number of
693ITRON API memory pools that can be concurrently active.
694The default is 0.
695
696@findex CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS
697@item @code{CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS}
698is the maximum number of
699ITRON API fixed memory pools that can be concurrently active.
700The default is 0.
701
702@end itemize
703
704@subsection ITRON Initialization Task Table Configuration
705
706The @code{rtems/confdefs.h} configuration system can automatically
707generate an ITRON Initialization Tasks Table named
708@code{ITRON_Initialization_tasks} with a single entry.  The following
709parameters control the generation of that table.
710
711@itemize @bullet
712@findex CONFIGURE_ITRON_INIT_TASK_TABLE
713@item @code{CONFIGURE_ITRON_INIT_TASK_TABLE} is defined
714if the user wishes to use a ITRON API Initialization
715Tasks Table.  The application may choose to use the initialization
716tasks or threads table from another API.  By default, this
717field is not defined as the user MUST select their own
718API for initialization tasks.
719
720@findex CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE
721@item @code{CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE}
722is defined if the user wishes to define their own ITRON API Initialization
723Tasks Table.  This table should be named @code{ITRON_Initialization_tasks}.
724By default, this is not defined.
725
726@findex CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT
727@item @code{CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT}
728is the entry point (a.k.a. function name)
729of the single initialization task defined by the
730ITRON API Initialization Tasks Table.  By default
731the value is @code{ITRON_Init}.
732
733@findex CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES
734@item @code{CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES}
735is the attribute set
736of the single initialization task defined by the
737ITRON API Initialization Tasks Table.  By default
738the value is @code{TA_HLNG}.
739
740@findex CONFIGURE_ITRON_INIT_TASK_PRIORITY
741@item @code{CONFIGURE_ITRON_INIT_TASK_PRIORITY}
742is the initial priority
743of the single initialization task defined by the
744ITRON API Initialization Tasks Table.  By default
745the value is @code{1} which is the highest priority
746in the ITRON API.
747
748@findex CONFIGURE_ITRON_INIT_TASK_STACK_SIZE
749@item @code{CONFIGURE_ITRON_INIT_TASK_STACK_SIZE}
750is the stack size of the single initialization task defined by the
751ITRON API Initialization Tasks Table.  By default
752the value is @code{RTEMS_MINIMUM_STACK_SIZE}.
753
754@end itemize
755
756@subsection Ada Tasks
757
758This section defines the system configuration parameters supported
759by @code{rtems/confdefs.h} related to configuring RTEMS to support
760a task using Ada tasking with GNAT.
761
762@itemize @bullet
763@findex CONFIGURE_GNAT_RTEMS
764@item @code{CONFIGURE_GNAT_RTEMS} is defined to inform
765RTEMS that the GNAT Ada run-time is to be used by the
766application.  This configuration parameter is critical
767as it makes @code{rtems/confdefs.h} configure the resources
768(mutexes and keys) used implicitly by the GNAT run-time.
769By default, this parameter is not defined.
770
771@findex CONFIGURE_MAXIMUM_ADA_TASKS
772@item @code{CONFIGURE_MAXIMUM_ADA_TASKS} is the
773number of Ada tasks that can be concurrently active
774in the system.  By default, when @code{CONFIGURE_GNAT_RTEMS}
775is defined, this is set to 20.
776
777@findex CONFIGURE_MAXIMUM_FAKE_ADA_TASKS
778@item @code{CONFIGURE_MAXIMUM_FAKE_ADA_TASKS} is
779the number of "fake" Ada tasks that can be concurrently
780active in the system.  A "fake" Ada task is a non-Ada
781task that makes calls back into Ada code and thus
782implicitly uses the Ada run-time.
783
784@end itemize
785
786@section Configuration Table
787
788@cindex Configuration Table
789@cindex RTEMS Configuration Table
790
791The RTEMS Configuration Table is used to tailor an
792application for its specific needs.  For example, the user can
793configure the number of device drivers or which APIs may be used.
794THe address of the user-defined Configuration Table is passed as an
795argument to the @code{rtems_initialize_executive}
796directive, which MUST be the first RTEMS directive called. 
797The RTEMS Configuration Table is defined in the following C structure:
798
799@findex rtems_configuration_table
800@example
801@group
802typedef struct @{
803  void                           *work_space_start;
804  uint32_t                        work_space_size;
805  uint32_t                        maximum_extensions;
806  uint32_t                        microseconds_per_tick;
807  uint32_t                        ticks_per_timeslice;
808  void                          (*idle_task)( void );
809  uint32_t                        idle_task_stack_size;
810  uint32_t                        interrupt_stack_size;
811  void *                        (*stack_allocate_hook)( uint32_t );
812  void                          (*stack_free_hook)( void * );
813  boolean                         do_zero_of_workspace;
814  uint32_t                        maximum_drivers;
815  uint32_t                        number_of_device_drivers;
816  rtems_driver_address_table     *Device_driver_table;
817  uint32_t                        number_of_initial_extensions;
818  rtems_extensions_table         *User_extension_table;
819#if defined(RTEMS_MULTIPROCESSING)
820  rtems_multiprocessing_table    *User_multiprocessing_table;
821#endif
822  rtems_api_configuration_table  *RTEMS_api_configuration;
823  posix_api_configuration_table  *POSIX_api_configuration;
824  itron_api_configuration        *ITRON_api_configuration;
825@} rtems_configuration_table;
826@end group
827@end example
828
829@table @b
830@item work_space_start
831is the address of the RTEMS RAM Workspace. 
832This area contains items such as the
833various object control blocks (TCBs, QCBs, ...) and task stacks.
834If the address is not aligned on a four-word boundary, then
835RTEMS will invoke the fatal error handler during
836@code{rtems_initialize_executive}.
837When using the @code{rtems/confdefs.h} mechanism for configuring
838an RTEMS application, the value for this field corresponds
839to the setting of the macro @code{CONFIGURE_EXECUTIVE_RAM_WORK_AREA}
840which defaults to @code{NULL}.  Normally, this field should be
841configured as @code{NULL} as BSPs will assign memory for the
842RTEMS RAM Workspace as part of system initialization.
843
844@item work_space_size
845is the calculated size of the
846RTEMS RAM Workspace.  The section Sizing the RTEMS RAM Workspace
847details how to arrive at this number.
848When using the @code{rtems/confdefs.h} mechanism for configuring
849an RTEMS application, the value for this field corresponds
850to the setting of the macro @code{CONFIGURE_EXECUTIVE_RAM_SIZE}
851and is calculated based on the other system configuration settings.
852
853@item microseconds_per_tick
854is number of microseconds per clock tick.
855When using the @code{rtems/confdefs.h} mechanism for configuring
856an RTEMS application, the value for this field corresponds
857to the setting of the macro @code{CONFIGURE_MICROSECONDS_PER_TICK}.
858If not defined by the application, then the
859@code{CONFIGURE_MICROSECONDS_PER_TICK} macro defaults to 10000
860(10 milliseconds).
861
862@item ticks_per_timeslice
863is the number of clock ticks for a timeslice.
864When using the @code{rtems/confdefs.h} mechanism for configuring
865an RTEMS application, the value for this field corresponds
866to the setting of the macro @code{CONFIGURE_TICKS_PER_TIMESLICE}.
867
868@item idle_task
869is the address of the optional user
870provided routine which is used as the system's IDLE task.  If
871this field is not NULL, then the RTEMS default IDLE task is not
872used.  This field may be NULL to indicate that the default IDLE
873is to be used.  When using the @code{rtems/confdefs.h} mechanism
874for configuring an RTEMS application, the value for this field
875corresponds to the setting of the macro @code{CONFIGURE_IDLE_TASK_BODY}.
876
877@item idle_task_stack_size
878is the size of the RTEMS idle task stack in bytes. 
879If this number is less than MINIMUM_STACK_SIZE, then the
880idle task's stack will be MINIMUM_STACK_SIZE in bytes.
881When using the @code{rtems/confdefs.h} mechanism
882for configuring an RTEMS application, the value for this field
883corresponds to the setting of the macro
884@code{CONFIGURE_IDLE_TASK_STACK_SIZE}.
885
886@item interrupt_stack_size
887is the size of the RTEMS interrupt stack in bytes. 
888If this number is less than MINIMUM_STACK_SIZE, then the
889interrupt stack will be MINIMUM_STACK_SIZE in bytes.
890When using the @code{rtems/confdefs.h} mechanism
891for configuring an RTEMS application, the value for this field
892corresponds to the setting of the macro
893@code{CONFIGURE_INTERRUPT_STACK_SIZE}.
894
895@item stack_allocate_hook
896may point to a user provided routine to allocate task stacks.
897The default is to allocate task stacks from the RTEMS Workspace.
898When using the @code{rtems/confdefs.h} mechanism
899for configuring an RTEMS application, the value for this field
900corresponds to the setting of the macro
901@code{CONFIGURE_TASK_STACK_ALLOCATOR}.
902
903@item stack_free_hook
904may point to a user provided routine to free task stacks.
905The default is to allocate task stacks from the RTEMS Workspace.
906When using the @code{rtems/confdefs.h} mechanism
907for configuring an RTEMS application, the value for this field
908corresponds to the setting of the macro
909@code{CONFIGURE_TASK_STACK_DEALLOCATOR}.
910
911@item do_zero_of_workspace
912indicates whether RTEMS should zero the RTEMS Workspace and
913C Program Heap as part of its initialization.  If set to
914TRUE, the Workspace is zeroed.  Otherwise, it is not.
915When using the @code{rtems/confdefs.h} mechanism
916for configuring an RTEMS application, the value for this field
917corresponds to the setting of the macro
918@code{CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY}.
919
920@item maximum_drivers
921is the maximum number of device drivers that can be registered.
922When using the @code{rtems/confdefs.h} mechanism for configuring
923an RTEMS application, the value for this field corresponds
924to the setting of the macro @code{CONFIGURE_MAXIMUM_DRIVERS}.
925
926@item number_of_device_drivers
927is the number of device drivers for the system.  There should be
928the same number of entries in the Device Driver Table.  If this field
929is zero, then the @code{User_driver_address_table} entry should be NULL.
930When using the @code{rtems/confdefs.h} mechanism for configuring
931an RTEMS application, the value for this field is calculated
932automatically based on the number of entries in the
933Device Driver Table.  This calculation is based on the assumption
934that the Device Driver Table is named @code{Device_drivers}
935and defined in C.  This table may be generated automatically
936for simple applications using only the device drivers that correspond
937to the following macros:
938
939@itemize @bullet
940
941@item @code{CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER}
942@item @code{CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER}
943@item @code{CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER}
944@item @code{CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER}
945@item @code{CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER}
946
947@end itemize
948
949Note that network device drivers are not configured in the
950Device Driver Table.
951
952@item Device_driver_table
953is the address of the Device Driver Table.  This table contains the entry
954points for each device driver.  If the number_of_device_drivers field is zero,
955then this entry should be NULL. The format of this table will be
956discussed below.
957When using the @code{rtems/confdefs.h} mechanism for configuring
958an RTEMS application, the Device Driver Table is assumed to be
959named @code{Device_drivers} and defined in C.  If the application is providing
960its own Device Driver Table, then the macro
961@code{CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE} must be defined to indicate
962this and prevent @code{rtems/confdefs.h} from generating the table.
963
964@item number_of_initial_extensions
965is the number of initial user extensions.  There should be
966the same number of entries as in the User_extension_table.  If this field
967is zero, then the User_driver_address_table entry should be NULL.
968When using the @code{rtems/confdefs.h} mechanism for configuring
969an RTEMS application, the value for this field corresponds
970to the setting of the macro @code{CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS}
971which is set automatically by @code{rtems/confdefs.h} based on the size
972of the User Extensions Table.
973
974@item User_extension_table
975is the address of the User
976Extension Table.  This table contains the entry points for the
977static set of optional user extensions.  If no user extensions
978are configured, then this entry should be NULL.  The format of
979this table will be discussed below.
980When using the @code{rtems/confdefs.h} mechanism for configuring
981an RTEMS application, the User Extensions Table is named
982@code{Configuration_Initial_Extensions} and defined in
983confdefs.h.  It is initialized based on the following
984macros:
985
986@itemize @bullet
987
988@item @code{CONFIGURE_INITIAL_EXTENSIONS}
989@item @code{STACK_CHECKER_EXTENSION}
990
991@end itemize
992
993The application may configure one or more initial user extension
994sets by setting the @code{CONFIGURE_INITIAL_EXTENSIONS} macro.  By
995defining the @code{STACK_CHECKER_EXTENSION} macro, the task stack bounds
996checking user extension set is automatically included in the
997application.
998
999@item User_multiprocessing_table
1000is the address of the Multiprocessor Configuration Table.  This
1001table contains information needed by RTEMS only when used in a multiprocessor
1002configuration.  This field must be NULL when RTEMS is used in a
1003single processor configuration.
1004When using the @code{rtems/confdefs.h} mechanism for configuring
1005an RTEMS application, the Multiprocessor Configuration Table
1006is automatically generated when the @code{CONFIGURE_MP_APPLICATION}
1007is defined.  If @code{CONFIGURE_MP_APPLICATION} is not defined, the this
1008entry is set to NULL.  The generated table has the name
1009@code{Multiprocessing_configuration}.
1010
1011@item RTEMS_api_configuration
1012is the address of the RTEMS API Configuration Table.  This table
1013contains information needed by the RTEMS API.  This field should be
1014NULL if the RTEMS API is not used.  [NOTE: Currently the RTEMS API
1015is required to support support components such as BSPs and libraries
1016which use this API.]  This table is built automatically and this
1017entry filled in, if using the @code{rtems/confdefs.h} application
1018configuration mechanism.  The generated table has the name
1019@code{Configuration_RTEMS_API}.
1020
1021@item POSIX_api_configuration
1022is the address of the POSIX API Configuration Table.  This table
1023contains information needed by the POSIX API.  This field should be
1024NULL if the POSIX API is not used.  This table is built automatically
1025and this entry filled in, if using the @code{rtems/confdefs.h} application
1026configuration mechanism.  The @code{rtems/confdefs.h} application
1027mechanism will fill this field in with the address of the
1028@code{Configuration_POSIX_API} table of POSIX API is configured
1029and NULL if the POSIX API is not configured.
1030
1031@end table
1032
1033@section RTEMS API Configuration Table
1034
1035@cindex RTEMS API Configuration Table
1036
1037The RTEMS API Configuration Table is used to configure the
1038managers which constitute the RTEMS API for a particular application. 
1039For example, the user can configure the maximum number of tasks for
1040this application. The RTEMS API Configuration Table is defined in
1041the following C structure:
1042
1043@findex rtems_api_configuration_table
1044@example
1045@group
1046typedef struct @{
1047  uint32_t  maximum_tasks;
1048  uint32_t  maximum_timers;
1049  uint32_t  maximum_semaphores;
1050  uint32_t  maximum_message_queues;
1051  uint32_t  maximum_partitions;
1052  uint32_t  maximum_regions;
1053  uint32_t  maximum_ports;
1054  uint32_t  maximum_periods;
1055  uint32_t  maximum_barriers;
1056  uint32_t  number_of_initialization_tasks;
1057  rtems_initialization_tasks_table *User_initialization_tasks_table;
1058@} rtems_api_configuration_table;
1059@end group
1060@end example
1061
1062@table @b
1063@item maximum_tasks
1064is the maximum number of tasks that
1065can be concurrently active (created) in the system including
1066initialization tasks.
1067When using the @code{rtems/confdefs.h} mechanism for configuring
1068an RTEMS application, the value for this field corresponds
1069to the setting of the macro @code{CONFIGURE_MAXIMUM_TASKS}.
1070If not defined by the application, then the @code{CONFIGURE_MAXIMUM_TASKS}
1071macro defaults to 0.
1072
1073@item maximum_timers
1074is the maximum number of timers
1075that can be concurrently active in the system.
1076When using the @code{rtems/confdefs.h} mechanism for configuring
1077an RTEMS application, the value for this field corresponds
1078to the setting of the macro @code{CONFIGURE_MAXIMUM_TIMERS}.
1079If not defined by the application, then the @code{CONFIGURE_MAXIMUM_TIMERS}
1080macro defaults to 0.
1081
1082@item maximum_semaphores
1083is the maximum number of
1084semaphores that can be concurrently active in the system.
1085When using the @code{rtems/confdefs.h} mechanism for configuring
1086an RTEMS application, the value for this field corresponds
1087to the setting of the macro @code{CONFIGURE_MAXIMUM_SEMAPHORES}.
1088If not defined by the application, then the @code{CONFIGURE_MAXIMUM_SEMAPHORES}
1089macro defaults to 0.
1090
1091@item maximum_message_queues
1092is the maximum number of
1093message queues that can be concurrently active in the system.
1094When using the @code{rtems/confdefs.h} mechanism for configuring
1095an RTEMS application, the value for this field corresponds
1096to the setting of the macro @code{CONFIGURE_MAXIMUM_MESSAGE_QUEUES}.
1097If not defined by the application, then the
1098@code{CONFIGURE_MAXIMUM_MESSAGE_QUEUES} macro defaults to 0.
1099
1100@item maximum_partitions
1101is the maximum number of
1102partitions that can be concurrently active in the system.
1103When using the @code{rtems/confdefs.h} mechanism for configuring
1104an RTEMS application, the value for this field corresponds
1105to the setting of the macro @code{CONFIGURE_MAXIMUM_PARTITIONS}.
1106If not defined by the application, then the @code{CONFIGURE_MAXIMUM_PARTITIONS}
1107macro defaults to 0.
1108
1109@item maximum_regions
1110is the maximum number of regions
1111that can be concurrently active in the system.
1112When using the @code{rtems/confdefs.h} mechanism for configuring
1113an RTEMS application, the value for this field corresponds
1114to the setting of the macro @code{CONFIGURE_MAXIMUM_REGIONS}.
1115If not defined by the application, then the @code{CONFIGURE_MAXIMUM_REGIONS}
1116macro defaults to 0.
1117
1118@item maximum_ports
1119is the maximum number of ports into
1120dual-port memory areas that can be concurrently active in the
1121system.
1122When using the @code{rtems/confdefs.h} mechanism for configuring
1123an RTEMS application, the value for this field corresponds
1124to the setting of the macro @code{CONFIGURE_MAXIMUM_PORTS}.
1125If not defined by the application, then the @code{CONFIGURE_MAXIMUM_PORTS}
1126macro defaults to 0.
1127
1128@item number_of_initialization_tasks
1129is the number of initialization tasks configured.  At least one
1130RTEMS initialization task or POSIX initializatin must be configured
1131in order for the user's application to begin executing.
1132When using the @code{rtems/confdefs.h} mechanism for configuring
1133an RTEMS application, the user must define the
1134@code{CONFIGURE_RTEMS_INIT_TASKS_TABLE} to indicate that there
1135is one or more RTEMS initialization task.  If the application
1136only has one RTEMS initialization task, then the automatically
1137generated Initialization Task Table will be sufficient.  The following
1138macros correspond to the single initialization task:
1139 
1140@itemize @bullet
1141
1142@item @code{CONFIGURE_INIT_TASK_NAME} - is the name of the task. 
1143If this macro is not defined by the application, then this defaults
1144to the task name of @code{"UI1 "} for User Initialization Task 1.
1145
1146@item @code{CONFIGURE_INIT_TASK_STACK_SIZE} - is the stack size
1147of the single initialization task.  If this macro is not defined
1148by the application, then this defaults to @code{RTEMS_MINIMUM_STACK_SIZE}.
1149
1150@item @code{CONFIGURE_INIT_TASK_PRIORITY} - is the initial priority
1151of the single initialization task.  If this macro is not defined
1152by the application, then this defaults to 1.
1153
1154@item @code{CONFIGURE_INIT_TASK_ATTRIBUTES} - is the attributes
1155of the single initialization task.  If this macro is not defined
1156by the application, then this defaults to @code{RTEMS_DEFAULT_ATTRIBUTES}.
1157
1158@item @code{CONFIGURE_INIT_TASK_ENTRY_POINT} - is the entry point
1159of the single initialization task.  If this macro is not defined
1160by the application, then this defaults to the C language routine
1161@code{Init}.
1162
1163@item @code{CONFIGURE_INIT_TASK_INITIAL_MODES} - is the initial execution
1164modes of the single initialization task.  If this macro is not defined
1165by the application, then this defaults to @code{RTEMS_NO_PREEMPT}.
1166
1167@item @code{CONFIGURE_INIT_TASK_ARGUMENTS} - is the argument passed to the
1168of the single initialization task.  If this macro is not defined
1169by the application, then this defaults to 0.
1170
1171
1172@end itemize
1173
1174
1175has the option to have
1176 value for this field corresponds
1177to the setting of the macro @code{}.
1178
1179@item User_initialization_tasks_table
1180is the address of the Initialization Task Table. This table contains the
1181information needed to create and start each of the
1182initialization tasks.  The format of this table will be discussed below.
1183When using the @code{rtems/confdefs.h} mechanism for configuring
1184an RTEMS application, the value for this field corresponds
1185to the setting of the macro @code{CONFIGURE_EXECUTIVE_RAM_WORK_AREA}.
1186
1187@end table
1188
1189@section POSIX API Configuration Table
1190
1191@cindex POSIX API Configuration Table
1192
1193The POSIX API Configuration Table is used to configure the
1194managers which constitute the POSIX API for a particular application.
1195For example, the user can configure the maximum number of threads for
1196this application. The POSIX API Configuration Table is defined in
1197the following C structure:
1198 
1199@findex posix_initialization_threads_table
1200@findex posix_api_configuration_table
1201@example
1202@group
1203typedef struct @{
1204  void       *(*thread_entry)(void *);
1205@} posix_initialization_threads_table;
1206 
1207typedef struct @{
1208  int                                 maximum_threads;
1209  int                                 maximum_mutexes;
1210  int                                 maximum_condition_variables;
1211  int                                 maximum_keys;
1212  int                                 maximum_timers;
1213  int                                 maximum_queued_signals;
1214  int                                 maximum_message_queues;
1215  int                                 maximum_semaphores;
1216  int                                 maximum_barriers;
1217  int                                 maximum_rwlocks;
1218  int                                 maximum_spinlocks;
1219  int                                 number_of_initialization_tasks;
1220  posix_initialization_threads_table *User_initialization_tasks_table;
1221@} posix_api_configuration_table;
1222@end group
1223@end example
1224 
1225@table @b
1226@item maximum_threads
1227is the maximum number of threads that
1228can be concurrently active (created) in the system including
1229initialization threads.
1230When using the @code{rtems/confdefs.h} mechanism for configuring
1231an RTEMS application, the value for this field corresponds
1232to the setting of the macro @code{CONFIGURE_MAXIMUM_POSIX_THREADS}.
1233If not defined by the application, then the
1234@code{CONFIGURE_MAXIMUM_POSIX_THREADS} macro defaults to 0.
1235
1236@item maximum_mutexes
1237is the maximum number of mutexes that can be concurrently
1238active in the system.
1239When using the @code{rtems/confdefs.h} mechanism for configuring
1240an RTEMS application, the value for this field corresponds
1241to the setting of the macro @code{CONFIGURE_MAXIMUM_POSIX_MUTEXES}.
1242If not defined by the application, then the
1243@code{CONFIGURE_MAXIMUM_POSIX_MUTEXES} macro defaults to 0.
1244
1245@item maximum_condition_variables
1246is the maximum number of condition variables that can be
1247concurrently active in the system.
1248When using the @code{rtems/confdefs.h} mechanism for configuring
1249an RTEMS application, the value for this field corresponds
1250to the setting of the macro @code{CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES}.
1251If not defined by the application, then the
1252@code{CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES} macro defaults to 0.
1253
1254@item maximum_keys
1255is the maximum number of keys that can be concurrently active in the system.
1256When using the @code{rtems/confdefs.h} mechanism for configuring
1257an RTEMS application, the value for this field corresponds
1258to the setting of the macro @code{CONFIGURE_MAXIMUM_POSIX_KEYS}.
1259If not defined by the application, then the
1260@code{CONFIGURE_MAXIMUM_POSIX_KEYS} macro defaults to 0.
1261
1262@item maximum_timers
1263is the maximum number of POSIX timers that can be concurrently active
1264in the system.
1265When using the @code{rtems/confdefs.h} mechanism for configuring
1266an RTEMS application, the value for this field corresponds
1267to the setting of the macro @code{CONFIGURE_MAXIMUM_POSIX_TIMERS}.
1268If not defined by the application, then the
1269@code{CONFIGURE_MAXIMUM_POSIX_TIMERS} macro defaults to 0.
1270
1271@item maximum_queued_signals
1272is the maximum number of queued signals that can be concurrently
1273pending in the system.
1274When using the @code{rtems/confdefs.h} mechanism for configuring
1275an RTEMS application, the value for this field corresponds
1276to the setting of the macro @code{CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS}.
1277If not defined by the application, then the
1278@code{CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS} macro defaults to 0.
1279
1280@item number_of_initialization_threads
1281is the number of initialization threads configured.  At least one
1282initialization threads must be configured.
1283When using the @code{rtems/confdefs.h} mechanism for configuring
1284an RTEMS application, the user must define the
1285@code{CONFIGURE_POSIX_INIT_THREAD_TABLE} to indicate that there
1286is one or more POSIX initialization thread.  If the application
1287only has one POSIX initialization thread, then the automatically
1288generated POSIX Initialization Thread Table will be sufficient.  The following
1289macros correspond to the single initialization task:
1290
1291@itemize @bullet
1292
1293@item @code{CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT} - is the entry
1294point of the thread.  If this macro is not defined by the application,
1295then this defaults to the C routine @code{POSIX_Init}.
1296
1297@item @code{CONFIGURE_POSIX_INIT_TASK_STACK_SIZE} - is the stack size
1298of the single initialization thread.  If this macro is not defined
1299by the application, then this defaults to
1300@code{(RTEMS_MINIMUM_STACK_SIZE * 2)}.
1301
1302@end itemize
1303 
1304@item User_initialization_threads_table
1305is the address of the Initialization Threads Table. This table contains the
1306information needed to create and start each of the initialization threads. 
1307The format of each entry in this table is defined in the
1308@code{posix_initialization_threads_table} structure.
1309When using the @code{rtems/confdefs.h} mechanism for configuring
1310an RTEMS application, the value for this field corresponds
1311to the address of the @code{POSIX_Initialization_threads} structure.
1312
1313@end table
1314
1315@section CPU Dependent Information Table
1316
1317@cindex CPU Dependent Information Table
1318
1319The CPU Dependent Information Table is used to
1320describe processor dependent information required by RTEMS.
1321This table is generally used to supply RTEMS with information
1322only known by the Board Support Package.  The contents of this
1323table are discussed in the CPU Dependent Information Table
1324chapter of the Applications Supplement document for a specific
1325target processor.
1326
1327The @code{rtems/confdefs.h} mechanism does not support generating this
1328table.  It is normally filled in by the Board Support Package.
1329
1330@section Initialization Task Table
1331
1332@cindex Initialization Tasks Table
1333
1334The Initialization Task Table is used to describe
1335each of the user initialization tasks to the Initialization
1336Manager.  The table contains one entry for each initialization
1337task the user wishes to create and start.  The fields of this
1338data structure directly correspond to arguments to the
1339@code{@value{DIRPREFIX}task_create} and
1340@code{@value{DIRPREFIX}task_start} directives.  The number of entries is
1341found in the @code{number_of_initialization_tasks} entry in the
1342Configuration Table. 
1343
1344The format of each entry in the
1345Initialization Task Table is defined in the following C structure:
1346
1347@findex rtems_initialization_tasks_table
1348@example
1349typedef struct @{
1350  rtems_name           name;
1351  size_t               stack_size;
1352  rtems_task_priority  initial_priority;
1353  rtems_attribute      attribute_set;
1354  rtems_task_entry     entry_point;
1355  rtems_mode           mode_set;
1356  rtems_task_argument  argument;
1357@} rtems_initialization_tasks_table;
1358@end example
1359
1360@table @b
1361@item name
1362is the name of this initialization task.
1363
1364@item stack_size
1365is the size of the stack for this initialization task.
1366
1367@item initial_priority
1368is the priority of this initialization task.
1369
1370@item attribute_set
1371is the attribute set used during creation of this initialization task.
1372
1373@item entry_point
1374is the address of the entry point of this initialization task.
1375
1376@item mode_set
1377is the initial execution mode of this initialization task.
1378
1379@item argument
1380is the initial argument for this initialization task.
1381
1382@end table
1383
1384A typical declaration for an Initialization Task Table might appear as follows:
1385
1386@example
1387rtems_initialization_tasks_table
1388Initialization_tasks[2] = @{
1389   @{ INIT_1_NAME,
1390     1024,
1391     1,
1392     DEFAULT_ATTRIBUTES,
1393     Init_1,
1394     DEFAULT_MODES,
1395     1
1396
1397   @},
1398   @{ INIT_2_NAME,
1399     1024,
1400     250,
1401     FLOATING_POINT,
1402     Init_2,
1403     NO_PREEMPT,
1404     2
1405
1406   @}
1407@};
1408@end example
1409
1410@section Driver Address Table
1411
1412@cindex Device Driver Table
1413
1414The Device Driver Table is used to inform the I/O Manager of the set of
1415entry points for each device driver configured in the system.  The table
1416contains one entry for each device driver required by the application.
1417The number of entries is defined in the number_of_device_drivers entry
1418in the Configuration Table.  This table is copied to the Device Drive
1419Table during the IO Manager's initialization giving the entries in this
1420table the lower major numbers.  The format of each entry in the Device
1421Driver Table is defined in the following C structure:
1422
1423@findex rtems_driver_address_table
1424@example
1425typedef struct @{
1426  rtems_device_driver_entry initialization_entry;
1427  rtems_device_driver_entry open_entry;
1428  rtems_device_driver_entry close_entry;
1429  rtems_device_driver_entry read_entry;
1430  rtems_device_driver_entry write_entry;
1431  rtems_device_driver_entry control_entry;
1432@} rtems_driver_address_table;
1433@end example
1434
1435@table @b
1436@item initialization_entry
1437is the address of the entry point called by
1438@code{rtems_io_initialize}
1439to initialize a device driver and its associated devices.
1440
1441@item open_entry
1442is the address of the entry point called by @code{rtems_io_open}.
1443
1444@item close_entry
1445is the address of the entry point called by @code{rtems_io_close}.
1446
1447@item read_entry
1448is the address of the entry point called by @code{rtems_io_read}.
1449
1450@item write_entry
1451is the address of the entry point called by @code{rtems_io_write}.
1452
1453@item control_entry
1454is the address of the entry point called by @code{rtems_io_control}.
1455
1456@end table
1457
1458Driver entry points configured as NULL will always
1459return a status code of @code{@value{RPREFIX}SUCCESSFUL}.  No user code will be
1460executed in this situation.
1461
1462A typical declaration for a Device Driver Table might appear as follows:
1463
1464@example
1465rtems_driver_address_table Driver_table[2] = @{
1466   @{ tty_initialize, tty_open,  tty_close,  /* major = 0 */
1467     tty_read,       tty_write, tty_control
1468   @},
1469   @{ lp_initialize, lp_open,    lp_close,   /* major = 1 */
1470     NULL,          lp_write,   lp_control
1471   @}
1472@};
1473@end example
1474
1475More information regarding the construction and
1476operation of device drivers is provided in the I/O Manager
1477chapter.
1478
1479@section User Extensions Table
1480
1481@cindex User Extensions Table
1482
1483The User Extensions Table is used to inform RTEMS of
1484the optional user-supplied static extension set.  This table
1485contains one entry for each possible extension.  The entries are
1486called at critical times in the life of the system and
1487individual tasks.  The application may create dynamic extensions
1488in addition to this single static set.  The format of each entry
1489in the User Extensions Table is defined in the following C structure:
1490
1491@example
1492typedef void           rtems_extension;
1493typedef rtems_extension (*rtems_task_create_extension)(
1494   Thread_Control * /* executing */,
1495   Thread_Control * /* created */
1496);
1497typedef rtems_extension (*rtems_task_delete_extension)(
1498   Thread_Control * /* executing */,
1499   Thread_Control * /* deleted */
1500);
1501typedef rtems_extension (*rtems_task_start_extension)(
1502   Thread_Control * /* executing */,
1503   Thread_Control * /* started */
1504);
1505typedef rtems_extension (*rtems_task_restart_extension)(
1506   Thread_Control * /* executing */,
1507   Thread_Control * /* restarted */
1508);
1509typedef rtems_extension (*rtems_task_switch_extension)(
1510   Thread_Control * /* executing */,
1511   Thread_Control * /* heir */
1512);
1513typedef rtems_extension (*rtems_task_begin_extension)(
1514   Thread_Control * /* beginning */
1515);
1516typedef rtems_extension (*rtems_task_exitted_extension)(
1517   Thread_Control * /* exiting */
1518);
1519typedef rtems_extension (*rtems_fatal_extension)(
1520   Internal_errors_Source /* the_source */,
1521   boolean                /* is_internal */,
1522   uint32_t               /* the_error */
1523);
1524
1525typedef struct @{
1526  rtems_task_create_extension      thread_create;
1527  rtems_task_start_extension       thread_start;
1528  rtems_task_restart_extension     thread_restart;
1529  rtems_task_delete_extension      thread_delete;
1530  rtems_task_switch_extension      thread_switch;
1531  rtems_task_begin_extension       thread_begin;
1532  rtems_task_exitted_extension     thread_exitted;
1533  rtems_fatal_extension            fatal;
1534@} rtems_extensions_table;
1535@end example
1536
1537@table @b
1538
1539@item thread_create
1540is the address of the
1541user-supplied subroutine for the TASK_CREATE extension.  If this
1542extension for task creation is defined, it is called from the
1543task_create directive.  A value of NULL indicates that no
1544extension is provided.
1545
1546@item thread_start
1547is the address of the user-supplied
1548subroutine for the TASK_START extension.  If this extension for
1549task initiation is defined, it is called from the task_start
1550directive.  A value of NULL indicates that no extension is
1551provided.
1552
1553@item thread_restart
1554is the address of the user-supplied
1555subroutine for the TASK_RESTART extension.  If this extension
1556for task re-initiation is defined, it is called from the
1557task_restart directive.  A value of NULL indicates that no
1558extension is provided.
1559
1560@item thread_delete
1561is the address of the user-supplied
1562subroutine for the TASK_DELETE extension.  If this RTEMS
1563extension for task deletion is defined, it is called from the
1564task_delete directive.  A value of NULL indicates that no
1565extension is provided.
1566
1567@item thread_switch
1568is the address of the user-supplied
1569subroutine for the task context switch extension.  This
1570subroutine is called from RTEMS dispatcher after the current
1571task has been swapped out but before the new task has been
1572swapped in.  A value of NULL indicates that no extension is
1573provided.  As this routine is invoked after saving the current
1574task's context and before restoring the heir task's context, it
1575is not necessary for this routine to save and restore any
1576registers.
1577
1578@item thread_begin
1579is the address of the user-supplied
1580subroutine which is invoked immediately before a task begins
1581execution.  It is invoked in the context of the beginning task.
1582A value of NULL indicates that no extension is provided.
1583
1584@item thread_exitted
1585is the address of the user-supplied
1586subroutine which is invoked when a task exits.  This procedure
1587is responsible for some action which will allow the system to
1588continue execution (i.e. delete or restart the task) or to
1589terminate with a fatal error.  If this field is set to NULL, the
1590default RTEMS TASK_EXITTED handler will be invoked.
1591
1592@item fatal
1593is the address of the user-supplied
1594subroutine for the FATAL extension.  This RTEMS extension of
1595fatal error handling is called from the
1596@code{@value{DIRPREFIX}fatal_error_occurred}
1597directive.  If the user's fatal error handler returns or if this
1598entry is NULL then the default RTEMS fatal error handler will be
1599executed.
1600
1601@end table
1602
1603A typical declaration for a User Extension Table
1604which defines the TASK_CREATE, TASK_DELETE, TASK_SWITCH, and
1605FATAL extension might appear as follows:
1606
1607@example
1608rtems_extensions_table User_extensions = @{
1609   task_create_extension,
1610   NULL,
1611   NULL,
1612   task_delete_extension,
1613   task_switch_extension,
1614   NULL,
1615   NULL,
1616   fatal_extension
1617@};
1618@end example
1619
1620More information regarding the user extensions is
1621provided in the User Extensions chapter.
1622
1623@section Multiprocessor Configuration Table
1624
1625@cindex Multiprocessor Configuration Table
1626
1627The Multiprocessor Configuration Table contains
1628information needed when using RTEMS in a multiprocessor
1629configuration.  Many of the details associated with configuring
1630a multiprocessor system are dependent on the multiprocessor
1631communications layer provided by the user.  The address of the
1632Multiprocessor Configuration Table should be placed in the
1633@code{User_multiprocessing_table} entry in the primary Configuration
1634Table.  Further details regarding many of the entries in the
1635Multiprocessor Configuration Table will be provided in the
1636Multiprocessing chapter. 
1637
1638
1639When using the @code{rtems/confdefs.h} mechanism for configuring
1640an RTEMS application, the macro @code{CONFIGURE_MP_APPLICATION} must
1641be defined to automatically generate the Multiprocessor Configuration Table.
1642If @code{CONFIGURE_MP_APPLICATION}, is not defined, then a NULL pointer
1643is configured as the address of this table.
1644
1645The format of the Multiprocessor Configuration Table is defined in
1646the following C structure:
1647
1648@example
1649typedef struct @{
1650  uint32_t          node;
1651  uint32_t          maximum_nodes;
1652  uint32_t          maximum_global_objects;
1653  uint32_t          maximum_proxies;
1654  uint32_t          extra_mpci_receive_server_stack;
1655  rtems_mpci_table *User_mpci_table;
1656@} rtems_multiprocessing_table;
1657@end example
1658
1659@table @b
1660@item node
1661is a unique processor identifier
1662and is used in routing messages between nodes in a
1663multiprocessor configuration.  Each processor must have a unique
1664node number.  RTEMS assumes that node numbers start at one and
1665increase sequentially.  This assumption can be used to advantage
1666by the user-supplied MPCI layer.  Typically, this requirement is
1667made when the node numbers are used to calculate the address of
1668inter-processor communication links.  Zero should be avoided as
1669a node number because some MPCI layers use node zero to
1670represent broadcasted packets.  Thus, it is recommended that
1671node numbers start at one and increase sequentially.
1672When using the @code{rtems/confdefs.h} mechanism for configuring
1673an RTEMS application, the value for this field corresponds
1674to the setting of the macro @code{CONFIGURE_MP_NODE_NUMBER}.
1675If not defined by the application, then the @code{CONFIGURE_MP_NODE_NUMBER}
1676macro defaults to the value of the @code{NODE_NUMBER} macro which is
1677set on the compiler command line by the RTEMS Multiprocessing Test Suites.
1678
1679
1680@item maximum_nodes
1681is the number of processor nodes in the system.
1682When using the @code{rtems/confdefs.h} mechanism for configuring
1683an RTEMS application, the value for this field corresponds
1684to the setting of the macro @code{CONFIGURE_MP_MAXIMUM_NODES}.
1685If not defined by the application, then the @code{CONFIGURE_MP_MAXIMUM_NODES}
1686macro defaults to the value 2.
1687
1688@item maximum_global_objects
1689is the maximum number of global objects which can exist at any
1690given moment in the entire system.  If this parameter is not the
1691same on all nodes in the system, then a fatal error is generated
1692to inform the user that the system is inconsistent.
1693When using the @code{rtems/confdefs.h} mechanism for configuring
1694an RTEMS application, the value for this field corresponds
1695to the setting of the macro @code{CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS}.
1696If not defined by the application, then the
1697@code{CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS} macro defaults to the value 32.
1698
1699
1700@item maximum_proxies
1701is the maximum number of proxies which can exist at any given moment
1702on this particular node.  A proxy is a substitute task control block
1703which represent a task residing on a remote node when that task blocks
1704on a remote object.  Proxies are used in situations in which delayed
1705interaction is required with a remote node.
1706When using the @code{rtems/confdefs.h} mechanism for configuring
1707an RTEMS application, the value for this field corresponds
1708to the setting of the macro @code{CONFIGURE_MP_MAXIMUM_PROXIES}.
1709If not defined by the application, then the @code{CONFIGURE_MP_MAXIMUM_PROXIES}
1710macro defaults to the value 32.
1711
1712@item extra_mpci_receive_server_stack
1713is the extra stack space allocated for the RTEMS MPCI receive server task
1714in bytes.  The MPCI receive server may invoke nearly all directives and
1715may require extra stack space on some targets.
1716
1717@item User_mpci_table
1718is the address of the Multiprocessor Communications Interface
1719Table.  This table contains the entry points of user-provided functions
1720which constitute the multiprocessor communications layer.  This table
1721must be provided in multiprocessor configurations with all
1722entries configured.  The format of this table and details
1723regarding its entries can be found in the next section.
1724When using the @code{rtems/confdefs.h} mechanism for configuring
1725an RTEMS application, the value for this field corresponds
1726to the setting of the macro @code{CONFIGURE_MP_MPCI_TABLE_POINTER}.
1727If not defined by the application, then the
1728@code{CONFIGURE_MP_MPCI_TABLE_POINTER} macro defaults to the
1729address of the table named @code{MPCI_table}.
1730
1731
1732@end table
1733
1734@section Multiprocessor Communications Interface Table
1735
1736@cindex  Multiprocessor Communications Interface Table
1737
1738This table defines the set of callouts that must be provided by
1739an Multiprocessor Communications Interface implementation. 
1740
1741When using the @code{rtems/confdefs.h} mechanism for configuring
1742an RTEMS application, the name of this table is assumed
1743to be @code{MPCI_table} unless the application sets
1744the @code{CONFIGURE_MP_MPCI_TABLE_POINTER} when configuring a
1745multiprocessing system.
1746
1747The format of this table is defined in
1748the following C structure:
1749
1750@example
1751typedef struct @{
1752  uint32_t                        default_timeout; /* in ticks */
1753  uint32_t                        maximum_packet_size;
1754  rtems_mpci_initialization_entry initialization;
1755  rtems_mpci_get_packet_entry     get_packet;
1756  rtems_mpci_return_packet_entry  return_packet;
1757  rtems_mpci_send_entry           send_packet;
1758  rtems_mpci_receive_entry        receive_packet;
1759@} rtems_mpci_table;
1760@end example
1761
1762@table @b
1763@item default_timeout
1764is the default maximum length of time a task should block waiting for
1765a response to a directive which results in communication with a remote node.
1766The maximum length of time is a function the user supplied
1767multiprocessor communications layer and the media used.  This
1768timeout only applies to directives which would not block if the
1769operation were performed locally.
1770
1771@item maximum_packet_size
1772is the size in bytes of the longest packet which the MPCI layer is capable
1773of sending.  This value should represent the total number of bytes available
1774for a RTEMS interprocessor messages.
1775
1776@item initialization
1777is the address of the entry point for the initialization procedure of the
1778user supplied multiprocessor communications layer.
1779
1780@item get_packet
1781is the address of the entry point for the procedure called by RTEMS to
1782obtain a packet from the user supplied multiprocessor communications layer.
1783
1784@item return_packet
1785is the address of the entry point for the procedure called by RTEMS to
1786return a packet to the user supplied multiprocessor communications layer.
1787
1788@item send
1789is the address of the entry point for the procedure called by RTEMS to
1790send an envelope to another node.  This procedure is part of the user
1791supplied multiprocessor communications layer.
1792
1793@item receive
1794is the address of the entry point for the
1795procedure called by RTEMS to retrieve an envelope containing a
1796message from another node.  This procedure is part of the user
1797supplied multiprocessor communications layer.
1798
1799@end table
1800
1801More information regarding the required functionality of these
1802entry points is provided in the Multiprocessor chapter.
1803
1804@section Determining Memory Requirements
1805
1806Since memory is a critical resource in many real-time
1807embedded systems, the RTEMS Classic API was specifically designed to allow
1808unused managers to be forcibly excluded from the run-time environment.
1809This allows the application designer the flexibility to tailor
1810RTEMS to most efficiently meet system requirements while still
1811satisfying even the most stringent memory constraints.  As
1812result, the size of the RTEMS executive is application
1813dependent.
1814
1815It is not necessary for RTEMS Application Developers to calculate
1816the amount of memory required for the RTEMS Workspace.  This
1817is done automatically by @code{<rtems/confdefs.h>}. 
1818See @ref{Configuring a System Sizing the RTEMS RAM Workspace} for
1819more details on how
1820this works.  In the event, you are interested in the memory required
1821for an instance of a particular RTEMS object, please run the test
1822@code{spsize} on your target board.
1823
1824RTEMS is built to be a library and any routines that you do not
1825directly or indirectly require in your application will @b{NOT}
1826be included in your executable image.  However, some managers
1827may be explicitly excluded and no attempt to create these instances
1828of these objects will succeed even if they are configured.
1829The following Classic API managers may be optionally excluded:
1830
1831@itemize @bullet
1832@item signal
1833@item region
1834@item dual ported memory
1835@item event
1836@item multiprocessing
1837@item partition
1838@item timer
1839@item semaphore
1840@item message
1841@item rate monotonic
1842@end itemize
1843
1844RTEMS is designed to be built and installed as a library
1845that is linked into the application.  As such, much of
1846RTEMS is implemented in such a way that there is a single
1847entry point per source file.  This avoids having the
1848linker being forced to pull large object files in their
1849entirety into an application when the application references
1850a single symbol.  In the event you discover an RTEMS method
1851that is included in your executable but never entered, please
1852let us know.  It might be an opportunity to break a dependency
1853and shrink many RTEMS applications.
1854
1855RTEMS based applications must somehow provide memory
1856for RTEMS' code and data space.  Although RTEMS' data space must
1857be in RAM, its code space can be located in either ROM or RAM.
1858In addition, the user must allocate RAM for the RTEMS RAM
1859Workspace.  The size of this area is application dependent and
1860can be calculated using the formula provided in the Memory
1861Requirements chapter of the Applications Supplement document
1862for a specific target processor.
1863
1864All private RTEMS data variables and routine names used by
1865RTEMS begin with the underscore ( _ ) character followed by an
1866upper-case letter.  If RTEMS is linked with an application, then
1867the application code should NOT contain any symbols which begin
1868with the underscore character and followed by an upper-case
1869letter to avoid any naming conflicts.  All RTEMS directive names
1870should be treated as reserved words.
1871
1872@section Sizing the RTEMS RAM Workspace
1873
1874The RTEMS RAM Workspace is a user-specified block of
1875memory reserved for use by RTEMS.  The application should NOT
1876modify this memory.  This area consists primarily of the RTEMS
1877data structures whose exact size depends upon the values
1878specified in the Configuration Table.  In addition, task stacks
1879and floating point context areas are dynamically allocated from
1880the RTEMS RAM Workspace.
1881
1882The @code{rtems/confdefs.h} mechanism calcalutes the size
1883of the RTEMS RAM Workspace automatically.  It assumes that
1884all tasks are floating point and that all will be allocated
1885the miminum stack space.  This calculation also automatically
1886includes the memory that will be allocated for internal use
1887by RTEMS.  The following macros may be set
1888by the application to make the calculation
1889of memory required more accurate:
1890
1891@itemize @bullet
1892
1893@item @code{CONFIGURE_MEMORY_OVERHEAD}
1894@item @code{CONFIGURE_EXTRA_TASK_STACKS}
1895
1896@end itemize
1897
1898The starting address of the RTEMS RAM Workspace must
1899be aligned on a four-byte boundary.  Failure to properly align
1900the workspace area will result in the
1901@code{@value{DIRPREFIX}fatal_error_occurred}
1902directive being invoked with the
1903@code{@value{RPREFIX}INVALID_ADDRESS} error code.
1904
1905The file @code{<rtems/confdefs.h>} will calculate the
1906value that is specified as the @code{work_space_size}
1907parameter of the Configuration Table. There are many
1908parameters the application developer can specify to
1909help @code{<rtems/confdefs.h>} in its calculations.  Correctly
1910specifying the application requirements via parameters
1911such as @code{CONFIGURE_EXTRA_TASK_STACKS} and
1912@code{CONFIGURE_MAXIMUM_TASKS} is critical.
1913
1914The allocation of objects can operate in two modes. The default mode
1915has an object number ceiling. No more than the specified number of
1916objects can be allocated from the RTEMS RAM Workspace. The number of objects
1917specified in the particular API Configuration table fields are
1918allocated at initialisation. The second mode allows the number of
1919objects to grow to use the available free memory in the RTEMS RAM Workspace.
1920
1921The auto-extending mode can be enabled individually for each object
1922type by using the macro @code{rtems_resource_unlimited}. This takes a value
1923as a parameter, and is used to set the object maximum number field in
1924an API Configuration table. The value is an allocation unit size. When
1925RTEMS is required to grow the object table it is grown by this
1926size. The kernel will return the object memory back to the RTEMS RAM Workspace
1927when an object is destroyed. The kernel will only return an allocated
1928block of objects to the RTEMS RAM Workspace if at least half the allocation
1929size of free objects remain allocated. RTEMS always keeps one
1930allocation block of objects allocated. Here is an example of using
1931@code{rtems_resource_unlimited}:
1932
1933@example
1934#define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(5)
1935@end example
1936
1937The user is cautioned that future versions of RTEMS may not have the
1938same memory requirements per object. Although the value calculated is
1939suficient for a particular target processor and release of RTEMS,
1940memory usage is subject to change across versions and target
1941processors.  To avoid problems, the user should accurately
1942specify each configuration parameter and allow
1943@code{<rtems/confdefs.h>} to calculate the memory requirements.
1944The memory requirements are likely to change each
1945time one of the following events occurs:
1946
1947@itemize @bullet
1948@item a configuration parameter is modified,
1949@item task or interrupt stack requirements change,
1950@item task floating point attribute is altered,
1951@item RTEMS is upgraded, or
1952@item the target processor is changed.
1953@end itemize
1954
1955Failure to provide enough space in the RTEMS RAM
1956Workspace will result in the
1957@code{@value{DIRPREFIX}fatal_error_occurred} directive
1958being invoked with the appropriate error code.
Note: See TracBrowser for help on using the repository browser.