Edge Rewrite
// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a40b42a79fa6d945

Jump to content

Small Device C Compiler

From Wikipedia, the free encyclopedia
Small Device C Compiler
DevelopersSandeep Dutta and others
Stable release
4.6.0[1] / June 22, 2026; 3 months ago (2026-06-22)
Operating systemMicrosoft Windows, macOS, Linux
TypeC compiler
LicenseGPL
Websitesdcc.sf.net Edit this on Wikidata
Repository

The Small Device C Compiler (SDCC) is a free-software, partially retargetable[2] 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.[3][4][5]

Version 4.6.0 added e.g. "C2y _Countof operator", octal, and if-declaration, "Conditional operator with omitted second operand (originally a GNU extension)"; C23 compound literals with storage class specifiers and "C23 constexpr (mostly)"[1]


Supported hosts

[edit]

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

[edit]

The following include binary compatible derivatives:

Work in progress:

Obsolete:

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

See also

[edit]
  • Z88DK - C compiler for Z80 / 8080 / 8085 systems
  • cc65 - C compiler for 6502 / 65C02 systems

References

[edit]
  1. 1 2 "Small Device C Compiler (SDCC) / News: SDCC 4.6.0 released". sourceforge.net. Retrieved 2026-09-04.
  2. ↑ Rainer Leupers, Peter Marwedel: "Retargetable Compiler Technology for Embedded Systems: Tools and Applications", page 126. Springer, 2001
  3. ↑ "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)."
  4. ↑ 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."
  5. ↑ 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.: "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."
  6. ↑ Padauk website
  7. ↑ "SDCC - Small Device C Compiler". Retrieved 2013-01-20.
  8. ↑ Setting up the free compiler SDCC at MPLABX, Google Sites
[edit]