This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

BL51 warning


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

Parents
  • I agree with you that all subroutines with fixed locations must be left in. However that still leaves the bulk of the unused functions, the relocatable ones.

    How about a "remove unused, relocatable overlay branches" option. Where an unused branch is one not marked with main, isr, or task. Where relocatable branch is one that only contain relocatable functions. This would be a complete solution for most people.

    This sure would be a plus to people like me who write reusable "classes" or "drivers". It is nice to write complete classes, which means that most programs don't call every function. Since the "set of functions that are called" varies from program to program, guarding every single function with IFDEFs is very ugly.

Reply
  • I agree with you that all subroutines with fixed locations must be left in. However that still leaves the bulk of the unused functions, the relocatable ones.

    How about a "remove unused, relocatable overlay branches" option. Where an unused branch is one not marked with main, isr, or task. Where relocatable branch is one that only contain relocatable functions. This would be a complete solution for most people.

    This sure would be a plus to people like me who write reusable "classes" or "drivers". It is nice to write complete classes, which means that most programs don't call every function. Since the "set of functions that are called" varies from program to program, guarding every single function with IFDEFs is very ugly.

Children