BL51: WHAT IS THE _XDATA_GROUP?
Information in this article applies to:
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_
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
The following Discussion Forum threads may provide information related to this topic.
Last Reviewed: Monday, October 16, 2006
of your data.