Next:
Contents
 
Contents
 
Index
SDCC Compiler User Guide
$Date: 2003/08/29 09:46:05 $
$Revision: 1.68 $
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 Installing SDCC
2.1 Configure Options
2.2 Install paths
2.3 Search Paths
2.4 Building SDCC
2.4.1 Building SDCC on Linux
2.4.2 Building SDCC on OSX 2.x
2.4.3 Cross compiling SDCC on Linux for Windows
2.4.4 Building SDCC on Windows
2.4.5 Building SDCC using Cygwin and Mingw32
2.4.6 Building SDCC Using Microsoft Visual C++ 6.0/NET (MSVC)
2.4.7 Building SDCC Using Borland
2.4.8 Windows Install Using a Binary Package
2.5 Building the Documentation
2.6 Testing the SDCC Compiler
2.7 Install Trouble-shooting
2.7.1 SDCC does not build correctly.
2.7.2 What the ''./configure'' does
2.7.3 What the ''make'' does.
2.7.4 What the ''make install'' command does.
2.8 Components of SDCC
2.8.1 sdcc - The Compiler
2.8.2 sdcpp - The C-Preprocessor
2.8.3 asx8051, as-z80, as-gbz80, aslink, link-z80, link-gbz80 - The Assemblers and Linkage Editors
2.8.4 s51 - The 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 Z80 Options
3.2.7 Optimization Options
3.2.8 Other Options
3.2.9 Intermediate Dump Options
3.2.10 Redirecting output on Windows Shells
3.3 Environment variables
3.4 MCS51/DS390 Storage Class Language Extensions
3.4.1 data
3.4.2 xdata
3.4.3 idata
3.4.4 pdata
3.4.5 code
3.4.6 bit
3.4.7 sfr / sbit
3.4.8 Pointers to MCS51/DS390 specific memory spaces
3.5 Absolute Addressing
3.6 Parameters & Local Variables
3.7 Overlaying
3.8 Interrupt Service Routines
3.9 Critical Functions
3.10 Naked Functions
3.11 Functions using private banks
3.12 Startup Code
3.13 Inline Assembler Code
3.14 Interfacing with Assembler Code
3.14.1 Global Registers used for Parameter Passing
3.14.2 Assembler Routine(non-reentrant)
3.14.3 Assembler Routine(reentrant)
3.15 int (16 bit) and long (32 bit) Support
3.16 Floating Point Support
3.17 MCS51 Memory Models
3.18 DS390 Memory Models
3.19 Pragmas
3.20 Defines Created by the Compiler
4 Debugging with SDCDB
4.1 Compiling for Debugging
4.2 How the Debugger Works
4.3 Starting the Debugger
4.4 Command Line Options.
4.5 Debugger Commands.
break [line | file:line | function | file:function]
clear [line | file:line | function | file:function ]
continue
finish
delete [n]
info [break | stack | frame | registers ]
step
next
run
ptype variable
print variable
file filename
frame
set srcmode
! simulator command
quit.
4.6 Interfacing with XEmacs.
5 TIPS
5.1 Notes on MCS51 memory layout
5.2 Tools included in the distribution
5.3 Related open source tools
5.4 Related documentation / recommended reading
6 Support
6.1 Reporting Bugs
6.2 Requesting Features
6.3 Getting Help
6.4 ChangeLog
6.5 Release policy
6.6 Examples
6.7 Quality control
7 SDCC Technical Data
7.1 Optimizations
7.1.1 Sub-expression Elimination
7.1.2 Dead-Code Elimination
7.1.3 Copy-Propagation
7.1.4 Loop Optimizations
7.1.5 Loop Reversing
7.1.6 Algebraic Simplifications
7.1.7 'switch' Statements
7.1.8 Bit-shifting Operations.
7.1.9 Bit-rotation
7.1.10 Highest Order Bit
7.1.11 Peephole Optimizer
7.2 Library Routines
7.3 External Stack
7.4 ANSI-Compliance
7.5 Cyclomatic Complexity
7.6 Other Processors
7.6.1 MCS51 variants
pdata access by SFR
Other Features available by SFR
7.6.2 The Z80 and gbz80 port
7.7 Retargetting for other MCUs.
8 Compiler internals
8.1 The anatomy of the compiler
Parsing
Generating iCode
Optimizations.
Live range analysis
Register Allocation
Code generation
ICode Example
8.2 A few words about basic block successors, predecessors and dominators
9 Acknowledgments
10 Alphabetical index
Index
About this document ...
Bernhard Held 2003-08-29