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

L15 Multiple call to segment prob

Can anyone help me,
I get two L15 warnings when I compile my program. They both say that PRINTF is the segment being called from two places. PRINTF is not called in any shape or form. Not even through another function that is called with the one reported. Furthermore I have the optimization set to 0, so no overlaying should be getting done.

Thanks

Parents
  • The error message tells you the names of the callers, doesn't it? Which functions does it say are calling printf? Could you post the error message?

    In addition to any local variables, functions may need to be assigned memory locations to hold parameters that cannot fit in registers. (This will be true for functions with more than three parameters, or variable argument functions like printf, and some others; see the calling conventions description in the manual.) Since the code inside the function has to know where its parameters are, there can be only one parameter block per function. That means the function is not reentrant, and so you cannot call it from two different contexts. You could declare the function reentrant (not really possible with printf), or you could duplicate the function (again, not really feasible), or you could change the code to avoid the conflict, or you could manually insert some sort of mutual exclusion (say interrupt masking) around each call to be sure that you won't actually interrupt one call with another.

Reply
  • The error message tells you the names of the callers, doesn't it? Which functions does it say are calling printf? Could you post the error message?

    In addition to any local variables, functions may need to be assigned memory locations to hold parameters that cannot fit in registers. (This will be true for functions with more than three parameters, or variable argument functions like printf, and some others; see the calling conventions description in the manual.) Since the code inside the function has to know where its parameters are, there can be only one parameter block per function. That means the function is not reentrant, and so you cannot call it from two different contexts. You could declare the function reentrant (not really possible with printf), or you could duplicate the function (again, not really feasible), or you could change the code to avoid the conflict, or you could manually insert some sort of mutual exclusion (say interrupt masking) around each call to be sure that you won't actually interrupt one call with another.

Children
No data