SW006015 Microchip Technology, SW006015 Datasheet - Page 55

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
4.1
4.2
4.3
4.4
© 2007 Microchip Technology Inc.
INTRODUCTION
HIGHLIGHTS
GENERIC PROCESSOR HEADER FILE
PROCESSOR SUPPORT HEADER FILES
Chapter 4. Low Level Processor Control
This chapter discusses access to the low level registers and configuration of the
PIC32MX devices.
Items discussed in this chapter are:
• Generic Processor Header File
• Processor Support Header Files
• Peripheral Library Functions
• Special Function Register Access
• CP0 Register Access
• Configuration Bit Access
The generic processor header file is a C file that includes the correct processor-specific
header file based on the processor specified with the -mprocessor command line
option. The generic processor header file is located in
c:\Program Files\Microchip\MPLAB C32\pic32mx\include, where
c:\Program Files\Microchip\MPLAB C32 is the directory in which the MPLAB
C32 toolchain was installed. Besides including the correct processor-specific header
file, the generic processor header file also provides #defines which allow the use of
conventional register names from within assembly language files.
To include the generic processor header file, use the following from within your source
code:
#include <p32xxxx.h>
Inclusion of the generic processor header file allows your source code to be compiled
for any of the processors supported by the MPLAB C32 toolchain without having to
change the file which is being included.
The processor-specific header files are files that contain external declarations for the
Special Function Registers (SFRs) for use in either C or assembly. By convention, each
SFR is named using the same name that appears in the data sheet – for example,
WDTCON for the watchdog timer control register. If the register has individual bits that
may be of interest, there is also be a structure typedef defined for that SFR, where
the name of the structure typedef is the name of the register with bits_t appended
– for example, __WDTCONbits_t. The individual bits (or bit fields) are named in the
structure using the names in the data sheet. For example in the PIC32MX360F512L
processor-specific header file, the WDTCON register for use with C is declared as:
MPLAB
®
C32 C COMPILER
USER’S GUIDE
DS51686A-page 51

Related parts for SW006015