07.04.2013 Views

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>MPLAB</strong> ® C COMPILER FOR<br />

<strong>PIC24</strong> <strong>MCUs</strong> AND <strong>dsPIC</strong> ® <strong>DSCs</strong><br />

USER’S GUIDE<br />

Table of Contents<br />

Preface ........................................................................................................................... 1<br />

Chapter 1. <strong>Compiler</strong> Overview<br />

1.1 Introduction ..................................................................................................... 7<br />

1.2 Highlights ........................................................................................................ 7<br />

1.3 <strong>Compiler</strong> Description <strong>and</strong> Documentation ...................................................... 7<br />

1.4 <strong>Compiler</strong> <strong>and</strong> Other Development Tools ........................................................ 8<br />

1.5 <strong>Compiler</strong> Feature Set ..................................................................................... 9<br />

Chapter 2. Differences Between 16-Bit Device C <strong>and</strong> ANSI C<br />

2.1 Introduction ................................................................................................... 11<br />

2.2 Highlights ...................................................................................................... 11<br />

2.3 Keyword Differences .................................................................................... 11<br />

2.4 Statement Differences .................................................................................. 30<br />

2.5 Expression Differences ................................................................................ 32<br />

Chapter 3. Using the <strong>Compiler</strong> on the Comm<strong>and</strong> Line<br />

3.1 Introduction ................................................................................................... 33<br />

3.2 Highlights ...................................................................................................... 33<br />

3.3 Overview ...................................................................................................... 33<br />

3.4 File Naming Conventions ............................................................................. 34<br />

3.5 Options ......................................................................................................... 34<br />

3.6 Environment Variables ................................................................................. 59<br />

3.7 Predefined Macro Names ............................................................................. 60<br />

3.8 Compiling a Single File on the Comm<strong>and</strong> Line ............................................ 60<br />

3.9 Compiling Multiple Files on the Comm<strong>and</strong> Line ........................................... 61<br />

3.10 Notable Symbols ........................................................................................ 62<br />

Chapter 4. Run Time Environment<br />

4.1 Introduction ................................................................................................... 63<br />

4.2 Highlights ...................................................................................................... 63<br />

4.3 Address Spaces ........................................................................................... 63<br />

4.4 Startup <strong>and</strong> Initialization ............................................................................... 64<br />

4.5 Memory Spaces ........................................................................................... 65<br />

4.6 Memory Models ............................................................................................ 66<br />

4.7 Locating Code <strong>and</strong> Data ............................................................................... 68<br />

4.8 Software Stack ............................................................................................. 69<br />

4.9 The C Stack Usage ...................................................................................... 70<br />

4.10 The C Heap Usage ..................................................................................... 72<br />

4.11 Function Call Conventions ......................................................................... 73<br />

4.12 Register Conventions ................................................................................. 75<br />

© 2008 <strong>Microchip</strong> Technology Inc. DS51284H-page iii

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!