|
|||||||||||
Technical Support Support Resources
Product Information |
C51: Locating Variables in Multiple XDATA AreasInformation in this article applies to:
QUESTIONMy 8051 target hardware does not have continuous XDATA memory. Is there a way I can declare the XDATA that is available for variables so that the compiler and linker automatically locate my XDATA variables automatically? ANSWERYes. In C51 V6.01 and later, you may specify XDATA ranges to the BL51 linker. You may specify a range for each valid XDATA area and let the BL51 linker locate your XDATA segments automatically. For example, suppose you have XDATA ranges from 0x0000 to 0x1FFF and from 0x4000 to 0x4FFF. And, that you have segments (?XD?SEG1, ?XD?SEG2, and ?XD?SEG3) which should be located in the XDATA range from 0x0000-0x1FFF and the following segments (?XD?SEG4, ?XD?SEG5, and ?XD?SEG6) which should be located in the XDATA range from 0x4000 to 0x4FFF. On the Command LineCompile as normal. Use the following linker command line:
Since all unspecified XDATA segments are located after the last specified XDATA segment, you may avoid listing ALL XDATA segments in the linker command line. In µVision2
SEE ALSOLast Reviewed: Thursday, February 25, 2021 | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.