RTEMS Logo

RTEMS 4.9.2 On-Line Library


Configuring a System Automatic Generation of System Configuration

PREV UP NEXT Bookshelf RTEMS C User's Guide

23.2: Automatic Generation of System Configuration

  • Configuring a System Library Support Definitions
  • Configuring a System Basic System Information
  • Configuring a System Idle Task Configuration
  • Configuring a System Device Driver Table
  • Configuring a System Multiprocessing Configuration
  • Configuring a System Classic API Configuration
  • Configuring a System Classic API Initialization Tasks Table Configuration
  • Configuring a System POSIX API Configuration
  • Configuring a System POSIX Initialization Threads Table Configuration
  • Configuring a System ITRON API Configuration
  • Configuring a System ITRON Initialization Task Table Configuration
  • Configuring a System Ada Tasks
  • RTEMS provides the rtems/confdefs.h C language header file that based on the setting of a variety of macros can automatically produce nearly all of the configuration tables required by an RTEMS application. Rather than building the individual tables by hand, the application simply specifies the values for the configuration parameters it wishes to set. In the following example, the configuration information for a simple system with a message queue and a time slice of 50 milliseconds is configured:

    #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
    #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
    
    #define CONFIGURE_MICROSECONDS_PER_TICK   1000 /* 1 millisecond */
    #define CONFIGURE_TICKS_PER_TIMESLICE       50 /* 50 milliseconds */
    
    #define CONFIGURE_MAXIMUM_TASKS 4
    #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
    

    This system will begin execution with the single initialization task named Init. It will be configured to have both a console device driver (for standard I/O) and a clock tick device driver.

    For each configuration parameter in the configuration tables, the macro corresponding to that field is discussed. Most systems can be easily configured using the rtems/confdefs.h mechanism.

    The CONFIGURE_INIT constant must be defined in order to make rtems/confdefs.h instantiate the configuration data structures. This can only be defined in one source file per application that includes rtems/confdefs.h or the symbol table will be instantiated multiple times and linking errors produced.

    The user should be aware that the defaults are intentionally set as low as possible. By default, no application resources are configured. The rtems/confdefs.h file ensures that at least one application tasks or thread is configured and that at least one of the initialization task/thread tables is configured.

    The rtems/confdefs.h file estimates the amount of memory required for the RTEMS Executive Workspace. This estimate is only as accurate as the information given to rtems/confdefs.h and may be either too high or too low for a variety of reasons. Some of the reasons that rtems/confdefs.h may reserve too much memory for RTEMS are:

    Conversely, there are many more reasons, the resource estimate could be too low:

    In general, rtems/confdefs.h is very accurate when given enough information. However, it is quite easy to use a library and not account for its resources.

    The following subsection list all of the constants which can be set by the user.


    PREV UP NEXT Bookshelf RTEMS C User's Guide

    Copyright © 1988-2008 OAR Corporation