ARM Technical Support Knowledge Articles

WHAT IS THE _XDATA_GROUP?

Applies to: BL51 Code-banking Linker/Locator

Answer


Information in this article applies to:


QUESTION

What is stored in the _XDATA_GROUP_? I don't recall declaring or using this group in my program. However, the linker includes it in the link map.

* * * * * * *  X D A T A   M E M O R Y  * * * * * * *
XDATA   0000H     0006H     UNIT         _XDATA_GROUP_

ANSWER

The _XDATA_GROUP_ is a segment that contains all the automatic variables and function arguments from your program that are stored in XDATA memory. Starting in C51 V6, XDATA variables from your program (automatics and arguments only) are overlaid.

For example, the following call tree (generated by the BL51 linker) shows that the startup code calls the MAIN C function. The MAIN function uses 1 byte of XDATA and calls FUNC_A, FUNC_B, and FUNC_C.

FUNC_A, FUNC_B, and FUNC_C each use 5 bytes of XDATA. However, since each of these routines is mutually exclusive, their XDATA memory may be overlaid. Therefore, the linker starts the XDATA segments for each of these functions at the same address (0001H in this example).

SEGMENT                          XDATA_GROUP
  +--> CALLED SEGMENT          START    LENGTH
----------------------------------------------
?C_C51STARTUP                  -----    -----
  +--> ?PR?MAIN?MAIN

?PR?MAIN?MAIN                  0000H    0001H
  +--> ?PR?_FUNC_B?MAIN
  +--> ?PR?_FUNC_A?MAIN
  +--> ?PR?_FUNC_C?MAIN

?PR?_FUNC_B?MAIN               0001H    0005H

?PR?_FUNC_A?MAIN               0001H    0005H

?PR?_FUNC_C?MAIN               0001H    0005H

MORE INFORMATION

SEE ALSO

Article last edited on: 2006-10-16 11:49:25

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