Keil Logo

µVISION DEBUGGER: INITIALIZE MEMORY AT SIMULATOR START


Information in this article applies to:

  • µVision Version 3

QUESTION

I need to simulate the state of memory after it has been erased and an application program has been loaded.

Therefore I need to set the location 0xC000 - 0xC007 to a fixed pattern 0xAA, 0xBB, 0x01, 0x02, 0x03, 0x04, 0x55, 0x44. Also the memory from 0xC008 - 0xC100 must be set to 0xFF.

How can this be done?

ANSWER

You may write a debugger command file that executes debug functions that set the memory values.

Example:

  _WBYTE (0xC000, 0xAA);
  _WBYTE (0xC001, 0xBB);
  _WBYTE (0xC002, 0x01);
  _WBYTE (0xC003, 0x02);
  _WBYTE (0xC004, 0x03);
  _WBYTE (0xC005, 0x04);
  _WBYTE (0xC006, 0x55);
  _WBYTE (0xC007, 0x44);
  MEMSET (0xC008, 0xC100-0xC008, 0xFF);

You may automatically execute this script when you start the debugger by entering in under Project - Options for Target - Debug - Initialization File.

MORE INFORMATION

SEE ALSO

Last Reviewed: Friday, August 3, 2007


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.