RTEMS Logo

RTEMS 4.7.1 On-Line Library


Board Support Packages Reset and Initialization

PREV UP NEXT Bookshelf RTEMS C User's Guide

20.2: Reset and Initialization

  • Board Support Packages Interrupt Stack Requirements
  • Board Support Packages Processors with a Separate Interrupt Stack
  • Board Support Packages Processors without a Separate Interrupt Stack
  • An RTEMS based application is initiated or re-initiated when the processor is reset. This initialization code is responsible for preparing the target platform for the RTEMS application. Although the exact actions performed by the initialization code are highly processor and target dependent, the logical functionality of these actions are similar across a variety of processors and target platforms.

    Normally, the application's initialization is performed at two separate times: before the call to rtems_initialize_executive (reset application initialization) and after rtems_initialize_executive in the user's initialization tasks (local and global application initialization). The order of the startup procedure is as follows:

    1. Reset application initialization.
    2. Call to rtems_initialize_executive
    3. Local and global application initialization.

    The reset application initialization code is executed first when the processor is reset. All of the hardware must be initialized to a quiescent state by this software before initializing RTEMS. When in quiescent state, devices do not generate any interrupts or require any servicing by the application. Some of the hardware components may be initialized in this code as well as any application initialization that does not involve calls to RTEMS directives.

    The processor's Interrupt Vector Table which will be used by the application may need to be set to the required value by the reset application initialization code. Because interrupts are enabled automatically by RTEMS as part of the rtems_initialize_executive directive, the Interrupt Vector Table MUST be set before this directive is invoked to insure correct interrupt vectoring. The processor's Interrupt Vector Table must be accessible by RTEMS as it will be modified by the rtems_interrupt_catch directive. On some CPUs, RTEMS installs it's own Interrupt Vector Table as part of initialization and thus these requirements are met automatically. The reset code which is executed before the call to rtems_initialize_executive has the following requirements:

    The rtems_initialize_executive directive does not return to the initialization code, but causes the highest priority initialization task to begin execution. Initialization tasks are used to perform both local and global application initialization which is dependent on RTEMS facilities. The user initialization task facility is typically used to create the application's set of tasks.


    PREV UP NEXT Bookshelf RTEMS C User's Guide

    Copyright © 1988-2004 OAR Corporation