|
|||||||||||
|
Technical Support Support Resources
Product Information |
C51: Address Space Overflow With Far ConstantInformation in this article applies to:
QUESTIONI need many constants in my project, and for this reason, I initialize them as follows (This is just an example, the real initialization is a lot more complex and longer):
However, it appears that these constants are still in the CODE space. During linkage I get the following error:
How can I put the constants into the 'const far' memory type? ANSWERThere are two solutions to this problem. The STRING compiler directive locates strings into various memory classes. At the beginning of your source file, specify:
You may define the explicit memory type of the constants by using another variable as shown below:
You may also look to the example ConstFar in the folder Keil\c51\Examples\FarMemory\1MB Constants on Classic 8051. This shows you some techniques that might be useful for you. 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.