Small Device C Compiler

Small Device C CompilerDeveloper(s)| Sandeep Dutta and others

|

Stable release|

4.4.0 / January 29, 2024; 2 years ago (2024-01-29)

Operating system| Microsoft Windows, macOS, Linux
Type| C compiler
License| GPL

The Small Device C Compiler (SDCC) is a free-software, partially retargetable[1] C compiler for 8-bit microcontrollers. It is distributed under the GNU General Public License. The package also contains an assembler, linker, simulator and debugger. SDCC is a popular open-source C compiler for microcontrollers compatible with Intel 8051/MCS-51.[2][3][4]

## Contents

* 1 Supported hosts
* 2 Supported targets
* 3 See also
* 4 References
* 5 External links

## Supported hosts

Sources, documentation, and binaries are available for Linux (32-bit and 64-bit), macOS (PPC and 64-bit), and Windows (32-bit and 64-bit).

## Supported targets

The following include binary compatible derivatives:

* Intel 8031, 8032, 8051, 8052; Maxim/Dallas DS80C390; C8051
* Motorola/Freescale/NXP 68HC08 and S08
* Padauk PDK14 and PDK15[5]
* Sharp SM83, the CPU found in the Nintendo Game Boy LR35902 SoC
* STMicroelectronics STM8
* Zilog Z80, Z180, eZ80 in Z80 mode; Rabbit Semiconductor 2000, 2000A, 3000, 3000A, 4000, 6000; Toshiba TLCS-90; Z80N (ZX Spectrum Next processor), R800.
* MOS Technology 6502, WDC 65C02.

Work in progress:

* Microchip PIC16 and PIC18.[6][7]
* Padauk PDK13.

Obsolete:

* AVR microcontrollers used to be a supported target, but was made obsolete by avr-gcc in 2010 (SDCC 3.0.0).

## See also

* Z88DK \- C compiler for Z80-based systems
* cc65 \- C compiler for 6502/65C02 systems

## References

1. ↑ Rainer Leupers, Peter Marwedel: "Retargetable Compiler Technology for Embedded Systems: Tools and Applications", page 126. Springer, 2001
2. ↑ "Porting Contiki Operating System to RIEST2430" by Juan Wang, Wei Ma, and Dan Liu, published in "Emerging Intelligent Computing Technology and Applications", 2012, p. 383: "Due to the 8051 MCU’s unique characteristics, there are only a handful of toolchains available. The most noteworthy open source solution is the Small Device C Compiler (SDCC)."
3. ↑ Lewin Edwards "Open-Source Robotics and Process Control Cookbook: Designing and Building Robust, Dependable Real-time Systems", 2005, p. 15: "Worse still, the only halfway decent open-source C compiler for the 8051 (sdcc) is exactly that—only halfway decent."
4. ↑ Lewin A. R. W. Edwards (2006). So, You Wanna be an Embedded Engineer: The Guide to Embedded Engineering, from Consultancy to the Corporate Ladder. p. 51. https://archive.org/details/pdfy-MKFMCCNbqENoR3Ft. : "I personally prefer to use the free compiler package, sdcc. This is unquestionably the poor man's choice of 8051 C compilers, ... in any case, sdcc is perfectly adequate for hobbyist, low-volume and/or educational projects."
5. ↑ Padauk website
6. ↑ "SDCC - Small Device C Compiler". https://sdcc.sourceforge.net/.
7. ↑ Setting up the free compiler SDCC at MPLABX, Google Sites

## External links

* Small Device C Compiler on SourceForge.net
* Sandeep Dutta - Anatomy of a Compiler. A Retargetable ANSI-C Compiler. "Circuit Cellar", issue 121, August 2000, page 35
* SDCC Open Knowledge Resource
* SDCC Open Knowledge Resource
* FOSDEM 2015 presentation on SDCC
* FOSDEM 2024 presentation on SDCC
* A port of FreeRTOS to 8051
* Using SDCC on the AT89C52 (8051 derivative)
* Using SDCC for PIC on Windows with MPLABX

* v
* t
* e

C programming language

* ANSI C
* C89 and C90
* C99
* C11
* C18
* C2x
* Embedded C
* MISRA C

Features|

* Functions
* Header files
* Libraries
* Operators
* String
* Syntax
* Preprocessor
* Data types

Standard library
functions|

* Char (ctype.h)
* File I/O (stdio.h)
* Math (math.h)
* Dynamic memory (stdlib.h)
* String (string.h)
* Time (time.h)
* Variadic (stdarg.h)
* POSIX

Standard
libraries|

* Bionic
* libhybris
* dietlibc
* EGLIBC
* glibc
* klibc
* Microsoft Run-time Library
* musl
* Newlib
* uClibc
* BSD libc

Compilers|

* Comparison of compilers
* ACK
* Borland Turbo C
* Clang
* GCC
* ICC
* LCC
* PCC
* SDCC
* TCC
* Microsoft Visual Studio / Express / C++
* Watcom C/C++

IDEs|

* Comparison of IDEs
* Anjuta
* Code
* CodeLite
* Eclipse
* Geany
* Microsoft Visual Studio
* NetBeans

Comparison with
other languages|

* Compatibility of C and C++
* Comparison with Embedded C
* Comparison with Pascal
* Comparison of programming languages

Descendant
languages|

* C++
* C#
* D
* Objective-C
* Alef
* Limbo
* Go
* Vala

* Category

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Small Device C Compiler. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:Small_Device_C_Compiler&oldid=3977273"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template