SW500009 Microchip Technology, SW500009 Datasheet - Page 124

HI-TECH FOR DSPIC/PIC24

SW500009

Manufacturer Part Number
SW500009
Description
HI-TECH FOR DSPIC/PIC24
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC24 & DsPICr
Datasheet

Specifications of SW500009

Supported Families
PIC24
Core Architecture
PIC, DsPIC
Software Edition
Standard
Kit Contents
Software And Docs
Tool Type
Compiler
Mcu Supported Families
PIC24 MCUs And DsPIC DSCs
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
DSPIC3X/PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
025
778-1003
778-1003
Compiled Stack Operation
auto and temporary variables. Temporary variables act just like auto variables. Local variables
which are qualified static are not part of this block. For situations where a compiled stack is used,
the linker performs additional operations to minimise the memory consumed by the program by
overlaying each function’s APB where possible.
marks the start of the auto or parameter area in the block, and an offset. The symbol used to represent
the base address of the parameter area within the function’s APB is the concatenation of ? and the
assembler name of the function. The symbol used to represent the base address of the auto area
within the function’s APB is the concatenation of ?a, in the case of Standard version compilers, or
??, in the case of Pro version compilers, and the assembler name of the function.
base address for all its parameters variables that have been allocated memory, and either ?a_foo
(Standard) or ??_foo (Pro) as the base address for auto variables which the function defines. So the
first two-byte auto variable might be referenced in Pro version compiler assembly code as ??_foo;
the second auto variable as ??_foo+2, etc. Note that some parameters may be passed in registers,
and may not have memory allocated to them in the parameter area of the APB.
program. In particular, the linker determines which functions are, or may be, active at the same
time. If one function calls another, then both are active at the same time. To this end, a call graph
is created from information in the object files being linker. See Section
reading the call graph displayed in the map file. This information is directly related to the FNCALL
assembler directive (see Section
the assembler output whenever a C function calls another. Hand-written assembler code should also
contain these directives, if required. Information regarding the size of the auto and parameter areas
within in function’s APB is specified by the FNSIZE assembler directive (see Section 4.3.8.16).
5.7.1 Parameters involving Function Calls
The linker must take special note of the results of function calls used in expressions that are them-
selves parameters to another function. For example, if input and output are both functions that
accept two int parameters and and both return an int, the following:
shows that the function input is called to determine the second parameter to the function output.
This information is very important as it indicates areas of the code that must be considered carefully,
lest the code fail due to re-entrancy related issues.
executed while another instance of the same function is also actively executing. For a compiled
110
Each function in the call graph is allocated an auto/parameter block (APB) for its parameter,
In assembly code variables within a function’s APB are referenced via special symbols, which
For example, a function called foo, for example, will use the assembly symbol ?_foo as the
The linker allocates memory for each function’s APB, based on how that function is used in a
A re-entrant call is typically considered to be the situation in which a function is called and
result = output(out_selector, input(int_selector, 10));
4.3.8.13
for more information) which the code generator places in
5.11.1
Linker and Utilities
for information on

Related parts for SW500009