source: rtems/cpukit/sapi/include/rtems/README @ 60b791ad

4.104.114.84.95
Last change on this file since 60b791ad was 254b4450, checked in by Joel Sherrill <joel.sherrill@…>, on 04/01/97 at 23:07:52

This set of changes is the build of what was required to convert to
GNU autoconf. This is the first large step in allowing an RTEMS
user to perform a one-tree build (per crossgcc FAQ) including RTEMS
in the build process. With this change RTEMS is configured in
built in the same style as the GNU tools, yet retains the basic
structure of its traditional Makefiles (ala Tony Bennett).
Jiri Gaisler (jgais@…) deserves (and received)
a big thank you for doing this.

There are still issues to be resolved but as of this commit, all target
which can be built on a linux host have been using a modified version
of the source Jiri submitted. This source was merged and most targets
built in the tree before this commit.

There are some issues which remain to be resolved but they are primarily
related to host OS dependencies, script issues, the use of gawk
for hack_specs, and the dependence on gcc snapshots. These will
be resolved.

  • Property mode set to 100644
File size: 4.9 KB
Line 
1#
2#  $Id$
3#
4
5Configuring a System Using the Template in confdefs.h
6=====================================================
7
8The file confdefs.h is a Configuration Template file which can be
9used to greatly simplify the creation and maintenance of RTEMS
10Configuration Tables.  The basic concepts are:
11
12   + confdefs.h provides defaults for all configuration parameters
13
14   + applications specify only those values they wish to override
15
16   + confdefs.h can be the only file which knows the precise layout
17     of the RTEMS Configuration Tables.
18
19The Configuration Template setup is used by all RTEMS tests to
20simplify the maintenance of the tests.
21
22Here is the section from the system.h file from test tm21 from
23the Timing Test Suite:
24
25   /* configuration information */
26 
27   #define CONFIGURE_TMTEST
28 
29   #define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
30   #define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
31 
32   #define CONFIGURE_MAXIMUM_TASKS              102
33   #define CONFIGURE_MAXIMUM_TIMERS             100
34   #define CONFIGURE_MAXIMUM_SEMAPHORES         100
35   #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES     100
36   #define CONFIGURE_MAXIMUM_PARTITIONS         100
37   #define CONFIGURE_MAXIMUM_REGIONS            100
38   #define CONFIGURE_MAXIMUM_PORTS              100
39   #define CONFIGURE_MAXIMUM_PERIODS            100
40 
41   #define CONFIGURE_TICKS_PER_TIMESLICE        0
42 
43   #include <confdefs.h>
44 
45
46The above example overrides a number of the configuration parameters.
47It informs the template that it is a member of the Timing Suite,
48requires a console and timer driver, and that it needs 102 tasks,
49100 timers, 100 semaphores, 100 message queues, 100 partitions,
50100 regions, 100 ports, and 100 periods.   By default, the test
51would have gotten no drivers, 10 tasks, and no other RTEMS objects.
52
53The following shows the configuration tables generated by the
54template by default.
55
56
57#include <bsp.h>
58
59#define NULL_DRIVER_TABLE_ENTRY \
60 { NULL, NULL, NULL, NULL, NULL, NULL }
61 
62rtems_driver_address_table Device_drivers[] = {
63#ifdef CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
64  CONSOLE_DRIVER_TABLE_ENTRY,
65#endif
66#ifdef CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
67  CLOCK_DRIVER_TABLE_ENTRY,
68#endif
69#ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER
70  STUB_DRIVER_TABLE_ENTRY,
71#endif
72  NULL_DRIVER_TABLE_ENTRY,
73};
74
75rtems_initialization_tasks_table Initialization_tasks[] = {
76  { rtems_build_name( 'U', 'I', '1', ' ' ), /* init task name */
77    RTEMS_MINIMUM_STACK_SIZE,               /* init task stack size */
78    1,                                      /* init task priority */
79    RTEMS_DEFAULT_ATTRIBUTES,               /* init task attributes */
80    Init,                                   /* init task entry point */
81    RTEMS_NO_PREEMPT,                       /* init task initial mode */
82    0                                       /* init task argument list */
83  }
84};
85
86#ifdef CONFIGURE_MPTEST
87/*
88 *  NODE_NUMBER is assumed to be set on the compile line.
89 */
90
91rtems_multiprocessing_table Multiprocessing_configuration = {
92  NODE_NUMBER,                           /* local node number */
93  2,                                     /* maximum # nodes in system */
94  32,                                    /* maximum # global objects */
95  32,                                    /* maximum # proxies */
96  &MPCI_table                            /* pointer to MPCI config table */
97};
98#endif
99
100/*
101 *  CONFIGURE_EXECUTIVE_RAM_SIZE is a rough guess based on the number of
102 *  tasks in the system plus enough extra to get a whole 64K extra.
103 *
104 *  The NULL address for the workspace area is assumed to be assigned
105 *  at startup time by the BSP.
106 */
107   
108rtems_configuration_table Configuration = {
109  NULL,                      /* executive RAM work area */
110  CONFIGURE_EXECUTIVE_RAM_SIZE, /* executive RAM size */
111  10,                        /* maximum # tasks */
112  0,                         /* maximum # timers */
113  0,                         /* maximum # semaphores */
114  0,                         /* maximum # message queues */
115  0,                         /* maximum # messages */
116  0,                         /* maximum # partitions */
117  0,                         /* maximum # regions */
118  0,                         /* maximum # dp memory areas */
119  0,                         /* maximum # periods */
120  0,                         /* maximum # user extensions */
121  RTEMS_MILLISECONDS_TO_MICROSECONDS(10), /* # us in a tick */
122  50,                        /* # ticks in a timeslice */
123  sizeof (Initialization_tasks) / sizeof(rtems_initialization_tasks_table),
124                             /* number of init tasks */
125  Initialization_tasks,      /* init task(s) table */
126  sizeof (Device_drivers) / sizeof(rtems_driver_address_table),
127                             /* number of device drivers */
128  Device_drivers,            /* pointer to driver address table */
129  NULL,                      /* pointer to initial extensions */
130#ifdef CONFIGURE_MPTEST
131  &Multiprocessing_configuration
132#else
133  NULL                       /* ptr to MP config table */
134#endif
135};
Note: See TracBrowser for help on using the repository browser.