| Details |
Message |
|
Read-Only
Author sam raj
Posted 14-Nov-2007 10:52 GMT
Toolset C51
|
 linker warning
sam raj
hi all,
i am building 8051 application in keil compiler.i got an warning
message when linking... like this.....
*** WARNING L16: UNCALLED SEGMENT,IGNORED FOR OVERLAY PROCESS
SEGMENT :?PR?_ANALOGVOL?ANALOG
from the above warning ...analogvol is an function..analog is a
file name which is having the definition of analogvol....please help
me to find out this and how to clear.....
thanks in advance.
m.y.sam
|
|
|
Read-Only
Author Per Westermark
Posted 14-Nov-2007 11:02 GMT
Toolset C51
|
 RE: linker warning
Per Westermark
What do you need help finding out? The text is quite explicit.
If you have functions that you don't need, you can either delete
them, drop the source file from the project (if it doesn't contain
any other symbols that you do use) or encapsulate the function with a
#ifdef/#endif block like:
#ifdef _SKIP_UNUSED
...
#endif
|
|
|
Read-Only
Author sam raj
Posted 14-Nov-2007 11:27 GMT
Toolset C51
|
 RE: linker warning
sam raj
i must need that function later....but currently i am not using
that(now i am adding that source file with my project)...
what are the causes for that warning....is it affect running the
program...give your idea
very thanks for reply...
|
|
|
Read-Only
Author Andy Neil
Posted 14-Nov-2007 12:11 GMT
Toolset C51
|
 RTFM
Andy Neil
Click on the message in uVision, then press F1 to get help on the
message.
Or, just look it up in the Manual:
http://www.keil.com/support/man/docs/lx51/lx51_l16.htm
http://www.keil.com/support/man/docs/bl51/bl51_l16.htm
... and review the listed Knowledgebase articles
|
|
|
Read-Only
Author Per Westermark
Posted 14-Nov-2007 12:44 GMT
Toolset C51
|
 RE: linker warning
Per Westermark
what are the causes for that warning
Exactly what it says: "UNCALLED SEGMENT".
|
|
|
Read-Only
Author Andy Neil
Posted 14-Nov-2007 13:00 GMT
Toolset C51
|
 RE: Exactly what it says
Andy Neil
"UNCALLED SEGMENT"
To spell it out, that means that the nothing in the segment is
ever called;
There are no calls to anything in that segment
|
|
|
Read-Only
Author Neil Kurzman
Posted 14-Nov-2007 21:20 GMT
Toolset C51
|
 RE: linker warning
Neil Kurzman
But You do not need it now. The message say the function in
question is not called. It assumes you want to use it via an indirect
function call (pointer). So it is allocating extra RAM based on that
assumption ( that it can not overlay variables). Otherwise the
program will run normally.
|
|
|
Read-Only
Author Andy Neil
Posted 14-Nov-2007 12:08 GMT
Toolset C51
|
 other options
Andy Neil
"drop the source file from the project (if it doesn't contain
any other symbols that you do use)"
Or simply clear its 'Include in Target Build' option...
http://www.keil.com/support/man/docs/uv3/uv3_ca_filegrp_att.htm
Or, with the LX51 Linker, see:
http://www.keil.com/support/man/docs/lx51/lx51_removeunused.htm
|
|
|
Read-Only
Author erik malund
Posted 14-Nov-2007 21:35 GMT
Toolset C51
|
 if you do not optimize too far
erik malund
a simple "tide me over" is
bit helper;
...
helper = 0;
if (helper)
{
MyCurrentlyUncalledFunction():
}
The beauty of this method is that it does not interfer once you
start using the function.
Erik
PS I guess that some "optimizer happy" person can work out how to
make this work even when optimizing.
|
|
|
Read-Only
Author erik malund
Posted 14-Nov-2007 21:37 GMT
Toolset C51
|
 another way
erik malund
is to have that function alone in a file and put the
generated .obj in a library. Then it does only get included when
called
Erik
|
|
|
Read-Only
Author Andy Neil
Posted 15-Nov-2007 01:06 GMT
Toolset C51
|
 RE: if you do not optimize too far
Andy Neil
"The beauty of this method is that it does not interfer once
you start using the function."
I don't see the benefit over the more "conventional" method of a
#define and #if ?
And it uses up a bit varialbe...
|
|
|
Read-Only
Author erik malund
Posted 15-Nov-2007 13:50 GMT
Toolset C51
|
 RE: if you do not optimize too far
erik malund
no advantage if you never forget
Erik
|
|
|
Read-Only
Author Andy Neil
Posted 15-Nov-2007 14:42 GMT
Toolset C51
|
 RE: no advantage if you never forget
Andy Neil
Is there and advantage, then, if you do forget?
What is it?
|
|