|
|||||||||||
|
Technical Support Support Resources
Product Information |
BL51: Data Memory Overlap When Using PRECEDE DirectiveInformation in this article applies to:
SYMPTOMSWhen I add printf() (or other functions that have local variables) to my project, I get a Memory Overlap Error from the linker for the Data space. Part of my map file looks like the following:
The segment ?DT?EVL_INIT is located at 0028H with the linker DATA directive. The linker PRECEDE directive is used with the _DATA_GROUP_ segment.
CAUSEWhen you added the printf() call, the size of the _DATA_GROUP_ segment increased in size to the point where it could not fit into Data memory before the ?DT?EVL_INIT segment. When the linker tried to place the ?DT?EVL_INIT segment into memory, it failed because part of that space was already taken by the Data Group. The reason the _DATA_GROUP_ segment was located before the ?DT_EVL_INIT segment was because the PRECEDE directive is used. RESOLUTIONRemove _DATA_GROUP_ from the PRECEDE directive so the linker can fit the Data Group into Data memory after locating the ?DT?EVL_INIT segment. This gives the linker the greatest flexibility in locating the segments. If it is not possible to remove _DATA_GROUP_ from the PRECEDE directive, then the DATA directive must be used to juggle the segments around so they can all fit into Data memory. 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.