I am designing an application to run on the Si Labs C8051F046 MCU with uVision 3. Yesterday I created a new project, but forgot to include one of the source modules. This produced a line during the link in the Output Window:
*** WARNING L1: UNRESOLVED EXTERNAL SYMBOL
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
============================================================ Gary Lynch | To send mail, change no$pam in lynchg@no$pam.com | my domain name to stacoenergy
On 5/10/06 8:24:01; erik malund wrote: > > Many decide to ignore warnings, that may be OK during > development, but there is a difference between "ignore" and > "not read" > > I may ignore warnings during development, but I ALWAYS read > them > Ok, so oversimplified my process. I read ALL the warnings the first time I link a new module and take action as indicated. But some of them are not eliminatable. Thereafter I only read the body of the warnings if the NUMBER of warnings changes from the prior build. In the case cited, I went too fast and confused "UNRESOLVED" with "UNCALLED". Then at 5/10/06 8:23:07; A.W. Neil wrote: > > How about If you were doing some sort of "incremental > build", or you were building a Library that required some > call-backs to be provided by the user? > Ok, I'll grant you that scenario. It's just that I've never used it. > > Anyhow, if the functions in those modules are never called, > and the data is never accessed, what difference does it > make! > <snip> > > As soon as you actually try to reference one of the > undefined symbols, that most certainly will give you an > error. > Well, you want the dirty details, here they are. The source containing the main() function looks like (names have been changed to protect the guilty):
while(1) { for(j=0; j<6; j++) { | ?C0001: CLR A ; 1 | MOV j,A ; 2 | MOV j+01H,A ; 3 | ?C0003: CLR C ; 4 | MOV A,j+01H ; 5 | SUBB A,#06H ; 6 | MOV A,j ; 7 | SUBB A,#00H ; 8 | JNC ?C0001 ; 9 doFoo(2, j); | MOV R5,j+01H ; 10 | MOV R7,#02H ; 11 | LCALL _doFoo ; 12 wait(4473); | MOV R7,#079H ; 13 | MOV R6,#011H ; 14 | LCALL _wait ; 15 } | INC j+01H ; 16 | MOV A,j+01H ; 17 | JNZ ?C0007 ; 18 | INC j ; 19 | ?C0007: SJMP ?C0003 ; 20 | RET ; 21 } /* END while(1) */ | ; 22
*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: _WAIT MODULE: TestFoo.obj (TESTFOO) ADDRESS: 01BEH