SW006013 Microchip Technology, SW006013 Datasheet - Page 194

MPLAB C Compiler For DsPIC DSCs

SW006013

Manufacturer Part Number
SW006013
Description
MPLAB C Compiler For DsPIC DSCs
Manufacturer
Microchip Technology
Series
DsPIC30F/33Fr
Type
MPLAB® C Compilerr
Datasheet

Specifications of SW006013

Supported Families
DsPIC30F, DsPIC33F
Core Architecture
DsPIC
Kit Contents
Software And Docs
Mcu Supported Families
DsPIC30F And DsPIC33F
Tool Function
Compiler
Tool Type
Compiler
Processor Series
dsPIC
Lead Free Status / RoHS Status
na
For Use With/related Products
dSPIC DSCs
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
4.2
DS51456E-page 190
USING THE SUPPORT FUNCTIONS
Building an application which utilizes the support functions requires two types of files:
header files and library files.
• Rebuilding the libpic30-omf.a library
4.2.1
All standard C library entities are declared or defined in one or more standard headers
(See list in Section 4.1.3 “Chapter Organization”.) To make use of a library entity in
a program, write an include directive that names the relevant standard header.
The contents of a standard header is included by naming it in an include directive, as in:
#include <libpic30.h> /* include dsPIC30F facilities */
The standard headers can be included in any order. Do not include a standard header
within a declaration. Do not define macros that have the same names as keywords
before including a standard header.
A standard header never includes another standard header.
4.2.2
The archived library files contain all the individual object files for each library function.
When linking an application, the library file must be provided as an input to the linker
(using the
application may be linked into the application.
A typical C application will require three library files:
libpic30-
more on OMF-specific libraries.) These libraries will be included automatically if linking
is performed using the compiler.
4.2.3
By default, the helper functions listed in this chapter were written to work with the
simulator. The header file,
simulator. It is provided so you can rebuild the libraries and continue to use the simu-
lator. However, your application should not use this interface since the simulator will not
be available to an embedded application.
The helper functions must be modified and rebuilt for your target application. The
libpic30-
has been provided with the sources in
command window. Be sure you are in the
compiled file (
Note:
Header Files
Library Files
--library
Rebuilding the libpic30-omf.a library
Some standard library functions require a heap. These include the standard
I/O functions that open files and the memory allocation functions. See the
“MPLAB
DSCs User’s Guide” (DS51317) and “MPLAB
MCUs and dsPIC
the heap.
omf
omf
libpic30-
.a
.a
. (See Section 1.2 “OMF-Specific Libraries/Start-up Modules” for
library can be rebuild with the batch file named
®
Assembler, Linker and Utilities for PIC24 MCUs and dsPIC
or
-l
omf
simio.h
linker option) such that the functions used by the
®
.a
DSCs User’s Guide” (DS51284) for more information on
) into the lib directory.
, defines the interface between the library and the
src\pic30
src\pic30
. Execute the batch file from a
libc-
directory. Then copy the newly
®
© 2008 Microchip Technology Inc.
omf
C Compiler for PIC24
.a
makelib.bat
,
libm-
omf
.a
, which
, and
sim30
®

Related parts for SW006013