SW006012 Microchip Technology, SW006012 Datasheet - Page 73

C COMPILER FOR DSPIC30F FAMILY

SW006012

Manufacturer Part Number
SW006012
Description
C COMPILER FOR DSPIC30F FAMILY
Manufacturer
Microchip Technology
Type
MPLAB® C30 Compilerr
Series
PIC24 & DsPICr
Datasheets

Specifications of SW006012

Supported Families
PIC24, DsPIC30F And DsPIC33F
Core Architecture
PIC, DsPIC
Kit Contents
Software And Docs
Mcu Supported Families
PIC24 MCUs And DsPIC DSCs
Tool Type
Compiler
Processor Series
PIC24, dsPIC
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
dsPIC30F
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
4.5
© 2007 Microchip Technology Inc.
STARTUP AND INITIALIZATION
MPLAB C30 C Compiler Runtime Environment
Two C runtime startup modules are included in the libpic30.a archive/library. The
entry point for both startup modules is __reset. The linker scripts construct a GOTO
__reset instruction at location 0 in program memory, which transfers control upon
device reset.
The primary startup module (crt0.o) is linked by default and performs the following:
1. The Stack Pointer (W15) and Stack Pointer Limit register (SPLIM) are initialized,
2. If a .const section is defined, it is mapped into the program space visibility
3. The data initialization template in section .dinit is read, causing all
4. The function main is called with no parameters.
5. If main returns, the processor will reset.
The alternate startup module (crt1.o) is linked when the -Wl, --no-data-init
option is specified. It performs the same operations, except for step (3), which is
omitted. The alternate startup module is smaller than the primary module, and can be
selected to conserve program memory if data initialization is not required.
Source code (in dsPIC DSC assembly language) for both modules is provided in the
c:\Program Files\Microchip\MPLAB C30\src directory. The startup modules
may be modified if necessary. For example, if an application requires main to be called
with parameters, a conditional assembly directive may be changed to provide this
support.
Note:
using values provided by the linker or a custom linker script. For more
information, see Section 4.9 “Software Stack”.
window by initializing the PSVPAG and CORCON registers. Note that a .const
section is defined when the “Constants in code space” option is selected in
MPLAB IDE, or the default -mconst-in-code option is specified on the
MPLAB C30 command line.
uninitialized sections to be cleared, and all initialized sections to be initialized
with values read from program memory. The data initialization template is
created by the linker, and supports the standard sections listed in
Section 4.4 “Code and Data Sections”, as well as the user-defined sections.
The persistent data section .pbss is never cleared or initialized.
DS51284F-page 67

Related parts for SW006012