|
|||||||||||
Technical Support Support Resources
Product Information |
BL51: Warning L4 (Data Space Memory Overlap)Information in this article applies to:
QUESTIONWhen I link my code I get this warning message. How do I fix it?
ANSWERThis is caused by the linker attempting to locate more than one data segment at the range of addresses specified in the warning. In the particular case given above, those addresses are usually occupied by Register Bank 0. Check the map file generated by the linker (extension .m51) and towards the start of the file you will see a table called 'LINK MAP OF MODULE'. This is the memory map of your project. Look in the Data Memory section at the segments located around 0000H to 0007H. You can figure out from the segment names what is being located there. For example: ?DT?FOO is a segment that contains the data variables from the file foo.c. One of the segments must be relocated to avoid the overlap. If you have any variables that you are absolutely locating with the _at_ keyword (in C) or the DSEG directive (in assembler) at locations 0004H to 0007H, then they must be moved to different locations. If you are absolutely locating a segment at those addresses using the linker DATA directive, then another address must be used. Finally, if you must use those particular locations to store your variables, then you can change the default Register Bank used. This can be achieved by using the REGISTERBANK directive for both the compiler and assembler:
However, selecting Register Bank 0 with the 'using' keyword or using the REGISTERBANK directive somewhere in your code will cause locations 0000H to 0007H to be reserved for the Register Bank again. 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.