Keil Logo

µVISION DEBUGGER: S:, T:, U:, AND V: USER MEMORY TYPES


Information in this article applies to:

  • C51 Version 7.0

QUESTION

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.

ANSWER

The µVision 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 µVision 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.

  • The SAVE command may be used to write the contents of a user-defined memory area to an Intel HEX file. For example:
    SAVE SIMDATA.HEX S:
    
  • The LOAD command may be used to read an Intel HEX file into the user-defined memory area. For example:
    LOAD SIMDATA.HEX
    

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.

Note:
The S:, T:, U:, and V: memory spaces are available only in the 8051 toolchain.

MORE INFORMATION

  • µVision3 User's Guide

SEE ALSO

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Thursday, September 22, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  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.