ARM Technical Support Knowledge Articles

INITIALIZE MEMORY AT SIMULATOR START

Applies to: uVision Debugger

Answer


Information in this article applies to:


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

ATTACHED FILES

Request the files attached to this knowledgebase article.

Article last edited on: 2007-08-03 03:14:15

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential