eorror of multiple call to segment

Hi,

The compile error is:

WARNING L15: MULTIPLE CALL TO SEGMENT
SEGMENT: ?PR?_STRTONUM?PARSE
CALLER1: ?PR?TC0?PERIPHERAL
CALLER2: ?C_C51STARTUP

The callers TC0 is an ISR using reg bank 2 and I don't know about the c51startup. The called function STRTONUM is using the directive of #pragma NOAREGS so can be called for any functions. The question is why I still got the multiple call error? Thanks for answering my question.

By the way, C51 is V6.21, BL51 is V4.21 and LIB51 is V4.20.

chao.

Parents
  • Function main() also calls STRTONUM function. As the result I have two different functions using different reg banks to call STRTONUM. But still, why would I get multiple call warning since the directive of NOAREGS is used on STRTONUM? Can this warning be ignored?

    You are calling a function from main AND an interrrupt.
    1) this is bad practice
    2) if you insist on using this bad practice, you must also make the code reentranr.

    Erik

Reply
  • Function main() also calls STRTONUM function. As the result I have two different functions using different reg banks to call STRTONUM. But still, why would I get multiple call warning since the directive of NOAREGS is used on STRTONUM? Can this warning be ignored?

    You are calling a function from main AND an interrrupt.
    1) this is bad practice
    2) if you insist on using this bad practice, you must also make the code reentranr.

    Erik

Children
More questions in this forum