What is SDCC?
-------------

SDCC is a retargettable, optimizing Standard C (ANSI C89, ISO C99, ISO C11) compiler suite that targets the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.), Maxim (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola) HC08 based (hc08, s08), Zilog Z80 based MCUs (Z80, Z180, SM83, Rabbit 2000, 2000A, 3000A, TLCS-90), Padauk (pdk14, pdk15) and STMicroelectronics STM8. Work is in progress on supporting the Padauk pdk13 and MOS 6502 targets; Microchip PIC16 and PIC18 targets are unmaintained. SDCC can be retargeted for other microprocessors.

SDCC suite is a collection of several components derived from different sources with different FOSS licenses. SDCC compiler suite include:

    sdas and sdld, a retargettable assembler and linker, based on ASXXXX, written by Alan Baldwin; (GPL).
    sdcpp preprocessor, based on GCC cpp; (GPL).
    ucsim simulators, originally written by Daniel Drotos; (GPL).
    sdcdb source level debugger, originally written by Sandeep Dutta; (GPL).
    sdbinutils library archive utilities, including sdar, sdranlib and sdnm, derived from GNU Binutils; (GPL)
    SDCC run-time libraries; (GPL+LE). Pic device libraries and header files are derived from Microchip header (.inc) and linker script (.lkr) files. Microchip requires that "The header files should state that they are only to be used with authentic Microchip devices" which makes them incompatible with the GPL.
    gcc-test regression tests, derived from gcc-testsuite; (no license explicitely specified, but since it is a part of GCC is probably GPL licensed)
    packihx; (public domain)
    makebin; (zlib/libpng License)
    sdcc C compiler, originally written by Sandeep Dutta; (GPL). Some of the features include:
        extensive MCU specific language extensions, allowing effective use of the underlying hardware.
        a host of standard optimizations such as global sub expression elimination, loop optimizations (loop invariant, strength reduction of induction variables and loop reversing), constant folding and propagation, copy propagation, dead code elimination and jump tables for 'switch' statements.
        MCU specific optimizations, including a global register allocator.
        adaptable MCU specific backend that should be well suited for other 8 bit MCUs
        independent rule based peep hole optimizer.
        a full range of data types: char (8 bits, 1 byte), short (16 bits, 2 bytes), int (16 bits, 2 bytes), long (32 bit, 4 bytes), long long (64 bit, 8 bytes), float (4 byte IEEE) and _Bool/bool.
        the ability to add inline assembler code anywhere in a function.
        the ability to report on the complexity of a function to help decide what should be re-written in assembler.
        a good selection of automated regression tests.

SDCC was originally written by Sandeep Dutta and released under a GPL license. Since its initial release there have been numerous bug fixes and improvements. As of December 1999, the code was moved to SourceForge where all the "users turned developers" can access the same source tree. SDCC is constantly being updated with all the users' and developers' input.



SDCC - free open source, retargettable, optimizing ANSI-C compiler
------------------------------------------------------------------

Welcome to SDCC, free open source, retargettable, optimizing ANSI C
compiler suite that targets a growing list of processors including the
Intel MCS-51 based microprocessors (8031, 8032, 8051, 8052, etc.), Maxim
(formerly Dallas) DS80C390 variants, Freescale (formerly Motorola) HC08
based (hc08, s08), Zilog Z80 based MCUs (Z80, Z80N, Z180, SM83 (e.g. Game Boy),
Rabbit 2000, Rabbit 2000A/3000, Rabbit 3000A, TLCS-90), STMicroelectronics STM8
and Padauk PDK14 and PDk15.
Work is in progress on supporting the Padauk PDK13 and MOS 6502 targets.
There are unmaintained Microchip PIC16 and PIC18 targets.
It can be retargeted for other microprocessors.

See share/sdcc/doc/INSTALL.txt for the installation instructions for
the binary kits.

See the share/sdcc/doc directory for more documentation.

See http://sdcc.sourceforge.net/ for the latest information on sdcc.


Licenses:
~~~~~~~~~
SDCC compiler suite is a collection of several components derived from
different sources with different FOSS licenses. See the sdccman.pdf
document, chapter "SDCC Suite Licenses" for details.

The code or object files generated by SDCC suite are not licensed, so
they can be used in FLOSS or proprietary (closed source) applications.

The great majority of sdcc run-time libraries are licensed under the
GPLv2+LE which allows linking of sdcc run time libraries with
proprietary (closed source) applications.

