|
|||||||||||||||||||||||||||||||||
Technical Support On-Line Manuals µVision3 User's Guide µVision3 Overview User Interface Creating Applications Utilities Debugging Using the Debugger CPU Simulation Start Debugging Application Program Execution Debug Windows and Dialogs Breakpoints Code Coverage CPU Registers Disassembly Window Logic Analyzer Setup Setup in Detail Restrictions Memory Window Memory Map Output Window - Command Debug Commands Variables and Registers Debug Functions Execution Profiler Performance Analyzer Serial Window Symbol Window Toolbox Watch Window Expressions Constants System Variables Peripheral Variables I/O Ports Serial Ports Program Variables (Symbols) Line Numbers Bit Addresses Type Specifications Operators Differences Between µVision3 and C Expression Examples Tips and Tricks Review Peripherals and CPU Configuration Simulate I/O Ports Simulate Interrupts and Clock Inputs Simulate external I/O Devices Assign Serial I/O to a PC COM Port Check Illegal Memory Accesses Command Input from File Preset I/O Ports or Memory Contents Write Debug Output to a File Keyboard Shortcuts Debug Commands Debug Functions Simulation Flash Programming Dialogs Example Programs Command Line Appendix |
Program Variables (Symbols)µVision3 lets you access variables, or symbols, in your target program by simply typing their name. Variable names, or symbol names, represent numeric values and addresses. Symbols make the debugging process easier by allowing you to use the same names in the debugger as you use in your program. When you load a target program module the symbol information is loaded into the debugger. The symbols include local variables (declared within functions), the function names, and the line number information. You must enable Options for Target — Output — Debug Information. Without debug information, µVision3 cannot perform source-level and symbolic debugging. Module NamesA module name is the name of an object module that makes up all or part of a target program. Source-level debugging information as well as symbolic information is stored in each module. The module name is derived from the name of the source file. If the target program consists of a source file named MCOMMAND.C and the C compiler generates an object file called MCOMMAND.OBJ, the module name is MCOMMAND. Symbol Naming ConventionsThe following conventions apply to symbols.
Notes
Fully-Qualified SymbolsSymbols may be entered using a fully qualified name that includes the name of the module and name of the function in which the symbol is defined. A fully qualified symbol name is composed of the following components:
This components may combined as shown in the following table:
Examples of fully qualified symbol names:
Non-Qualified SymbolsSymbols may be entered using the only name of the variable or function they reference. These symbols are not fully qualified and searched in a number of tables until a matching symbol name is found. This search works as follows:
Notes
Literal SymbolsWith the back quote character (') you get a literal symbol name. Literal symbols must be used to access:
If a literal symbol name is given, µVision3 changes the search order for non-qualified symbols that is described above. For a literal symbol CPU Driver Symbols (VTREGs) are searched instead of CPU Register Symbols. Examples for using Literal SymbolsIf you define a variable named R5 in your program and you attempt to access it, you will actually access the R5 CPU register. To access the R5 variable, you must prefix the variable name with the back quote character.
If your program contains a function named clock and you attempt to access the clock VTREG, you will get the address of the clock function. To access the clock VTREG, you must prefix the variable name with the back quote character.
| ||||||||||||||||||||||||||||||||
|
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.