|
|||||||||||
|
Technical Support Support Resources
Product Information |
C51: Runtime Determination of Last XDATA Address UsedInformation in this article applies to:
QUESTIONIs there a way to determine, at runtime, the last used location in xdata? I want to use the remaining xdata space (beyond the last xdata variable allocated) as a small heap. ANSWEROne way to do this is to create a file containing only an xdata variable declaration. For example:
When you create your project, make sure that this is the last file in the project file list. When the project is linked, this file will be linked last AND the last_var_used variable will be located at the end of xdata memory. You may use the C address-of operator ('&') to get the address of this variable. 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.