This is a problem of warning 16. i have tried the solution given in keil site " This warning occurs when functions which are not called are contained in a program (e.g. for test purposes). The function specified is excluded from the overlay process in this case. Often this warning is accompanied by ERROR 107: ADDRESS SPACE OVERFLOW If you fix the uncalled warning the Error 107 is often cleared as well. There are two ways to solve this problem. 1. Call the uncalled function from somewhere in your program. 2. Remove or #if out the function that is not called. You can do that using #if 0 in front of and #endif after the uncalled function. For example: #if 0 void uncalled_function (void) { } #endif" even after each one of above the problem persists. Would you please throw some light. The errors are pasted as below. *** WARNING 16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?RI2C_SLAVEADDRESSRECEIVED?RI2C_DCN *** WARNING 16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?RI2C_SLAVESEND?RI2C_DCN *** WARNING 16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?RI2C_SLAVERECEIVE?RI2C_DCN *** WARNING 16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?_MOVXD0?CLIB *** ERROR 107: ADDRESS SPACE OVERFLOW SPACE: DATA SEGMENT: ?DT?TEXTVARS LENGTH: 0001H *** ERROR 118: REFERENCE MADE TO ERRONEOUS EXTERNAL SYMBOL: TXTREQ MODULE: ..\APPLIC\LIB\T90PTR1.LIB (TXREVEAL) ADDRESS: A13CH
Since the "set of functions that are called" varies from program to program, guarding every single function with IFDEFs is very ugly. Yep. If you create libraries, you should place one function in a source file. That way, the linker only includes those modules that are used. This is how the standard C library is built. The following knowledgebase article reiterates this: http://www.keil.com/support/docs/2182.htm Jon
That works, but it is even uglier. Maybe the solution is a "Module name directive" that can be used in between functions?
I think thats the only thing remaining. Adding a module name in betweeen functions looks interesting . is there any knowledge base for this article. ANOTHER POINT IS THERE ARE SOME FUNCTIONS DECLARED WITH EXTERN FUNCTION WHICH DOESN'T HAVE DEFINITION IN WHOLE PROJECT. WHEN I TRIED TO ADD DEFINITION THE C51 COMPILER GAVE FUNCTION REDEFINITION ERROR. I DO NOT UNDERSTAND WHY COMPILER IS GIVING SUCH AN ERROR. Please keep me posted with your advices.
Are the extern and function declared identically? Do they have the same enviroment ( ROM(SMALL), etc )?
or are the definitions hidden in a Library somewhere, with no source? I seem to remember raising this as an issue with the Keil error/warning messages before: They talk about "Duplicate" definitions, but then list only one definition in the diagnostic - whereas, obviously, there must be two to make a duplicate!
Thank you all.. I have removed all error messages and only the 4 warning 16's are remaining. What i have done is just changed the memory selector from DATA to IDATA which removed address space overflow in DATA segment as well as other 4 errors. The implications of this change in the project has to be checked. But now these nagging warnings are still there. Do you have any valuable suggestions...