Next: 1.2 Open Source
Up: 1. Introduction
Previous: 1. Introduction
  Contents
  Index
SDCC is a Freeware, retargettable, optimizing ANSI-C compiler
by Sandeep Dutta designed for 8 bit Microprocessors. The
current version targets Intel MCS51 based Microprocessors(8051,8052,
etc), Zilog Z80 based MCUs, and the Dallas DS80C390 variant. It can
be retargetted for other microprocessors, support for PIC, AVR and
186 is under development. The entire source code for the compiler
is distributed under GPL. SDCC uses ASXXXX & ASLINK, a Freeware,
retargettable assembler & linker. SDCC has extensive language extensions
suitable for utilizing various microcontrollers and underlying hardware
effectively.
In addition to the MCU specific optimizations SDCC also does a host
of standard optimizations like:
- global sub expression elimination,
- loop optimizations (loop invariant, strength reduction of induction
variables and loop reversing),
- constant folding & propagation,
- copy propagation,
- dead code elimination
- jumptables for switch statements.
For the back-end SDCC uses a global register allocation scheme which
should be well suited for other 8 bit MCUs.
The peep hole optimizer uses a rule based substitution mechanism which
is MCU independent.
Supported data-types are:
- char (8 bits, 1 byte),
- short and int (16 bits, 2 bytes),
- long (32 bit, 4 bytes)
- float (4 byte IEEE).
The compiler also allows inline assembler code to be embedded
anywhere in a function. In addition, routines developed in assembly
can also be called.
SDCC also provides an option (-cyclomatic) to report the relative
complexity of a function. These functions can then be further optimized,
or hand coded in assembly if needed.
SDCC also comes with a companion source level debugger SDCDB, the
debugger currently uses ucSim a freeware simulator for 8051 and other
micro-controllers.
The latest version can be downloaded from http://sdcc.sourceforge.net/.
Next: 1.2 Open Source
Up: 1. Introduction
Previous: 1. Introduction
  Contents
  Index
Johan Knol
2001-07-13