ARM Technical Support Knowledge Articles

FILL MEMORY WITH CONSTANT BEFORE LOAD

Applies to: uVision Debugger

Answer


Information in this article applies to:


QUESTION

I need the code space filled with 0xFF before I load code from a HEX file. Is there a way to do this?

I have the following code in an assembler source file.

CSEG        at  1000H
version:    dw  0
crc:        dw  03273H,0F1A6H
date:       dw  042B0H,025D3H
pad:        ds  100
checksum:   dw  00F71H

When the simulator loads the program, the data in pad is all 0x00. When it is loaded into the target it is all 0xFF. Is there a way to fill the memory in the simulator with 0xFF?

ANSWER

Yes. The µVision debugger has several pre-defined debug functions. The function memset allows you to initialize the memory with a constant.

The following steps explain how to preset the memory in the simulator:

You may automate this process by using an INI file that contains these debugger commands. This INI file can be entered under Project — Options — Debug — Initialization File.

MORE INFORMATION

SEE ALSO

Article last edited on: 2007-01-11 14:59:55

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