The Initialization Manager directives are called by the Board Support Package framework as part of its initialization sequence. RTEMS assumes that the Board Support Package successfully completed its initialization activities. These directives initialize RTEMS by performing the following actions:
The initialization directives MUST be called in the proper sequence before any blocking directives may be used. The services in this manager should be invoked just once per application and in precisely the following order:
rtems.initialize_data_structures
rtems.initialize_before_drivers
rtems.initialize_device_drivers
rtems.initialize_start_multitasking
It is recommended that the Board Support Package use the
provided framework which will invoke these services as
part of the executing the function boot_card
in the
file c/src/lib/libbsp/shared/bootcard.c
. This
framework will also assist in allocating memory to the
RTEMS Workspace and C Program Heap and initializing the
C Library.
The effect of calling any blocking RTEMS directives before
rtems.initialize_start_multitasking
is unpredictable but guaranteed to be bad. Afer the
directive rtems.initialize_data_structures
is invoked, it is permissible to allocate RTEMS objects and
perform non-blocking operations. But the user should be
distinctly aware that multitasking is not available yet
and they are NOT executing in a task context.
Many of RTEMS actions during initialization are based upon the contents of the Configuration Table. For more information regarding the format and contents of this table, please refer to the chapter Configuring a System.
The final step in the initialization sequence is the
initiation of multitasking. When the scheduler and dispatcher
are enabled, the highest priority, ready task will be dispatched
to run. Control will not be returned to the Board Support
Package after multitasking is enabled until the
rtems.shutdown_executive
directive is called.
This directive is called as a side-effect of POSIX calls
including exit
.
Copyright © 1988-2008 OAR Corporation