Keil Logo

DIR

Syntax Description
DIR Displays symbol names for the current module.
DIR \module Displays symbols of module.
DIR \module LINE
DIR \module\func LINE
Displays line number information for the current or specified module or function.
DIR \module\func Displays symbols of function func contained in module.
DIR BFUNC Displays the names of all predefined µVision3 functions.
DIR DEFSYM Displays the names of symbols created with the DEFINE command.
DIR FUNC Displays the names of all µVision3 functions.
DIR LINE Displays line number information for the current module.
DIR MODULE Displays the names of modules in your target program.
DIR PUBLIC Displays the names of all global symbols.
DIR SIGNAL Displays the names of all user-defined signal functions.
DIR UFUNC Displays the names of all user-defined functions.
DIR VTREG Displays the names of all CPU-pin registers that are supported by the CPU driver.

Use the DIR command to display various types of symbols. When DIR is invoked with no additional arguments, the symbol names of the current module display. The current module is the module whose address space is indicated by the program counter ($). µVision3 determines the address areas assigned to the module when the target program loads.

µVision3 maintains various internal symbol tables whose contents can be displayed using the DIR command with its various options.

DIR Command Option Description
\module
\module\func
Displays the symbols of the specified module or function are output.
BFUNC Displays the names of predefined µVision3 functions. These functions are always available and cannot be deleted or redefined.
DEFSYM Displays the symbols created using the DEFINE command. Refer to DEFINE for more information.

Using this option, the output of the symbols created by the 'DEFINE <[>type<]><[>name<]>' command is permitted.

FUNC Displays the names and prototypes for all currently defined µVision3 functions. This includes: predefined functions, user-defined functions, and signal functions.

Note that µVision3 functions are not the same as functions in your target program.
LINE
\module LINE
\module\func LINE
Displays line numbers for the current module, the specified module, or the specified function.
MODULE Displays the names of all modules in your target program. The target program must be loaded.
PUBLIC Displays all global symbol names. These objects have the attribute PUBLIC in assembly language. Non-static C variables are also included in this group.
SIGNAL Displays the names of signal functions. Signal functions are user functions that process in the background. These are used to produce signal forms for the port inputs.
UFUNC Displays the names of µVision3 user functions. User functions are those function defined by the user.
VTREG Displays the names of CPU-pin registers supported by the currently selected CPU form the device database.
Example

The following example were created using the MEASURE example program of the C51 compiler package.

DIR MODULE

>DIR MODULE      /* all module names */
  MEASURE
  MCOMMAND
  GETLINE
  ?C_FPADD
  ?C_FPMUL
  ...

DIR \module

>DIR \MEASURE    /* module 'MEASURE' */
 MODULE: MEASURE
    C:0x000000 . . . . _ICE_DUMMY_ . . uint
     FUNCTION: {CvtB} RANGE: 0xFF03B7-0xFF07E5
      C:0x000000 . . . . _ICE_DUMMY_ . . uint
     FUNCTION: {CvtB} RANGE: 0xFF000B-0xFF000D
      C:0x000000 . . . . _ICE_DUMMY_ . . uint
     FUNCTION: SAVE_CURRENT_MEASUREMENTS RANGE: 0xFF000E-0xFF0069
     FUNCTION: TIMER0 RANGE: 0xFF006A-0xFF0135
      D:0x00000F . . . . i . . uchar
     FUNCTION: _READ_INDEX RANGE: 0xFF0136-0xFF01BF
      D:0x00003F . . . . buffer . . ptr to char
      D:0x000042 . . . . index . . int
      D:0x000007 . . . . args . . uchar
     FUNCTION: CLEAR_RECORDS RANGE: 0xFF01C0-0xFF01EE
      D:0x000006 . . . . idx . . uint
     FUNCTION: MAIN RANGE: 0xFF01EF-0xFF03B6
      I:0x000067 . . . . cmdbuf . . array[15] of char
      D:0x00003C . . . . i . . uchar
      D:0x00003D . . . . idx . . uint

DIR /module LINE

>DIR \MEASURE LINE     /* Lines of module 'MEASURE' */
 MODULE: MEASURE
C:0x000E . . . . #87
C:0x000E . . . . #88
C:0x003A . . . . #89
C:0x0049 . . . . #90
...
C:0x03B6 . . . . #291
C:0x03B6 . . . . #292

DIR PUBLIC

>DIR PUBLIC            /* all PUBLIC symbols */
  B:0x000640 . . . . T2I0 . . bit
  B:0x000641 . . . . T2I1 . . bit
  ...
  D:0x000023 . . . . current . . struct mrec
  C:0x0007CD . . . . ERROR . . array[16] of char
  X:0x004000 . . . . save_record . . array[744] of struct mrec
  C:0x00000E . . . . save_current_measurements . . void-function
  C:0x0001EF . . . . main . . void-function
  C:0x00047E . . . . menu . . array[847] of char
  D:0x000030 . . . . setinterval . . struct interval
  ...
  B:0x000601 . . . . IEX2 . . bit
  B:0x000600 . . . . IADC . . bit

DIR VTREG

>DIR VTREG           /* Show Pin-Registers and Values */
    PORT0:  uchar, value = 0xFF
    PORT1:  uchar, value = 0xFF
    PORT2:  uchar, value = 0xFF
    PORT3:  uchar, value = 0xFF
    PORT4:  uchar, value = 0xFF
    PORT5:  uchar, value = 0xFF
    PORT6:  uchar, value = 0xFF
    PORT7:  uchar, value = 0x00
    PORT8:  uchar, value = 0x00
     AIN0:  float, value = 0
     AIN1:  float, value = 0
     AIN2:  float, value = 0
     AIN3:  float, value = 0
     AIN4:  float, value = 0
     AIN5:  float, value = 0
     AIN6:  float, value = 0
     AIN7:  float, value = 0
     AIN8:  float, value = 0
     AIN9:  float, value = 0
    AIN10:  float, value = 0
    AIN11:  float, value = 0
     S0IN:   uint, value = 0x0000
    S0OUT:   uint, value = 0x0000
     S1IN:   uint, value = 0x0000
    S1OUT:   uint, value = 0x0000
    VAGND:  float, value = 0
    VAREF:  float, value = 5
     XTAL:  ulong, value = 0xB71B00
   PE_SWD:  uchar, value = 0x00
    STIME:  uchar, value = 0x00

DIR

>$ = MAIN     /* set current execution point to main() */
>DIR          /* now, the main() symbols are preselected */
 FUNCTION: MAIN RANGE: 0xFF01EF-0xFF03B6
  I:0x000067 . . . . cmdbuf . . array[15] of char
  D:0x00003C . . . . i . . uchar
  D:0x00003D . . . . idx . . uint

DIR DEFSYM

>DIR DEFSYM   /* those created by 'DEFINE <[>type<]> <[>name<]>' */
            word00:    int, value = 0x0000
            byte00:   char, value = 0x00
           dword00:   long, value = 0x0
           float00:  float, value = 0

DIR FUNC

>DIR FUNC     /* predefined µVision3 functions */
predef'd:   void  MEMSET (ulong, ulong, uchar)
predef'd:   void  TWATCH (ulong)
predef'd:    int  RAND (uint)
predef'd:  float  GETFLOAT (char *)
predef'd:   long  GETLONG (char *)
predef'd:    int  GETINT (char *)
predef'd:   void  EXEC (char *)
predef'd:   void  PRINTF (char *, ...)
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.