|
|||||||||||
Technical Support Support Resources
Product Information |
BL51: Call Tree Using Pointers to FunctionsInformation in this article applies to:
QUESTIONAt the bottom of page 330 in the C51 Compiler User's Guide (01.97) it states that "when you use a function pointer, the linker cannot correctly create a call tree for your program. For this reason, you may have to correct the call tree for the data overlaying.". I have created a project that involves function pointers and I have not had to make any corrections to the call tree. Why is this? ANSWERThere are a few cases in which the C51 compiler and Linker can automatically make the proper inferrences for you and can indeed build the call tree. However, this is not always (and not typically) the case. For example, in the following example program...
The call tree indicates that func1 and func2 are called from the main function when in fact they are called from the indirect_caller function. This must be corrected using the OVERLAY linker directive. MORE INFORMATION
SEE ALSO
Last Reviewed: Thursday, February 25, 2021 | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.