2001-03-28 Joel Sherrill <joel@OARcorp.com>

* PR132 requested some tinkering ot lower memory.
	* include/confdefs.h: Lowered footprint of device driver table
	and statically configure user extensions.  Now if no static
	extensions are configured, then the table is not instantiated.
This commit is contained in:
Joel Sherrill
2002-03-28 19:32:16 +00:00
parent 0a32a213de
commit 96e6a86cd3
4 changed files with 58 additions and 12 deletions

View File

@@ -1,3 +1,10 @@
2001-03-28 Joel Sherrill <joel@OARcorp.com>
* PR132 requested some tinkering ot lower memory.
* include/confdefs.h: Lowered footprint of device driver table
and statically configure user extensions. Now if no static
extensions are configured, then the table is not instantiated.
2002-03-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2002-03-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* Makefile.am: Remove AUTOMAKE_OPTIONS. * Makefile.am: Remove AUTOMAKE_OPTIONS.

View File

@@ -293,7 +293,14 @@ rtems_driver_address_table Device_drivers[] = {
#ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER #ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
DEVNULL_DRIVER_TABLE_ENTRY, DEVNULL_DRIVER_TABLE_ENTRY,
#endif #endif
#ifdef CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER
NULL_DRIVER_TABLE_ENTRY NULL_DRIVER_TABLE_ENTRY
#elif !defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) && \
!defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \
!defined(CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER) && \
!defined(CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER)
NULL_DRIVER_TABLE_ENTRY
#endif
}; };
#endif #endif
@@ -304,8 +311,11 @@ rtems_driver_address_table Device_drivers[] = {
* overridden by the user. * overridden by the user.
*/ */
#define CONFIGURE_NUMBER_OF_DRIVERS \
((sizeof(Device_drivers) / sizeof(rtems_driver_address_table)))
#ifndef CONFIGURE_MAXIMUM_DRIVERS #ifndef CONFIGURE_MAXIMUM_DRIVERS
#define CONFIGURE_MAXIMUM_DRIVERS 10 #define CONFIGURE_MAXIMUM_DRIVERS CONFIGURE_NUMBER_OF_DRIVERS
#endif #endif
/* /*
@@ -430,6 +440,8 @@ rtems_multiprocessing_table Multiprocessing_configuration = {
#include <rtems/stackchk.h> #include <rtems/stackchk.h>
#endif #endif
#if defined(CONFIGURE_INITIAL_EXTENSIONS) || \
defined(STACK_CHECKER_ON)
rtems_extensions_table Configuration_Initial_Extensions[] = { rtems_extensions_table Configuration_Initial_Extensions[] = {
#ifdef CONFIGURE_INITIAL_EXTENSIONS #ifdef CONFIGURE_INITIAL_EXTENSIONS
CONFIGURE_INITIAL_EXTENSIONS, CONFIGURE_INITIAL_EXTENSIONS,
@@ -437,12 +449,17 @@ rtems_extensions_table Configuration_Initial_Extensions[] = {
#ifdef STACK_CHECKER_ON #ifdef STACK_CHECKER_ON
STACK_CHECKER_EXTENSION, STACK_CHECKER_EXTENSION,
#endif #endif
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL }
}; };
#define CONFIGURE_INITIAL_EXTENSION_TABLE Configuration_Initial_Extensions
#define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \ #define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \
((sizeof(Configuration_Initial_Extensions) / \ ((sizeof(Configuration_Initial_Extensions) / \
sizeof(rtems_extensions_table)) - 1) sizeof(rtems_extensions_table)))
#else
#define CONFIGURE_INITIAL_EXTENSION_TABLE NULL
#define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS 0
#endif
#endif #endif
@@ -1003,11 +1020,10 @@ rtems_configuration_table Configuration = {
CONFIGURE_TICKS_PER_TIMESLICE, CONFIGURE_TICKS_PER_TIMESLICE,
CONFIGURE_MAXIMUM_DEVICES, CONFIGURE_MAXIMUM_DEVICES,
CONFIGURE_MAXIMUM_DRIVERS, CONFIGURE_MAXIMUM_DRIVERS,
sizeof (Device_drivers)/ CONFIGURE_NUMBER_OF_DRIVERS, /* number of device drivers */
sizeof(rtems_driver_address_table), /* number of device drivers */
Device_drivers, /* pointer to driver table */ Device_drivers, /* pointer to driver table */
CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS, /* number of initial extensions */ CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS, /* number of initial extensions */
Configuration_Initial_Extensions, /* pointer to initial extensions */ CONFIGURE_INITIAL_EXTENSION_TABLE, /* pointer to initial extensions */
CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */ CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */
&Configuration_RTEMS_API, /* pointer to RTEMS API config */ &Configuration_RTEMS_API, /* pointer to RTEMS API config */
#ifdef RTEMS_POSIX_API #ifdef RTEMS_POSIX_API

View File

@@ -1,3 +1,10 @@
2001-03-28 Joel Sherrill <joel@OARcorp.com>
* PR132 requested some tinkering ot lower memory.
* include/confdefs.h: Lowered footprint of device driver table
and statically configure user extensions. Now if no static
extensions are configured, then the table is not instantiated.
2002-03-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2002-03-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* Makefile.am: Remove AUTOMAKE_OPTIONS. * Makefile.am: Remove AUTOMAKE_OPTIONS.

View File

@@ -293,7 +293,14 @@ rtems_driver_address_table Device_drivers[] = {
#ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER #ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
DEVNULL_DRIVER_TABLE_ENTRY, DEVNULL_DRIVER_TABLE_ENTRY,
#endif #endif
#ifdef CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER
NULL_DRIVER_TABLE_ENTRY NULL_DRIVER_TABLE_ENTRY
#elif !defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) && \
!defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \
!defined(CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER) && \
!defined(CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER)
NULL_DRIVER_TABLE_ENTRY
#endif
}; };
#endif #endif
@@ -304,8 +311,11 @@ rtems_driver_address_table Device_drivers[] = {
* overridden by the user. * overridden by the user.
*/ */
#define CONFIGURE_NUMBER_OF_DRIVERS \
((sizeof(Device_drivers) / sizeof(rtems_driver_address_table)))
#ifndef CONFIGURE_MAXIMUM_DRIVERS #ifndef CONFIGURE_MAXIMUM_DRIVERS
#define CONFIGURE_MAXIMUM_DRIVERS 10 #define CONFIGURE_MAXIMUM_DRIVERS CONFIGURE_NUMBER_OF_DRIVERS
#endif #endif
/* /*
@@ -430,6 +440,8 @@ rtems_multiprocessing_table Multiprocessing_configuration = {
#include <rtems/stackchk.h> #include <rtems/stackchk.h>
#endif #endif
#if defined(CONFIGURE_INITIAL_EXTENSIONS) || \
defined(STACK_CHECKER_ON)
rtems_extensions_table Configuration_Initial_Extensions[] = { rtems_extensions_table Configuration_Initial_Extensions[] = {
#ifdef CONFIGURE_INITIAL_EXTENSIONS #ifdef CONFIGURE_INITIAL_EXTENSIONS
CONFIGURE_INITIAL_EXTENSIONS, CONFIGURE_INITIAL_EXTENSIONS,
@@ -437,12 +449,17 @@ rtems_extensions_table Configuration_Initial_Extensions[] = {
#ifdef STACK_CHECKER_ON #ifdef STACK_CHECKER_ON
STACK_CHECKER_EXTENSION, STACK_CHECKER_EXTENSION,
#endif #endif
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL }
}; };
#define CONFIGURE_INITIAL_EXTENSION_TABLE Configuration_Initial_Extensions
#define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \ #define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \
((sizeof(Configuration_Initial_Extensions) / \ ((sizeof(Configuration_Initial_Extensions) / \
sizeof(rtems_extensions_table)) - 1) sizeof(rtems_extensions_table)))
#else
#define CONFIGURE_INITIAL_EXTENSION_TABLE NULL
#define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS 0
#endif
#endif #endif
@@ -1003,11 +1020,10 @@ rtems_configuration_table Configuration = {
CONFIGURE_TICKS_PER_TIMESLICE, CONFIGURE_TICKS_PER_TIMESLICE,
CONFIGURE_MAXIMUM_DEVICES, CONFIGURE_MAXIMUM_DEVICES,
CONFIGURE_MAXIMUM_DRIVERS, CONFIGURE_MAXIMUM_DRIVERS,
sizeof (Device_drivers)/ CONFIGURE_NUMBER_OF_DRIVERS, /* number of device drivers */
sizeof(rtems_driver_address_table), /* number of device drivers */
Device_drivers, /* pointer to driver table */ Device_drivers, /* pointer to driver table */
CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS, /* number of initial extensions */ CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS, /* number of initial extensions */
Configuration_Initial_Extensions, /* pointer to initial extensions */ CONFIGURE_INITIAL_EXTENSION_TABLE, /* pointer to initial extensions */
CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */ CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */
&Configuration_RTEMS_API, /* pointer to RTEMS API config */ &Configuration_RTEMS_API, /* pointer to RTEMS API config */
#ifdef RTEMS_POSIX_API #ifdef RTEMS_POSIX_API