|ARM Technical Support Knowledge Articles|
Applies to: uVision Debugger
Information in this article applies to:
I am working on a project where I must simulate memory external to the microcontroller. I want to be able to save and reload the memory images each time I start my debugging session.
The uVision Simulator provides four 64K user-defined memory areas. These memory spaces (which are accessed using the S:, T:, U:, and V: prefixes) are available wherever you can access code and data memory. To use these spaces, you must use the MAP command to map the physical memory. For example:
MAP S:0, S:0x1000 READ WRITE // Map User Memory S: _WBYTE (S:0x50, 0x22) // Write to S:0x50 _RBYTE (S:0x50) // Read memory back _WBYTE (i + S:0x50) // Write to location S:i
The user-defined memory areas may be used in all uVision commands. You can access them in simulation functions, signal functions, the memory window, and the watch window.
You can read HEX files into the user-defined memory spaces and you can write HEX files from the user-defined memory spaces.
SAVE SIMDATA.HEX S:
The LOAD and SAVE commands store the user memory contents in HEX-386 file format. If you have existing input data in standard HEX file format, you can add the HEX-386 record type 04 to the beginning of the file to convert it to HEX-386 format. For example:
:02000004F80002 // for memory type S: :02000004F90001 // for memory type T: :02000004FA0000 // for memory type U: :02000004FB00FF // for memory type V:
HEX files can converted into binary format using the HEX2BIN utility. Binary files can be converted into HEX format using the BIN2HEX utility.
On some devices like the Atmel 89C51RD2 and Analog Devices ADuC812, the user-defined memory space V: simulates the on-chip EEPROM memory.
The S:, T:, U:, and V: memory spaces are available only in the 8051 toolchain.
Article last edited on: 2005-09-22 12:34:57
Did you find this article helpful? Yes No
How can we improve this article?