26.1. IntroductionΒΆ
The application configuration information group provides an API to get the configuration of an application.
RTEMS must be configured for an application. This configuration encompasses a variety of information including the length of each clock tick, the maximum number of each information RTEMS object that can be created, the application initialization tasks, the task scheduling algorithm to be used, and the device drivers in the application.
Although this information is contained in data structures that are used by RTEMS at system initialization time, the data structures themselves must not be generated by hand. RTEMS provides a set of macros system which provides a simple standard mechanism to automate the generation of these structures.
The RTEMS header file <rtems/confdefs.h>
is at the core of the automatic
generation of system configuration. It is based on the idea of setting macros
which define configuration parameters of interest to the application and
defaulting or calculating all others. This variety of macros can automatically
produce all of the configuration data required for an RTEMS application. The
term confdefs
is shorthand for a Configuration Defaults.
As a general rule, application developers only specify values for the configuration parameters of interest to them. They define what resources or features they require. In most cases, when a parameter is not specified, it defaults to zero (0) instances, a standards compliant value, or disabled as appropriate. For example, by default there will be 256 task priority levels but this can be lowered by the application. This number of priority levels is required to be compliant with the RTEID/ORKID standards upon which the Classic API is based. There are similar cases where the default is selected to be compliant with the POSIX standard.
For each configuration parameter in the configuration tables, the macro
corresponding to that field is discussed. The RTEMS Maintainers expect that all
systems can be easily configured using the <rtems/confdefs.h>
mechanism and
that using this mechanism will avoid internal RTEMS configuration changes
impacting applications.
Some application configuration settings and other system parameters can be queried by the application. The directives provided by the Application Configuration Information are:
rtems_get_build_label() - Gets the RTEMS build label.
rtems_get_copyright_notice() - Gets the RTEMS copyright notice.
rtems_get_target_hash() - Gets the RTEMS target hash.
rtems_get_version_string() - Gets the RTEMS version string.
rtems_configuration_get_do_zero_of_workspace() - Indicates if the RTEMS Workspace is configured to be zeroed during system initialization for this application.
rtems_configuration_get_idle_task_stack_size() - Gets the IDLE task stack size in bytes of this application.
rtems_configuration_get_idle_task() - Gets the IDLE task body of this application.
rtems_configuration_get_interrupt_stack_size() - Gets the interrupt stack size in bytes of this application.
rtems_configuration_get_maximum_barriers() - Gets the resource number of Barrier Manager objects configured for this application.
rtems_configuration_get_maximum_extensions() - Gets the resource number of User Extensions Manager objects configured for this application.
rtems_configuration_get_maximum_message_queues() - Gets the resource number of Message Manager objects configured for this application.
rtems_configuration_get_maximum_partitions() - Gets the resource number of Partition Manager objects configured for this application.
rtems_configuration_get_maximum_periods() - Gets the resource number of Rate Monotonic Manager objects configured for this application.
rtems_configuration_get_maximum_ports() - Gets the resource number of Dual-Ported Memory Manager objects configured for this application.
rtems_configuration_get_maximum_processors() - Gets the maximum number of processors configured for this application.
rtems_configuration_get_maximum_regions() - Gets the resource number of Region Manager objects configured for this application.
rtems_configuration_get_maximum_semaphores() - Gets the resource number of Semaphore Manager objects configured for this application.
rtems_configuration_get_maximum_tasks() - Gets the resource number of Task Manager objects configured for this application.
rtems_configuration_get_maximum_timers() - Gets the resource number of Timer Manager objects configured for this application.
rtems_configuration_get_microseconds_per_tick() - Gets the number of microseconds per clock tick configured for this application.
rtems_configuration_get_milliseconds_per_tick() - Gets the number of milliseconds per clock tick configured for this application.
rtems_configuration_get_nanoseconds_per_tick() - Gets the number of microseconds per clock tick configured for this application.
rtems_configuration_get_number_of_initial_extensions() - Gets the number of initial extensions configured for this application.
rtems_configuration_get_stack_allocate_for_idle_hook() - Gets the task stack allocator allocate hook used to allocate the stack of each IDLE task configured for this application.
rtems_configuration_get_stack_allocate_hook() - Gets the task stack allocator allocate hook configured for this application.
rtems_configuration_get_stack_allocate_init_hook() - Gets the task stack allocator initialization hook configured for this application.
rtems_configuration_get_stack_allocator_avoids_work_space() - Indicates if the task stack allocator is configured to avoid the RTEMS Workspace for this application.
rtems_configuration_get_stack_free_hook() - Gets the task stack allocator free hook configured for this application.
rtems_configuration_get_stack_space_size() - Gets the configured size in bytes of the memory space used to allocate thread stacks for this application.
rtems_configuration_get_ticks_per_timeslice() - Gets the clock ticks per timeslice configured for this application.
rtems_configuration_get_unified_work_area() - Indicates if the RTEMS Workspace and C Program Heap are configured to be unified for this application.
rtems_configuration_get_user_extension_table() - Gets the initial extensions table configured for this application.
rtems_configuration_get_user_multiprocessing_table() - Gets the MPCI configuration table configured for this application.
rtems_configuration_get_work_space_size() - Gets the RTEMS Workspace size in bytes configured for this application.
rtems_configuration_get_rtems_api_configuration() - Gets the Classic API Configuration Table of this application.
rtems_resource_is_unlimited() - Indicates if the resource is unlimited.
rtems_resource_maximum_per_allocation() - Gets the maximum number per allocation of a resource number.
rtems_resource_unlimited() - Augments the resource number so that it indicates an unlimited resource.