VxWorks Reference Manual : Libraries

usrConfig

NAME

usrConfig - user-defined system configuration library

ROUTINES

usrInit( ) - user-defined system initialization routine
usrRoot( ) - the root task
usrClock( ) - user-defined system clock interrupt routine

DESCRIPTION

This library is the WRS-supplied configuration module for VxWorks. It contains the root task, the primary system initialization routine, the network initialization routine, and the clock interrupt routine.

The include file config.h includes a number of system-dependent parameters used in this file.

In an effort to simplify the presentation of the configuration of vxWorks, this file has been split into smaller files. These additional configuration source files are located in ../../src/config/usr[xxx].c and are #included into this file below. This file contains the bulk of the code a customer is likely to customize.

The module usrDepend.c contains checks that guard against unsupported configurations such as INCLUDE_NFS without INCLUDE_RPC. The module usrKernel.c contains the core initialization of the kernel which is rarely customized, but provided for information. The module usrNetwork.c now contains all network initialization code. Finally, the module usrExtra.c contains the conditional inclusion of the optional packages selected in configAll.h.

The source code necessary for the configuration selected is entirely included in this file during compilation as part of a standard build in the board support package. No other make is necessary.

INCLUDE FILES

config.h

SEE ALSO

usrConfig, Tornado User's Guide: Getting Started, Cross-Development


Libraries : Routines

usrInit( )

NAME

usrInit( ) - user-defined system initialization routine

SYNOPSIS

void usrInit
    (
    int startType
    )

DESCRIPTION

This is the first C code executed after the system boots. This routine is called by the assembly language start-up routine sysInit( ) which is in the sysALib module of the target-specific directory. It is called with interrupts locked out. The kernel is not multitasking at this point.

This routine starts by clearing BSS; thus all variables are initialized to 0, as per the C specification. It then initializes the hardware by calling sysHwInit( ), sets up the interrupt/exception vectors, and starts kernel multitasking with usrRoot( ) as the root task.

RETURNS

N/A

SEE ALSO

usrConfig, kernelLib

ARGSUSED0


Libraries : Routines

usrRoot( )

NAME

usrRoot( ) - the root task

SYNOPSIS

void usrRoot
    (
    char *   pMemPoolStart, /* start of system memory partition */
    unsigned memPoolSize    /* initial size of mem pool */
    )

DESCRIPTION

This is the first task to run under the multitasking kernel. It performs all final initialization and then starts other tasks.

It initializes the I/O system, installs drivers, creates devices, and sets up the network, etc., as necessary for a particular configuration. It may also create and load the system symbol table, if one is to be included. It may then load and spawn additional tasks as needed. In the default configuration, it simply initializes the VxWorks shell.

RETURNS

N/A

SEE ALSO

usrConfig


Libraries : Routines

usrClock( )

NAME

usrClock( ) - user-defined system clock interrupt routine

SYNOPSIS


void usrClock ()

DESCRIPTION

This routine is called at interrupt level on each clock interrupt. It is installed by usrRoot( ) with a sysClkConnect( ) call. It calls all the other packages that need to know about clock ticks, including the kernel itself.

If the application needs anything to happen at the system clock interrupt level, it can be added to this routine.

RETURNS

N/A

SEE ALSO

usrConfig