Keil Logo


Information in this article applies to:

  • C166 All Versions
  • C251 All Versions
  • C51 All Versions


I notice that the linker map file identifies some variables as type SYMBOL instead of PUBLIC even though I've declared them the same way as other PUBLIC variables. A sample declaration occurs below:

static xdata unsigned char pkt_start;
static xdata unsigned char temp_msg[ MAX_MESSAGE_LENGTH + 2 ];

What am I doing wrong?


The static keyword causes these variables to be identified as SYMBOL instead of PUBLIC. And, that is correct, variables declared with the static keyword are not PUBLIC. Although, access to the variables in either case follows the normal rules of scope.


Removing the static keyword from the declarations renders the desired output in the memory map for a global declaration of the variables. Remember, the static keyword excludes a variable from overlay analysis and limits the scope to the current file or function.

Last Reviewed: Saturday, February 5, 2005

Did this article provide the answer you needed?
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.