|
|||||||||||
|
Technical Support Support Resources
Product Information |
C51: Configuring XDATA BankingInformation in this article applies to:
QUESTIONMy application requires large amounts of RAM which is available on my hardware. But, I need to access it through the Compiler and Linker. I have an ASIC containing an 8051 core that supports XDATA banking with 32 kbyte pages at X:0x8000-X:0xFFFF. An SFR named XPAGE at address D:0x95 is used to select the XDATA page. So, the memory map appears as follows:
How can I configure the C51 Compiler and the extended LX51 Linker/Locater to use this paging mechanism? How can I allocate variables in the various xdata memory pages? Can I allocate large arrays (of 64K size) in the C code? ANSWERLarge memory and XDATA banking are supported starting with Version 6.20 of the PK51 Professional Developer's Kit (C51 Version 6.20). In this and later releases, the memory types far and far const allow you to place variables in banked RAM (far = HDATA) and ROM (far const = HCONST). Since your memory is fragmented into 32 KByte blocks, it is not possible to create arrays larger than 32 KBytes. The XDATA banking is configured using the XBANKING.A51 file found in the \KEIL\C51\LIB\ folder. To configure the tools for your application:
This configuration for the Compiler and Linker will allow you to use the extended memory regions of your hardware. To allocate variables in these spaces, simply declare them as far memory types. For example:
MORE INFORMATION
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.