Next:
Contents
 
Contents
 
Index
SDCC Compiler User Guide
Contents
1. Introduction
1.1 About SDCC
1.2 Open Source
1.3 Typographic conventions
1.4 Compatibility with previous versions
1.5 System Requirements
1.6 Other Resources
1.7 Wishes for the future
2. Installation
2.1 Linux/Unix Installation
2.2 Windows Installation
2.2.1 Windows Install Using a Binary Package
2.2.2 Windows Install Using Cygwin
2.3 Testing out the SDCC Compiler
2.4 Install Trouble-shooting
2.4.1 SDCC cannot find libraries or header files.
2.4.2 SDCC does not compile correctly.
2.4.3 What the ''./configure'' does
2.4.4 What the ''make'' does.
2.4.5 What the ''make install'' command does.
2.5 Additional Information for Windows Users
2.5.1 Getting started with Cygwin
2.5.2 Running SDCC as Native Compiled Executables
2.6 SDCC on Other Platforms
2.7 Advanced Install Options
2.8 Components of SDCC
2.8.1 sdcc - The Compiler
2.8.2 sdcpp (C-Preprocessor)
2.8.3 asx8051, as-z80, as-gbz80, aslink, link-z80, link-gbz80 (The Assemblers and Linkage Editors)
2.8.4 s51 - Simulator
2.8.5 sdcdb - Source Level Debugger
3. Using SDCC
3.1 Compiling
3.1.1 Single Source File Projects
3.1.2 Projects with Multiple Source Files
3.1.3 Projects with Additional Libraries
3.2 Command Line Options
3.2.1 Processor Selection Options
3.2.2 Preprocessor Options
3.2.3 Linker Options
3.2.4 MCS51 Options
3.2.5 DS390 Options
3.2.6 Optimization Options
3.2.7 Other Options
3.2.8 Intermediate Dump Options
3.3 MCS51/DS390 Storage Class Language Extensions
3.3.1 xdata
3.3.2 data
3.3.3 idata
3.3.4 bit
3.3.5 sfr / sbit
3.4 Pointers
3.5 Parameters & Local Variables
3.6 Overlaying
3.7 Interrupt Service Routines
3.8 Critical Functions
3.9 Naked Functions
3.10 Functions using private banks
3.11 Absolute Addressing
3.12 Startup Code
3.13 Inline Assembler Code
3.14 int(16 bit) and long (32 bit) Support
3.15 Floating Point Support
3.16 MCS51 Memory Models
3.17 DS390 Memory Models
3.18 Defines Created by the Compiler
4. SDCC Technical Data
4.1 Optimizations
4.1.1 Sub-expression Elimination
4.1.2 Dead-Code Elimination
4.1.3 Copy-Propagation
4.1.4 Loop Optimizations
4.1.5 Loop Reversing
4.1.6 Algebraic Simplifications
4.1.7 'switch' Statements
4.1.8 Bit-shifting Operations.
4.1.9 Bit-rotation
4.1.10 Highest Order Bit
4.1.11 Peep-hole Optimizer
4.2 Pragmas
4.3
<pending: this is messy and incomplete>
Library Routines
4.4 Interfacing with Assembly Routines
4.4.1 Global Registers used for Parameter Passing
4.4.2 Assembler Routine(non-reentrant)
4.4.3 Assembler Routine(reentrant)
4.5 External Stack
4.6 ANSI-Compliance
4.7 Cyclomatic Complexity
5. TIPS
5.1 Notes on MCS51 memory layout
6. Retargetting for other MCUs.
7. SDCDB - Source Level Debugger
7.1 Compiling for Debugging
7.2 How the Debugger Works
7.3 Starting the Debugger
7.4 Command Line Options.
7.5 Debugger Commands.
7.5.1 break [line | file:line | function | file:function]
7.5.2 clear [line | file:line | function | file:function ]
7.5.3 continue
7.5.4 finish
7.5.5 delete [n]
7.5.6 info [break | stack | frame | registers ]
7.5.7 step
7.5.8 next
7.5.9 run
7.5.10 ptype variable
7.5.11 print variable
7.5.12 file filename
7.5.13 frame
7.5.14 set srcmode
7.5.15 ! simulator command
7.5.16 quit.
7.6 Interfacing with XEmacs.
8. Other Processors
8.1 The Z80 and gbz80 port
9. Support
9.1 Reporting Bugs
10. Acknowledgments
Index
About this document ...
Johan Knol
2001-07-13