BL51: SFRS LISTED FOR EACH SOURCE FILE
Information in this article applies to:
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?
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.
Last Reviewed: Monday, October 1, 2001
of your data.