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

EXTRN CODE ( FUNCTION ) gives L16 if FUNCTION is BIT

uvision 2 v2.40, c51 v7.09, bl51 v5.03 gives:

*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?IS_OK_INC_DTARGET_SPD?SPDLIM

spdlim.c has
bit IS_OK_INC_DTARGET_SPD( void )
which returns a bit.

(1) how do I fix this?

Parents
  • IMHO, the problem is calling a C function from assembly, not calling assembly from C.

    To which the same strategy applies: do it (correctly, i.e. with a prototype declaration of the called function in scope) in
    a C program, and have C51 make you A51 soruce code demonstrates what exactly has to be done.

    That's the single most important rule about mixed assembly + C programming: the compiler knows how to do it, so don't ever hesitate to ask it.

Reply
  • IMHO, the problem is calling a C function from assembly, not calling assembly from C.

    To which the same strategy applies: do it (correctly, i.e. with a prototype declaration of the called function in scope) in
    a C program, and have C51 make you A51 soruce code demonstrates what exactly has to be done.

    That's the single most important rule about mixed assembly + C programming: the compiler knows how to do it, so don't ever hesitate to ask it.

Children
No data