|
Warning 15: MULTIPLE CALL TO FUNCTIONNext Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author Daniel Ni Posted 30-May-2006 03:10 GMT Toolset C51 |  Warning 15: MULTIPLE CALL TO FUNCTION Daniel Ni Hi all,
After compiling, I got following warning:
*** WARNING L15: MULTIPLE CALL TO FUNCTION NAME: _PUTMULTICHAR_SCI/SCI CALLER1: ?C_C51STARTUP CALLER2: INT0_ISR/INTERRUPT
Int0_ISR() is in interrupt.c.
However, I believe that function PutMultiChar_SCI() is not called by Int0_ISR(), although it was. PutMultiChar_SCI() is called at multiply place within main loop.
I read http://www.keil.com/support/docs/805.htm
I was wondering is there any cause will generate this warning ? Thanks in advance.
Daniel | | Read-Only Author A.W. Neil Posted 30-May-2006 06:46 GMT Toolset C51 |  RE: Warning 15: MULTIPLE CALL TO FUNCTION A.W. Neil "I believe that function PutMultiChar_SCI() is not called by Int0_ISR(), although it was." (my emphasis)
Well, if it was called that'll be the reason!
Note that the warning doesn't mean that there's a direct call from int0_isr - just that there's a call somewhere in the call tree from int0_isr. eg, is it called by something like printf...? | | Read-Only Author Daniel Ni Posted 30-May-2006 07:16 GMT Toolset C51 |  RE: Warning 15: MULTIPLE CALL TO FUNCTION Daniel Ni Thanks for response.
After sent the initial post, I double check the *.map file which includes function call tree and try to find any link between PutMultiChar_SCI() with Int0_ISR() function.
There are some facts listed below (1) PutMultiChar_SCI() is called at multiply places within the main loop, but not Int0_ISR().
(2) I can remove L15 warning by make PutMultiChar_SCI() reentrant, but this does not make any sense for me, because I have no RTOS only main loop and interrupt service routine.
(3) I never use printf() since I found it is longer than 700 lines in VC++, I prefer to use such as small convertion library. Thanks. | | Read-Only Author Andy Neil Posted 30-May-2006 11:49 GMT Toolset C51 |  RE: Warning 15: MULTIPLE CALL TO FUNCTION Andy Neil "I never use printf()"
I never said that you did - I said, "something like printf"
Are you sure that you don't have any other functions that get called in your ISR, and end up calling something that calls PutMultiChar_SCI() There must be something - or the linker wouldn't complain!
"I can remove L15 warning by make PutMultiChar_SCI() reentrant"
Of course - the reason the Linker has this warning is that C51 functions are inherently not reentrant!
"this does not make any sense for me, because I have no RTOS only main loop and interrupt service routine."
The problem is that C51 functions are inherently not reentrant - it makes no difference whether the reentrant calls are due to an RTOS or due to a Main loop and ISRs | | Read-Only Author erik malund Posted 30-May-2006 14:24 GMT Toolset C51 |  RE: Warning 15: MULTIPLE CALL TO FUNCTION erik malund "I can remove L15 warning by make PutMultiChar_SCI() reentrant" and end up with a true mess.
If you have ANYTHING that get called both by main (and subs thereof) and an ISR (and subs thereof) you will likey "install" a time bomb.
remove ALL function call from the ISR (there should be none anyhow) and then see what the linker tell you.
Erik | |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|