Keil Logo

C51: Extern Declarations Using _at_

Information in this article applies to:

  • C51 Version 5.50 or later

SYMPTOMS

I receive the following error messages in my linker MAP file when I include an external declaration for physically located variables:

* * * * * * *   C O D E   M E M O R Y   * * * * * * *
            CODE    0000H     2000H     ABSOLUTE
* OVERLAP * CODE    0000H     2000H     ABSOLUTE
* OVERLAP * CODE    0000H     2000H     ABSOLUTE
* OVERLAP * CODE    0000H     2000H     ABSOLUTE
* OVERLAP * CODE    0000H     2000H     ABSOLUTE
* OVERLAP * CODE    0000H     2000H     ABSOLUTE
* OVERLAP * CODE    0000H     2000H     ABSOLUTE
* OVERLAP * CODE    0000H     2000H     ABSOLUTE
* OVERLAP * CODE    0000H     0003H     ABSOLUTE
* OVERLAP * CODE    000BH     0003H     ABSOLUTE
* OVERLAP * CODE    0013H     0003H     ABSOLUTE
* OVERLAP * CODE    0023H     0003H     ABSOLUTE
* OVERLAP * CODE    0033H     0003H     ABSOLUTE
            CODE    2000H     2000H     ABSOLUTE

My extern declaration is defined as follows:

extern code char FLASH_BUFFER [0x800] _at_ 0x2000;

What's going on here?

CAUSE

Extern definitions for physically located variables must not include the _at_ keyword.

RESOLUTION

Change your extern definitions to appear as follows (without the _at_):

extern code char FLASH_BUFFER [0x800];

MORE INFORMATION


Last Reviewed: Thursday, February 25, 2021


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

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.