Microchip Technology SW006021-1N Manual Do Utilizador
Macro Assembler
2012 Microchip Technology Inc.
DS52053B-page 273
6.6.6
Call Graph
The other important information block in the assembly list file is the call graph (look for
Call Graph Tables: in the list file). This is produced for target devices that use a com-
piled stack to facilitate local variables, such as function parameters and auto variables.
See Section 5.5.2.2.1 “Compiled Stack Operation” for more detailed information on
compiled stack operation.
Call Graph Tables: in the list file). This is produced for target devices that use a com-
piled stack to facilitate local variables, such as function parameters and auto variables.
See Section 5.5.2.2.1 “Compiled Stack Operation” for more detailed information on
compiled stack operation.
The call graph in the list file shows the information collated and interpreted by the code
generator, which is primarily used to allow overlapping of functions’ auto-parameter
blocks (APBs). The following information can be obtained from studying the call graph.
generator, which is primarily used to allow overlapping of functions’ auto-parameter
blocks (APBs). The following information can be obtained from studying the call graph.
• The functions in the program that are “root” nodes marking the top of a call tree,
and which are called spontaneously
• The functions that the linker deemed were called, or may have been called, during
program execution
• The program’s hierarchy of function calls
• The size of the auto and parameter areas within each function’s APB
• The offset of each function’s APB within the compiled stack
• The estimated call tree depth.
6.6.6.1
These features are discussed below.
A typical call graph may look that shown inFigure 6-4.
FIGURE 6-4:
CALL GRAPH FORM
The graph starts with the function main(). Note that the function name will always be
shown in the assembly form, thus the function main() appears as the symbol _main.
main()
shown in the assembly form, thus the function main() appears as the symbol _main.
main()
is always a root of a call tree. Interrupt functions will form separate trees.
Call Graph Tables:
---------------------------------------------------------------------------------
(Depth) Function Calls Base Space Used Autos Params Refs
---------------------------------------------------------------------------------
(0) _main 12 12 0 34134
43 BANK0 5 5 0
0 BANK1 7 7 0
_aOut
_initSPI
---------------------------------------------------------------------------------
(1) _aOut 2 0 2 68
2 BANK0 2 0 2
_SPI
_GetDACValue (ARG)
---------------------------------------------------------------------------------
(1) _initSPI 0 0 0 0
---------------------------------------------------------------------------------
(2) _SPI 2 2 0 23
0 BANK0 2 2 0
(Depth) Function Calls Base Space Used Autos Params Refs
---------------------------------------------------------------------------------
(0) _main 12 12 0 34134
43 BANK0 5 5 0
0 BANK1 7 7 0
_aOut
_initSPI
---------------------------------------------------------------------------------
(1) _aOut 2 0 2 68
2 BANK0 2 0 2
_SPI
_GetDACValue (ARG)
---------------------------------------------------------------------------------
(1) _initSPI 0 0 0 0
---------------------------------------------------------------------------------
(2) _SPI 2 2 0 23
0 BANK0 2 2 0
...
Estimated maximum stack depth 6
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
(0) _main 12 12 0 34134
43 BANK0 5 5 0
0 BANK1 7 7 0
_aOut
_initSPI
43 BANK0 5 5 0
0 BANK1 7 7 0
_aOut
_initSPI