|
|||||||||||
Technical Support Support Resources
Product Information |
CX51: Locating Variables in EDATAInformation in this article applies to:
QUESTIONI'm using the NXP 80C51MX devices. How can I declare a variable in EDATA space? ANSWERThe MX does not provide any new instructions to access the EDATA space. So, this memory area may be viewed as another HDATA memory area. Typically, it is used as extended stack space. However, you may create an HDATA user class that allows you to place variables there. For example:
You may use the LX51 linker CLASSES directive to locate the HDATA_ERAM class to address 0x7F0000. In µVision, enter this class under Options - LX51 Locate - User Classes as:
If you use the LX51 on the command line, you must add this in the CLASSES directive as follows:
The #pragma userclass (HDATA=ERAM) directive affects the whole source file. If you need to declare variables in HDATA using an address range different than HDATA_ERAM (0x7F0000-0x7F03FF), you need to create another source file to work with those variables. In the current source file, all the far variables are placed in the user's HDATA_ERAM class. MORE INFORMATION
SEE ALSO
Last 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.