SDCC

Small Device C Compiler

What is SDCC ?

SDCC is a Freeware , retargettable, optimizing ANSI - C compiler. The current version targets the Intel 8051 and recently the Zilog Z80 based MCUs. SDCC can be retargeted for other 8 bit MCUs or PICs and some day soon will be. The  entire source code for the compiler is distributed under GPL. SDCC uses ASXXXX and ASLINK a Freeware, retargettable assembler and linker. SDCC has extensive MCU specific language extensions, which lets it utilize the underlying hardware effectively. The front end (parser) will be enhanced to handle language extensions for other MCUs as and when they are targeted. 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 and propagation, copy propagation, dead code elimination and jump tables 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 short (8 bits, 1 byte), char (8 bits, 1 byte) , int (16 bits, 2 bytes ), long (32 bit, 4 bytes) and float (4 byte IEEE).  SDCC also comes with the source level debugger SDCDB, the current version of the debugger uses Daniel's s51 simulator. 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 to report the relative complexity of a function, these functions can then be further optimized , or hand coded in assembly if need be.

SDCC was written by Sandeep Dutta and released under the GPL license. Since it's 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 from all the users and developer's input. Michael Hope has done the porting of SDCC to the Z80. As of January 2000, Sandeep has started porting to the Atmel AVR MCU and is making good headway.

Who is SDCC ?

What Platforms are Supported ?

Currently Linux (and other unices) and MS-Windows are supported. SDCC will compile natively on Linux using gcc. Windows 95/NT users will need to download the full development version of CYGWIN32 from http://sourceware.cygnus.com/cygwin/.

Note: Cygnus distributes CYGWIN32 in two packages you will need the full development package, this contains the compiler and other utilities that you will need to compile SDCC, compiling the system with any other compiler under MS/Windows has not been tried.

Note: It has been reported recently that an older version 2.1.9Ca has been compiled on the win32 platform with a copy of Borland C++. More as the story unfolds.

Downloading SDCC

The SDCC source tree is currently located at SourceForge.

The current version is 2.1.9Ga:

You can also browse the archives

The CVS tree for all current development of SDCC can be accessed at:
CVSROOT=:pserver:anonymous@sdcc.sourceforge.net:/cvsroot/sdcc
The password is empty and pressing [ENTER] will get you in.

You can browse our CVS tree here.

SourceForge has further documentation on accessing a CVS tree here.
Michael Hope has written some help on accessing CVS trees from a Win32 box and is available here.
This link includes a binary and step by step instructions. The CVSROOT address will need to be changed to the one above.

Recent NEWS

SDCC v2.2.0 is coming soon. As of February 27, 2000, work on v2.2.0 is moving along but there are still a few compile problems to be worked out. Sandeep expects the next release possibly in March. This will be a big step in the development of SDCC as it will now support the Z80. The next few 2.x releases will be mostly bug fixes (if there are any ;-) and speed improvements.

Support for SDCC

SDCC and the included support packages come with fair amounts of documentation and examples. When that isn't enough, you can find help in the following places:

Links

PcGenerator EpromProgrammer,Pic24C and more...
Sensorella
- Dual 8051 board and lots of I/O.
Goofee - Graphical Object Orientation, very different, very interesting.
Systronix - Makers of the STEP and the TINI (a must see for embedded ethernet and Dallas 390's)
Programmers Heaven - 8051 resources, sample code and compilers
KD0YU.COM - Misc stuff
8052.COM - resources, sample code.

The 8051 Web Ring

Embedded Ethernet Links

Embedded Ethernet - small board supports the CS8900A, plus code for the AVR and the PIC 17Cxx chips.

Werner Cornelius has a web page devoted to embedding the RealTek RTL8019AS ethernet controller chip into a microcontroller. Lots of small tips on wiring, what to do, and what not to do.


This Site Hosted by

Webmaster

Last updated: Thursday, March 09, 2000