Exception are pic device libraries and header files which are derived
from Microchip header (.inc) and linker script (.lkr) files. Microchip
requires that "The header files should state that they are only to be
used with authentic Microchip devices" which makes them incompatible
with the GPL. Pic device libraries and header files are located at
non-free/lib and non-free/include directories respectively. Sdcc should
be run with the --use-non-free command line option in order to include
the potentially non-free header files and libraries.

However: Many think that the Microchip requirement is not legally enforceable,
arguing that the header files only contain noncopyrightable facts.

See:

 http://www.gnu.org/copyleft/gpl.html

 http://sourceforge.net/apps/trac/sdcc/wiki/SDCC%20Library%20Licenses


Support:
~~~~~~~~
SDCC compiler suite is a collaborative effort between a group of
volunteers. Please feel free to report bugs via the Sourceforge bug
tracker, or to ask questions on the user mailing list. See:

 http://sourceforge.net/tracker/?atid=100599&group_id=599&func=browse

 http://sourceforge.net/mail/?group_id=599

Notes:
* The ds400, pic14 and pic16 are currently experimental, but work is in
progress. Please check http://sdcc.sourceforge.net/snap.php for snapshots.
* The TININative, avr and xa51 targets are no longer maintained.


Roadmap:
~~~~~~~~
COPYING    - GPL v2
debugger/  - sdcdb debugger
device/    - Device libraries and examples
doc/       - sdcc and target specific documentation
sdas/      - Assemblers and linkers, derived from asxxxx
sim/       - ucsim simulator
src/       - Source to the C compiler and targets
support/   - Libraries and apps that may not be provided by your system.


Authors and interested persons:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Sandeep Dutta (sandeep AT users.sourceforge.net)

* Jean Loius-VERN      <jlvern AT writeme.com>
* Daniel Drotos        <drdani AT mazsola.iit.uni-miskolc.hu>
* Kevin Vigor          <kevin AT vigor.nu>
* Johan Knol           <johan.knol AT iduna.nl>
* Scott Dattalo        <scott AT dattalo.com>
* Karl Bongers         <karl AT turbobit.com>
* Bernhard Held        <bernhard AT bernhardheld.de>
* Frieder Ferlemann    <frieder.ferlemann AT web.de>
* Jesus Calvino-Fraga  <jesusc AT ece.ubc.ca>
* Borut Razem          <borut.razem AT siol.net>
* Vangelis Rokas       <vrokas AT otenet.gr>
* Erik Petrich         <epetrich AT ivorytower.norman.ok.us>
* Paul Stoffregen      <paul AT pjrc.com>
* Michael Hope         <michaelh AT juju.net.nz> <nz_michaelh AT yahoo.com>
* Maarten Brock        <sourceforge.brock AT dse.nl>
* Raphael Neider       <RNeider AT web.de>
* Hans-Juergen Dorn    <hans.dorn AT apl-landau.de>
* Klaus Flittner       <klaus_flittner AT gmx.de>
* Philipp Klaus Krause <pkk AT spth.de>
* Leland Morrison      <enigmalee.AT.sourceforget.net>
* Molnar Karoly        <molnarkaroly AT users.sf.net>
* Ben Shi              <powerstudio1st AT 163.com>

SDCC includes code from:
* Alan Baldwin <baldwin AT shop-pdp.kent.edu>
   Initial version of ASXXXX and  ASLINK. 
* John Hartman <noice AT noicedebugger.com>
   Porting ASXXXX and ASLINK for 8051.
* Dmitry S. Obukhov <dso AT usa.net>
   malloc and serial I/O routines.
* Pascal Felber
   Some of the Z80 related files are borrowed from the Gameboy
   Development Kit (GBDK).
* The GCC development team http://gcc.gnu.org/
   for GNU C preprocessor, the basis of sdcpp preprocessor and
   gcc test suite, partially included into the SDCC regression test suite
* The GNU Binutils development team http://www.gnu.org/software/binutils/
   for GNU Binutils, the basis of sdbinutils
* Boost Community http://www.boost.org/
   for Boost C++ libraries used in sdcc compiler
* Timo Bingmann http://idlebox.net/2007/stx-btree/
   for TX B+ Tree C++ Template Classes used in sdcc compiler
* Malini Dutta <malini AT mediaone.net>
   Sandeep's wife, for her patience and support.



