ARM Technical Support Knowledge Articles

IDATALOOP NEVER ENDS

Applies to: C51 C Compiler

Answer


Information in this article applies to:


SYMPTOMS

I am stepping through the startup code from startup.a51 in dScope and my program seems to get stuck in the IDATALOOP. However, if I type g,main to go straight to main, it seems to work fine.

CAUSE

The IDATALOOP initializes the idata memory to 0. In order to do this, it has to go to each memory location in turn and store a zero. At the start of your startup.a51 file, you will have something like the following:

IDATALEN EQU 80H ; the length of IDATA memory in bytes.

This sets the size of idata. Therefore the IDATALOOP has to loop 80H times. If you step into the loop repeatedly, you will see in the Register window R0 counting down from 80H to 0H, as it is used to store the current memory location.

MORE INFORMATION

Article last edited on: 2005-07-15 12:09:54

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