RTEMS Logo

RTEMS 4.9.2 On-Line Library


Board Support Packages Reset and Initialization

PREV UP NEXT Bookshelf RTEMS Ada User's Guide

21.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 BSP and some of the application initialization is intertwined in the RTEMS initialization sequence controlled by the shared function boot_card().

    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 context switch to the first task, the Interrupt Vector Table MUST be set before this directive is invoked to ensure correct interrupt vectoring. The processor's Interrupt Vector Table must be accessible by RTEMS as it will be modified by the when installing user Interrupt Service Routines (ISRs) 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 any RTEMS initialization routines has the following requirements:

    At the end of the initialization sequence, RTEMS does not return to the BSP initialization code, but instead context switches to the highest priority task to begin application execution. This task is typically a User Initialization Task which is responsible for performing both local and global application initialization which is dependent on RTEMS facilities. It is also responsible for initializing any higher level RTEMS services the application uses such as networking and blocking device drivers.


    PREV UP NEXT Bookshelf RTEMS Ada User's Guide

    Copyright © 1988-2008 OAR Corporation