ARM Technical Support Knowledge Articles

INITIALIZING XDATA OVER FF00H

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

If you set XDATALEN in the STARTUP.A51 file to anything over FF00H, a warning is generated when an attempt is made to assemble the file. How do I fix this?

Also, how do you initialize location FFFFH in XDATA?

ANSWER

The warning indicates that a value is being truncated, and can easily be fixed. Remove the following section from the STARTUP.A51 file:

  IF (LOW (XDATALEN)) <> 0
                MOV     R6,#(HIGH XDATALEN) +1
  ELSE
                MOV     R6,#HIGH (XDATALEN)
  ENDIF

and replace it with:

  IF (LOW (XDATALEN)) <> 0
                MOV     R6,#LOW ((HIGH XDATALEN) +1)
  ELSE
                MOV     R6,#HIGH (XDATALEN)
  ENDIF

It is not possible to initialize location FFFFH in XDATA. In order to do that, you would have to specify an XDATALEN of 10000H which is a 17-bit value. You can modify the STARTUP.A51 file yourself to workaround this problem, or you may initialize that particular location explicitly, either in the STARTUP.A51 file or in your project.

MORE INFORMATION

Article last edited on: 2005-07-15 13:15:38

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