Home / µVision User's Guide
C51, C251, C166 Development Tools
Program Variables (Symbols)
Symbols are representations of source code identifiers, such as
the names of applications, modules, variables, functions, special
function registers, or virtual registers. Usually, symbols are
associated with debug information, for example: type, scope, or
location of the identifier they represent. Symbols allow using the
names of identifiers as defined in the original source code.
Enable Options for Target — Output — Debug Information to
generate the information required for performing source-level and
symbolic debugging.
The general form of a symbol name is:
[\\Application][[\[Path/]Module][\Identifier]]
Application |
represents the application name. Must be preceded with a
double backslash (\\). |
Path |
represents the folder of the source code file. Separate
folders from sub-folders with a slash (/). Must end with a slash
(/). Path can be ignored.
See examples in Module. |
Module |
represents the name of a source module ( *.c, *.cpp). Can be
preceded with a Path. Must begin with a backslash (\).
For example, the compiler generates the object file
Mcommand.obj for the source file Mcommand.c, then
Module is Mcommand.
Examples
Assuming the application folder is
C:\ARM\Projs\Measure. Then the symbol name can have the
form:
/* Mcommand.c resides in C:\Proj\Measure\src */
\\Measure\Mcommand // path ignored.
// Module without file extension.
/* Mcommand.c resides in C:\ARM\Proj\src */
\\Measure\../src/Measure.c // relative path
Module names can be queried from the Command Window
with the debugging command:
DIR module
|
Identifier |
represents a source code object. Must be separated from
Module with a backslash (\). Can be used standalone and
without backslash when unique in the application.
Identifier can be a:
- code line number.
- scalar variable (char, int, long, float, double).
- composite variable (array, structure, file).
- function.
- meaningful combination of the above.
Examples
\\Measure\Measure.c\87 // Code line number
\\Measure\Measure.c\sindex // Scalar variable
\\Measure\Measure.c\setinterval.min // Structure.StructMember
\\Measure\Measure.c\menu[1] // Array[element]
\\Measure\Measure.c\read_index // Function
\\Measure\Measure.c\read_index\index // Function\Scalar variable
|
This section contains descriptions for: