summaryrefslogtreecommitdiffstats
path: root/c/src/exec/sapi/include/rtems
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1997-04-01 23:07:52 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1997-04-01 23:07:52 +0000
commit254b4450718a0873b444d35aeb6d74ba589734ea (patch)
tree0615a270d7b384c7394eb57290f4b6b92ed20706 /c/src/exec/sapi/include/rtems
parentFixed symbols. (diff)
downloadrtems-254b4450718a0873b444d35aeb6d74ba589734ea.tar.bz2
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@wd.estec.esa.nl) 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.
Diffstat (limited to 'c/src/exec/sapi/include/rtems')
-rw-r--r--c/src/exec/sapi/include/rtems/Makefile.in34
-rw-r--r--c/src/exec/sapi/include/rtems/README135
2 files changed, 169 insertions, 0 deletions
diff --git a/c/src/exec/sapi/include/rtems/Makefile.in b/c/src/exec/sapi/include/rtems/Makefile.in
new file mode 100644
index 0000000000..24e8766199
--- /dev/null
+++ b/c/src/exec/sapi/include/rtems/Makefile.in
@@ -0,0 +1,34 @@
+#
+# $Id$
+#
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH=@srcdir@
+
+H_PIECES= config directives extension fatal init io mptables sptables
+H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
+
+# H_FILES that get installed externally
+EXTERNAL_H_PIECES = confdefs
+EXTERNAL_H_FILES=$(EXTERNAL_H_PIECES:%=$(srcdir)/%.h)
+
+SRCS=$(H_FILES) $(EXTERNAL_H_FILES)
+
+include $(RTEMS_CUSTOM)
+include $(PROJECT_ROOT)/make/leaf.cfg
+
+#
+# Add your list of files to delete here. The config files
+# already know how to delete some stuff, so you may want
+# to just run 'make clean' first to see what gets missed.
+# 'make clobber' already includes 'make clean'
+#
+
+CLEAN_ADDITIONS +=
+CLOBBER_ADDITIONS +=
+
+all: $(SRCS)
+ $(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/
+ $(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include
diff --git a/c/src/exec/sapi/include/rtems/README b/c/src/exec/sapi/include/rtems/README
new file mode 100644
index 0000000000..5fcc0d14c7
--- /dev/null
+++ b/c/src/exec/sapi/include/rtems/README
@@ -0,0 +1,135 @@
+#
+# $Id$
+#
+
+Configuring a System Using the Template in confdefs.h
+=====================================================
+
+The file confdefs.h is a Configuration Template file which can be
+used to greatly simplify the creation and maintenance of RTEMS
+Configuration Tables. The basic concepts are:
+
+ + confdefs.h provides defaults for all configuration parameters
+
+ + applications specify only those values they wish to override
+
+ + confdefs.h can be the only file which knows the precise layout
+ of the RTEMS Configuration Tables.
+
+The Configuration Template setup is used by all RTEMS tests to
+simplify the maintenance of the tests.
+
+Here is the section from the system.h file from test tm21 from
+the Timing Test Suite:
+
+ /* configuration information */
+
+ #define CONFIGURE_TMTEST
+
+ #define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
+ #define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
+
+ #define CONFIGURE_MAXIMUM_TASKS 102
+ #define CONFIGURE_MAXIMUM_TIMERS 100
+ #define CONFIGURE_MAXIMUM_SEMAPHORES 100
+ #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 100
+ #define CONFIGURE_MAXIMUM_PARTITIONS 100
+ #define CONFIGURE_MAXIMUM_REGIONS 100
+ #define CONFIGURE_MAXIMUM_PORTS 100
+ #define CONFIGURE_MAXIMUM_PERIODS 100
+
+ #define CONFIGURE_TICKS_PER_TIMESLICE 0
+
+ #include <confdefs.h>
+
+
+The above example overrides a number of the configuration parameters.
+It informs the template that it is a member of the Timing Suite,
+requires a console and timer driver, and that it needs 102 tasks,
+100 timers, 100 semaphores, 100 message queues, 100 partitions,
+100 regions, 100 ports, and 100 periods. By default, the test
+would have gotten no drivers, 10 tasks, and no other RTEMS objects.
+
+The following shows the configuration tables generated by the
+template by default.
+
+
+#include <bsp.h>
+
+#define NULL_DRIVER_TABLE_ENTRY \
+ { NULL, NULL, NULL, NULL, NULL, NULL }
+
+rtems_driver_address_table Device_drivers[] = {
+#ifdef CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
+ CONSOLE_DRIVER_TABLE_ENTRY,
+#endif
+#ifdef CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
+ CLOCK_DRIVER_TABLE_ENTRY,
+#endif
+#ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER
+ STUB_DRIVER_TABLE_ENTRY,
+#endif
+ NULL_DRIVER_TABLE_ENTRY,
+};
+
+rtems_initialization_tasks_table Initialization_tasks[] = {
+ { rtems_build_name( 'U', 'I', '1', ' ' ), /* init task name */
+ RTEMS_MINIMUM_STACK_SIZE, /* init task stack size */
+ 1, /* init task priority */
+ RTEMS_DEFAULT_ATTRIBUTES, /* init task attributes */
+ Init, /* init task entry point */
+ RTEMS_NO_PREEMPT, /* init task initial mode */
+ 0 /* init task argument list */
+ }
+};
+
+#ifdef CONFIGURE_MPTEST
+/*
+ * NODE_NUMBER is assumed to be set on the compile line.
+ */
+
+rtems_multiprocessing_table Multiprocessing_configuration = {
+ NODE_NUMBER, /* local node number */
+ 2, /* maximum # nodes in system */
+ 32, /* maximum # global objects */
+ 32, /* maximum # proxies */
+ &MPCI_table /* pointer to MPCI config table */
+};
+#endif
+
+/*
+ * CONFIGURE_EXECUTIVE_RAM_SIZE is a rough guess based on the number of
+ * tasks in the system plus enough extra to get a whole 64K extra.
+ *
+ * The NULL address for the workspace area is assumed to be assigned
+ * at startup time by the BSP.
+ */
+
+rtems_configuration_table Configuration = {
+ NULL, /* executive RAM work area */
+ CONFIGURE_EXECUTIVE_RAM_SIZE, /* executive RAM size */
+ 10, /* maximum # tasks */
+ 0, /* maximum # timers */
+ 0, /* maximum # semaphores */
+ 0, /* maximum # message queues */
+ 0, /* maximum # messages */
+ 0, /* maximum # partitions */
+ 0, /* maximum # regions */
+ 0, /* maximum # dp memory areas */
+ 0, /* maximum # periods */
+ 0, /* maximum # user extensions */
+ RTEMS_MILLISECONDS_TO_MICROSECONDS(10), /* # us in a tick */
+ 50, /* # ticks in a timeslice */
+ sizeof (Initialization_tasks) / sizeof(rtems_initialization_tasks_table),
+ /* number of init tasks */
+ Initialization_tasks, /* init task(s) table */
+ sizeof (Device_drivers) / sizeof(rtems_driver_address_table),
+ /* number of device drivers */
+ Device_drivers, /* pointer to driver address table */
+ NULL, /* pointer to initial extensions */
+#ifdef CONFIGURE_MPTEST
+ &Multiprocessing_configuration
+#else
+ NULL /* ptr to MP config table */
+#endif
+};