RTEMS 6.1-rc6
|
The application configuration information group provides an API to get the configuration of an application. More...
Files | |
file | config.h |
This header file provides parts of the application configuration information API. | |
Data Structures | |
struct | rtems_api_configuration_table |
This structure contains a summary of the Classic API configuration. More... | |
Macros | |
#define | RTEMS_UNLIMITED_OBJECTS OBJECTS_UNLIMITED_OBJECTS |
This flag is used in augment a resource number so that it indicates an unlimited resource. | |
#define | rtems_configuration_get_stack_allocator_avoids_work_space() _Stack_Allocator_avoids_workspace |
Indicates if the task stack allocator is configured to avoid the RTEMS Workspace for this application. | |
#define | RTEMS_HAS_HARDWARE_FP CPU_HARDWARE_FP |
This constant evaluates to TRUE, if this processor variant has hardware floating point support, otherwise to FALSE. | |
#define | rtems_configuration_get_do_zero_of_workspace() _Memory_Zero_before_use |
Indicates if the RTEMS Workspace is configured to be zeroed during system initialization for this application. | |
#define | rtems_configuration_get_idle_task_stack_size() _Thread_Idle_stack_size |
Gets the IDLE task stack size in bytes of this application. | |
#define | rtems_configuration_get_idle_task() _Thread_Idle_body |
Gets the IDLE task body of this application. | |
#define | rtems_configuration_get_interrupt_stack_size() ((size_t) _ISR_Stack_size_object) |
Gets the interrupt stack size in bytes of this application. | |
#define | rtems_configuration_get_maximum_processors() _SMP_Processor_configured_maximum |
Gets the maximum number of processors configured for this application. | |
#define | rtems_configuration_get_microseconds_per_tick() _Watchdog_Microseconds_per_tick |
Gets the number of microseconds per clock tick configured for this application. | |
#define | rtems_configuration_get_milliseconds_per_tick() ( _Watchdog_Microseconds_per_tick / 1000 ) |
Gets the number of milliseconds per clock tick configured for this application. | |
#define | rtems_configuration_get_nanoseconds_per_tick() _Watchdog_Nanoseconds_per_tick |
Gets the number of microseconds per clock tick configured for this application. | |
#define | rtems_configuration_get_number_of_initial_extensions() ((uint32_t) _User_extensions_Initial_count) |
Gets the number of initial extensions configured for this application. | |
#define | rtems_configuration_get_stack_allocate_for_idle_hook() _Stack_Allocator_allocate_for_idle |
Gets the task stack allocator allocate hook used to allocate the stack of each IDLE task configured for this application. | |
#define | rtems_configuration_get_stack_allocate_hook() _Stack_Allocator_allocate |
Gets the task stack allocator allocate hook configured for this application. | |
#define | rtems_configuration_get_stack_allocate_init_hook() _Stack_Allocator_initialize |
Gets the task stack allocator initialization hook configured for this application. | |
#define | rtems_configuration_get_stack_free_hook() _Stack_Allocator_free |
Gets the task stack allocator free hook configured for this application. | |
#define | rtems_configuration_get_ticks_per_timeslice() _Watchdog_Ticks_per_timeslice |
Gets the clock ticks per timeslice configured for this application. | |
#define | rtems_configuration_get_unified_work_area() _Workspace_Is_unified |
Indicates if the RTEMS Workspace and C Program Heap are configured to be unified for this application. | |
#define | rtems_configuration_get_user_extension_table() _User_extensions_Initial_extensions |
Gets the initial extensions table configured for this application. | |
#define | rtems_configuration_get_user_multiprocessing_table() NULL |
Gets the MPCI configuration table configured for this application. | |
#define | rtems_configuration_get_work_space_size() |
Gets the RTEMS Workspace size in bytes configured for this application. | |
#define | rtems_resource_is_unlimited(_resource) _Objects_Is_unlimited( _resource ) |
Indicates if the resource is unlimited. | |
#define | rtems_resource_maximum_per_allocation(_resource) _Objects_Maximum_per_allocation( _resource ) |
Gets the maximum number per allocation of a resource number. | |
#define | rtems_resource_unlimited(_resource) ( ( _resource ) | RTEMS_UNLIMITED_OBJECTS ) |
Augments the resource number so that it indicates an unlimited resource. | |
Typedefs | |
typedef Stack_Allocator_allocate | rtems_stack_allocate_hook |
A thread stack allocator allocate handler shall have this type. | |
typedef Stack_Allocator_initialize | rtems_stack_allocate_init_hook |
A task stack allocator initialization handler shall have this type. | |
typedef Stack_Allocator_free | rtems_stack_free_hook |
A task stack allocator free handler shall have this type. | |
Functions | |
uintptr_t | rtems_configuration_get_stack_space_size (void) |
Gets the configured size in bytes of the memory space used to allocate thread stacks for this application. | |
const char * | rtems_get_build_label (void) |
Gets the RTEMS build label. | |
const char * | rtems_get_copyright_notice (void) |
Gets the RTEMS copyright notice. | |
const char * | rtems_get_target_hash (void) |
Gets the RTEMS target hash. | |
const char * | rtems_get_version_string (void) |
Gets the RTEMS version string. | |
uint32_t | rtems_configuration_get_maximum_extensions (void) |
Gets the resource number of User Extensions Manager objects configured for this application. | |
uint32_t | rtems_configuration_get_maximum_barriers (void) |
Gets the resource number of Barrier Manager objects configured for this application. | |
uint32_t | rtems_configuration_get_maximum_message_queues (void) |
Gets the resource number of Message Manager objects configured for this application. | |
uint32_t | rtems_configuration_get_maximum_partitions (void) |
Gets the resource number of Partition Manager objects configured for this application. | |
uint32_t | rtems_configuration_get_maximum_periods (void) |
Gets the resource number of Rate-Monotonic Manager objects configured for this application. | |
uint32_t | rtems_configuration_get_maximum_ports (void) |
Gets the resource number of Dual-Ported Memory Manager objects configured for this application. | |
uint32_t | rtems_configuration_get_maximum_regions (void) |
Gets the resource number of Region Manager objects configured for this application. | |
uint32_t | rtems_configuration_get_maximum_semaphores (void) |
Gets the resource number of Semaphore Manager objects configured for this application. | |
uint32_t | rtems_configuration_get_maximum_tasks (void) |
Gets the resource number of Task Manager objects configured for this application. | |
uint32_t | rtems_configuration_get_maximum_timers (void) |
Gets the resource number of Timer Manager objects configured for this application. | |
const rtems_api_configuration_table * | rtems_configuration_get_rtems_api_configuration (void) |
Gets the Classic API Configuration Table of this application. | |
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.
#define rtems_configuration_get_do_zero_of_workspace | ( | ) | _Memory_Zero_before_use |
Indicates if the RTEMS Workspace is configured to be zeroed during system initialization for this application.
The following constraints apply to this directive:
#define rtems_configuration_get_idle_task | ( | ) | _Thread_Idle_body |
Gets the IDLE task body of this application.
The following constraints apply to this directive:
#define rtems_configuration_get_idle_task_stack_size | ( | ) | _Thread_Idle_stack_size |
Gets the IDLE task stack size in bytes of this application.
The following constraints apply to this directive:
#define rtems_configuration_get_interrupt_stack_size | ( | ) | ((size_t) _ISR_Stack_size_object) |
Gets the interrupt stack size in bytes of this application.
The following constraints apply to this directive:
#define rtems_configuration_get_maximum_processors | ( | ) | _SMP_Processor_configured_maximum |
Gets the maximum number of processors configured for this application.
The actual number of processors available to the application is returned by rtems_scheduler_get_processor_maximum() which less than or equal to the configured maximum number of processors (CONFIGURE_MAXIMUM_PROCESSORS).
In uniprocessor configurations, this macro is a compile time constant which evaluates to one.
The following constraints apply to this directive:
#define rtems_configuration_get_microseconds_per_tick | ( | ) | _Watchdog_Microseconds_per_tick |
Gets the number of microseconds per clock tick configured for this application.
The following constraints apply to this directive:
#define rtems_configuration_get_milliseconds_per_tick | ( | ) | ( _Watchdog_Microseconds_per_tick / 1000 ) |
Gets the number of milliseconds per clock tick configured for this application.
The following constraints apply to this directive:
#define rtems_configuration_get_nanoseconds_per_tick | ( | ) | _Watchdog_Nanoseconds_per_tick |
Gets the number of microseconds per clock tick configured for this application.
The following constraints apply to this directive:
#define rtems_configuration_get_number_of_initial_extensions | ( | ) | ((uint32_t) _User_extensions_Initial_count) |
Gets the number of initial extensions configured for this application.
The following constraints apply to this directive:
#define rtems_configuration_get_stack_allocate_for_idle_hook | ( | ) | _Stack_Allocator_allocate_for_idle |
Gets the task stack allocator allocate hook used to allocate the stack of each IDLE task configured for this application.
The following constraints apply to this directive:
#define rtems_configuration_get_stack_allocate_hook | ( | ) | _Stack_Allocator_allocate |
Gets the task stack allocator allocate hook configured for this application.
The following constraints apply to this directive:
#define rtems_configuration_get_stack_allocate_init_hook | ( | ) | _Stack_Allocator_initialize |
Gets the task stack allocator initialization hook configured for this application.
The following constraints apply to this directive:
#define rtems_configuration_get_stack_allocator_avoids_work_space | ( | ) | _Stack_Allocator_avoids_workspace |
Indicates if the task stack allocator is configured to avoid the RTEMS Workspace for this application.
The following constraints apply to this directive:
#define rtems_configuration_get_stack_free_hook | ( | ) | _Stack_Allocator_free |
Gets the task stack allocator free hook configured for this application.
The following constraints apply to this directive:
#define rtems_configuration_get_ticks_per_timeslice | ( | ) | _Watchdog_Ticks_per_timeslice |
Gets the clock ticks per timeslice configured for this application.
The following constraints apply to this directive:
#define rtems_configuration_get_unified_work_area | ( | ) | _Workspace_Is_unified |
Indicates if the RTEMS Workspace and C Program Heap are configured to be unified for this application.
The following constraints apply to this directive:
#define rtems_configuration_get_user_extension_table | ( | ) | _User_extensions_Initial_extensions |
Gets the initial extensions table configured for this application.
The following constraints apply to this directive:
#define rtems_configuration_get_user_multiprocessing_table | ( | ) | NULL |
Gets the MPCI configuration table configured for this application.
The following constraints apply to this directive:
#define rtems_configuration_get_work_space_size | ( | ) |
Gets the RTEMS Workspace size in bytes configured for this application.
The following constraints apply to this directive:
#define rtems_resource_is_unlimited | ( | _resource | ) | _Objects_Is_unlimited( _resource ) |
Indicates if the resource is unlimited.
_resource | is the resource number. |
The following constraints apply to this directive:
#define rtems_resource_maximum_per_allocation | ( | _resource | ) | _Objects_Maximum_per_allocation( _resource ) |
Gets the maximum number per allocation of a resource number.
_resource | is the resource number. |
The following constraints apply to this directive:
#define rtems_resource_unlimited | ( | _resource | ) | ( ( _resource ) | RTEMS_UNLIMITED_OBJECTS ) |
Augments the resource number so that it indicates an unlimited resource.
_resource | is the resource number to augment. |
The following constraints apply to this directive:
uint32_t rtems_configuration_get_maximum_barriers | ( | void | ) |
Gets the resource number of Barrier Manager objects configured for this application.
The following constraints apply to this directive:
uint32_t rtems_configuration_get_maximum_extensions | ( | void | ) |
Gets the resource number of User Extensions Manager objects configured for this application.
The following constraints apply to this directive:
uint32_t rtems_configuration_get_maximum_message_queues | ( | void | ) |
Gets the resource number of Message Manager objects configured for this application.
The following constraints apply to this directive:
uint32_t rtems_configuration_get_maximum_partitions | ( | void | ) |
Gets the resource number of Partition Manager objects configured for this application.
The following constraints apply to this directive:
uint32_t rtems_configuration_get_maximum_periods | ( | void | ) |
Gets the resource number of Rate-Monotonic Manager objects configured for this application.
The following constraints apply to this directive:
uint32_t rtems_configuration_get_maximum_ports | ( | void | ) |
Gets the resource number of Dual-Ported Memory Manager objects configured for this application.
The following constraints apply to this directive:
uint32_t rtems_configuration_get_maximum_regions | ( | void | ) |
Gets the resource number of Region Manager objects configured for this application.
The following constraints apply to this directive:
uint32_t rtems_configuration_get_maximum_semaphores | ( | void | ) |
Gets the resource number of Semaphore Manager objects configured for this application.
The following constraints apply to this directive:
uint32_t rtems_configuration_get_maximum_tasks | ( | void | ) |
Gets the resource number of Task Manager objects configured for this application.
The following constraints apply to this directive:
uint32_t rtems_configuration_get_maximum_timers | ( | void | ) |
Gets the resource number of Timer Manager objects configured for this application.
The following constraints apply to this directive:
const rtems_api_configuration_table * rtems_configuration_get_rtems_api_configuration | ( | void | ) |
Gets the Classic API Configuration Table of this application.
The following constraints apply to this directive:
uintptr_t rtems_configuration_get_stack_space_size | ( | void | ) |
Gets the configured size in bytes of the memory space used to allocate thread stacks for this application.
The following constraints apply to this directive:
const char * rtems_get_build_label | ( | void | ) |
Gets the RTEMS build label.
The build label is a user-provided string defined by the build configuration through the RTEMS_BUILD_LABEL
build option. The format of the string is completely user-defined.
The following constraints apply to this directive:
const char * rtems_get_copyright_notice | ( | void | ) |
Gets the RTEMS copyright notice.
The following constraints apply to this directive:
const char * rtems_get_target_hash | ( | void | ) |
Gets the RTEMS target hash.
The target hash is calculated from BSP-specific values which characterize a target system. The target hash is encoded as a base64url string. The target hash algorithm is unspecified.
For example, the device tree, settings of the memory controller, processor and bus frequencies, a serial number of a chip may be used to calculate the target hash.
The target hash can be used to distinguish test suite results obtained from different target systems. See also rtems_get_build_label().
The following constraints apply to this directive:
const char * rtems_get_version_string | ( | void | ) |
Gets the RTEMS version string.
The following constraints apply to this directive: