SW006012 Microchip Technology, SW006012 Datasheet - Page 204

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
MPLAB
D.13 PRAGMAS
DS51284F-page 198
®
C30 User’s Guide
MPLAB C18 uses pragmas for sections (code, romdata, udata, idata), interrupts
(high-priority and low-priority) and variable locations (bank, section).
MPLAB C30 uses non-ANSI attributes instead of pragmas.
TABLE D-5:
EXAMPLE D-4:
EXAMPLE D-5:
EXAMPLE D-6:
#pragma udata [name]
#pragma idata [name]
#pragma romdata [name]
#pragma code [name]
#pragma interruptlow
#pragma interrupt
#pragma varlocate bank
#pragma varlocate name
*dsPIC
C18
C30
C18
C30
C18
C30
Note:
Pragma (MPLAB C18)
®
#pragma udata mybss
int __attribute__((__section__(".mybss"))) gi;
#pragma idata myDataSection=0x100;
int __attribute__((address(0x100))) Mabonga = 1;
#pragma romdata const_table
const rom char my_const_array[10] =
const __attribute__((space(auto_psv)))
DSC devices do not have banks.
int gi;
int Mabonga = 1;
The MPLAB C30 compiler does not directly support accessing variables in
program space. Variables so allocated must be explicitly accessed by the
programmer, usually using table-access inline assembly instructions, or
using the program space visibility window. See Section 4.15 “Program
Space Visibility (PSV) Usage” for more on the PSV window.
{0,1,2,3,4,5,6,7,8,9};
char my_const_array[10] = {0,1,2,3,4,5,6,7,8,9};
MPLAB
SPECIFY AN UNINITIALIZED VARIABLE IN A USER SECTION
IN DATA MEMORY
DATA MEMORY
SPECIFY A VARIABLE TO BE PLACED IN PROGRAM
MEMORY
LOCATE THE VARIABLE MABONGA AT ADDRESS 0X100 IN
®
C18 PRAGMAS VS. MPLAB C30 ATTRIBUTES
__
__
__
__
__
__
__
NA*
NA*
attribute
attribute
attribute
attribute
attribute
attribute
attribute
Attribute (MPLAB C30)
__
__
__
__
__
__
__
((section ("name")))
((section ("name")))
((space (prog)))
((section ("name"))),
((space (prog)))
((interrupt))
((interrupt, shadow))
© 2007 Microchip Technology Inc.

Related parts for SW006012