AN2094 Freescale Semiconductor / Motorola, AN2094 Datasheet - Page 50

no-image

AN2094

Manufacturer Part Number
AN2094
Description
ITU-T G.729 Implementation on StarCore SC140
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
References
C.4 Simulator Command Files for Stack Analysis
C.5 Code and Data Size from Map Files
The linker can generate a map file describing the memory map of the application (encoder or decoder). This option
is enabled either in the linker command line using the –M (or –Map <file>) option or from the compiler shell using
the –dm <file> option. The map file provides a great deal of information about both the vocoder code and the
application that runs it, and some effort is required to separate the vocoder information from the application
information. The map file provides size and memory location information for all global variables and functions, as
well as total memory allocated to each object file. The size of local (static) variables and functions are derived from
this information. Example 19 lists fragments from a map file generated for the encoder tester application. The line
numbers on the left are manually inserted for reference.
50
}
# output stack dimension
$decoder_stack = $stack_top - $stack_base;
print "Decoder stack size = ".$decoder_stack." bytes.\n";
display off
break off
output off
input off
radix u esp
load ..\..\..\..\code\baseline\coder.eld
display on esp
break #1 _g729_encode
break #2 _frame_end s
break #3 _exit
log s coder_stack.log -o
go
break #4 w esp s
break #1 _g729_encode s
go
quit
}
if ($begin_flag == 0) {
} else {
}
if ( $1 > $stack_top ) {
}
$stack_base = $1;
$begin_flag = 0;
$stack_top = $1;
ITU-T G.729 Implementation on the StarCore™ SC140/SC1400 Cores, Rev. 1
Example 18. coder_measure_stack.sc
Freescale Semiconductor

Related parts for AN2094