SW006015 Microchip Technology, SW006015 Datasheet - Page 67

C COMPILER MPLAB C32

SW006015

Manufacturer Part Number
SW006015
Description
C COMPILER MPLAB C32
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC32r
Datasheets

Specifications of SW006015

Supported Families
PIC32MX5, MX6, And MX7
Core Architecture
PIC
Kit Contents
Software And Docs
Mcu Supported Families
PIC32 MCUs
Tool Function
Compiler
Supported Devices
PIC32 MCUs
Tool Type
Compiler
Processor Series
PIC32
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC32
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
© 2007 Microchip Technology Inc.
Without the global pointer, loading data from a static memory area takes two
instructions – one to load the most significant bits of the 32-bit constant address
computed by the compiler/linker and one to do the data load.
To utilize gp-relative addressing, the compiler and assembler must group all of the
“small” variables and constants into one of the following sections:
The linker must then group all of the above input sections together. The run-time startup
code must initialize the gp register to point to the “middle” of this output section. To
enable the startup code to initialize the gp register, the linker script must initialize a
variable which is 32 KB from the start of the output section containing the “small”
variables and constants. This variable is named _gp (to match core linker scripts).
Besides being initialized in the standard GPR set, the global pointer must also be
initialized in the register shadow set.
FIGURE 5-5:
5.7.2.4
A procedure is called after initializing a minimum ‘C’ context. This procedure allows
users to perform actions almost immediately on reset of the device. An empty weak
version of this procedure (_on_reset) is provided with the startup code. Special
considerations needs to be taken by the user if this procedure is written in 'C'. Most
importantly, statically allocated variables are not initialized (with either the specified
initializer or a zero as required for uninitialized variables).
5.7.2.5
There are two uninitialized data sections—.sbss and .bss. The .sbss section is a
data segment containing uninitialized variables less than or equal to n bytes where n
is determined by the -Gn command line option. The .bss section is a data segment
containing uninitialized variables not included in .sbss.
• .lit4.
• .sdata.
• .sdata.*
• .gnu.linkonce.s.*
CALL “ON RESET” PROCEDURE
CLEAR UNINITIALIZED DATA SECTIONS
GLOBAL POINTER LOCATION
• lit8
• sbss
• sbss.*
• .gnu.linkonce.sb.*
DS51686A-page 63

Related parts for SW006015