Keil Logo

BL51: SFRS LISTED FOR EACH SOURCE FILE


Information in this article applies to:

  • C51 Version 6.20

QUESTION

When I create a program with many files, I define all of my SFRs in a header file that is included in all files in my project. In the linker .M51 file, all definitions of the SFRs are included. This makes it difficult to find my REAL variables versus the SFRs. See how P0 is listed 2 times in the following:

  -------         MODULE        JUNK
  C:0000H         SYMBOL        _ICE_DUMMY_
  D:0080H         PUBLIC        P0
  C:0017H         PUBLIC        junk
  -------         PROC          JUNK
  C:0017H         LINE#         3
  C:0017H         LINE#         4
  C:0017H         LINE#         5
  C:001AH         LINE#         6
  -------         ENDPROC       JUNK
  -------         ENDMOD        JUNK

  -------         MODULE        MAIN
  C:0000H         SYMBOL        _ICE_DUMMY_
  D:0080H         PUBLIC        P0
  C:000FH         PUBLIC        main
  -------         PROC          MAIN
  C:000FH         LINE#         5
  C:000FH         LINE#         6
  C:000FH         LINE#         7
  C:0012H         LINE#         8
  C:0015H         LINE#         10
  -------         ENDPROC       MAIN
  -------         ENDMOD        MAIN

Is there a way around this?

ANSWER

Unfortunately, the way the linker lists the global symbols is by source file. So, SFRs that are declared in multiple modules will be listed multiple times.

One thing you may want to try is using the Source Browser in µVision2. You may enable it from the Project Options - Output dialog.

Then, from the View menu, select Source Browser. You can use all kinds of filters to locate variables, #defines, SFRs, functions, and so on. The source browser also shows where the symbol is defined and where it is used. You can double-click to go to that line in the source.

SEE ALSO

Last Reviewed: Monday, October 1, 2001


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.