We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
When I attempt to link my project, the linker reports the following diagnostic:
*** WARNING L13: RECURSIVE CALL TO FUNCTION CALLED: _?NETIP_TXPKTDATAGRAM/NET_IP CALLER: _?NETIP_TXPKT/NET_IP
please tell me how to resolve it,thanks a lot!
Due to the peculiarities of the 8051 architecture, recursive functions are generally a bad idea.
Recursive functions, by definition, need to be reentrant. C51 can create reentrant functions, but that means opening a can of worms that's usually best left unopened. Refer to the compiler manual about the "reentrant" keyword.
Try to change your algorithm so it works without recursion.
Reentrancy is also important if you can call the same function from two contexts -- that is, your main call tree and an ISR, or perhaps two tasks if you have a preemptive RTOS.
thank you for your answers!