Table of Contents Previous topic Next topic
C COMPILER->Interrupt Functions->Call Tree Analysis
The compiler carries out a call tree analysis to determine the information that needs to be stored on the stack at entry to an interrupt routine.
By default it will include all of the functions that are in the same module as the interrupt routine in this analysis.
Optionally the analysis will include all functions in the users program. This option is only available when the compiler is being driven by the Embedded Development Studio and is enabled by selecting Optimise across modules in the Build->Settings->Compiler tab.
When all C file compile without errors, select the Optimise across modules option and invoke the Build->Rebuild All or Build->Build commands. All C source files will be compiled in parallel, with progress though the various compilation stages being co-ordinated by the Embedded Development Studio. Each compilation process will have access to the program wide call tree and resource analysis (cross module database) and use it to optimise interrupt functions.
Whenever you modify a single C source file you can recompile it using the Build->Compile command or the Compiler to Assembler Code command (accessed by right mouse clicking on the source file window) and the cross module database will be used. However, if you modify more than one file between recompiles and compile using these commands you will be warned that optimisation across modules is not being carried out. Nevertheless the file will be included in the rebuild list and recompiled when the next Build->Build command is issued and so your final program will always include code that has been fully optimised across modules.
When you change projects or close the Embedded Development Studio or compile a file with the Optimise across modules option disabled, the cross-module database will be discarded. Therefore you will have to Rebuild All next time you open your project.