µVision User's GuideAbout µVision User Interface Creating Applications Utilities Debugging Using the Debugger Simulation Start Debugging Application Program Execution Debug Windows and Dialogs Breakpoints Window Call Stack and Locals Window Code Coverage Command Window Disassembly Window Event Viewer Logic Analyzer Setup Setup in Detail Restrictions Memory Map Memory Window Performance Analyzer Registers Window Serial Window Symbols Window System Viewer System and Thread Viewer Thread States Toolbox Watch Window Expressions Constants System Variables Peripheral Variables I/O Ports Serial Ports Program Variables (Symbols) Fully Qualified Symbols Non-Qualified Symbols Literal Symbols Using Symbols Line Numbers Bit Addresses Type Specifications Operators Memory Type Specifiers Differences between µVision 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 Access Command Input from File Preset I/O Ports or Memory Contents Write Debug Output to a File Keyboard Shortcuts Prevent Opening Files Debug Commands Debug Functions Simulation Flash Programming Dialogs Example Programs Command Line Appendix
The µVision debugger accepts constants of the following type: binary, decimal, HEX, octal, floating-point, character, and string.
Binary, Decimal, HEX, and Octal Constants
By default, numeric constants are of the type decimal. When entering 10, this is the decimal number ten and not the HEX value 10h. However, the value output in the Command window is steered by the system variable radix.
Use the prefixes or suffixes listed in the table to change the meaning of a numeric expression:
About numeric constants:
Floating-point numbers must have a digit before the decimal point. Thus, .12 is not allowed, but 0.12 must be entered. Floating-point constants can have the following formats:
Valid floating-point constants:
4.12, 0.1e3, 12.12e–5
The C programming language rules for character constants apply to the µVision debugger.
Valid character constants:
'a', '1', '\n', '\v', '\x0FE', '\015'
Escape-sequences are also supported:
The C programming language rules for string constants also apply to the µVision debugger. However, contrary to the C-language, successive strings are not concatenated into a single string. For example, "string1"+"string2" is not combined into a single string.
Valid string constants:
"string\x007\n" "value of %s = %04XH\n"
Escape double quotes within nested strings:
"printf (\"hello world!\n\")"
of your data.