SW500008 Microchip Technology, SW500008 Datasheet - Page 137

PICC-18 STD

SW500008

Manufacturer Part Number
SW500008
Description
PICC-18 STD
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC18r
Datasheets

Specifications of SW500008

Supported Families
PIC18
Core Architecture
PIC
Software Edition
Standard
Kit Contents
Software And Docs
Mcu Supported Families
PIC18
Tool Function
Compiler
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
PIC18 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
015
778-1001
778-1001
Linker and Utilities
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.9.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
stack program, a function must be considered active as soon as its parameter area has been modified
in preparation for a call, even though code in that function is not yet being executed and a call to
that function has not been made. This is particularly import with functions that accept more than
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.10.2.2
Compiled Stack Operation
for information on
123

Related parts for SW500008