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
"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...?
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.
"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
"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