The Small Device C Compiler (SDCC) is a
free-software
Free software, libre software, libreware sometimes known as freedom-respecting software is computer software distributed under terms that allow users to run the software for any purpose as well as to study, change, distribute it and any adapted ...
, partially
retargetable C compiler
In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
for 8-bit
microcontroller
A microcontroller (MC, uC, or μC) or microcontroller unit (MCU) is a small computer on a single integrated circuit. A microcontroller contains one or more CPUs (processor cores) along with memory and programmable input/output peripherals. Pro ...
s. It is distributed under the
GNU General Public License
The GNU General Public Licenses (GNU GPL or simply GPL) are a series of widely used free software licenses, or ''copyleft'' licenses, that guarantee end users the freedom to run, study, share, or modify the software. The GPL was the first ...
. The package also contains an
assembler,
linker
Linker or linkers may refer to:
Computing
* Linker (computing), a computer program that takes one or more object files generated by a compiler or generated by an assembler and links them with libraries, generating an executable program or shar ...
,
simulator
A simulation is an imitative representation of a process or system that could exist in the real world. In this broad sense, simulation can often be used interchangeably with model. Sometimes a clear distinction between the two terms is made, in ...
and
debugger
A debugger is a computer program used to test and debug other programs (the "target" programs). Common features of debuggers include the ability to run or halt the target program using breakpoints, step through code line by line, and display ...
. SDCC is a popular open-source C compiler for microcontrollers compatible with
Intel 8051/MCS-51.
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
Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California, and Delaware General Corporation Law, incorporated in Delaware. Intel designs, manufactures, and sells computer compo ...
8031, 8032,
8051
The Intel MCS-51 (commonly termed 8051) is a single-chip microcontroller (MCU) series developed by Intel in 1980 for use in embedded systems. The architect of the Intel MCS-51 instruction set was John H. Wharton.. Intel's original versions w ...
, 8052;
Maxim
Maxim or Maksim may refer to:
Entertainment
*Maxim (magazine), ''Maxim'' (magazine), an international men's magazine
** Maxim (Australia), ''Maxim'' (Australia), the Australian edition
** Maxim (India), ''Maxim'' (India), the Indian edition
*Maxim ...
/Dallas DS80C390;
C8051
*
Motorola
Motorola, Inc. () was an American multinational telecommunications company based in Schaumburg, Illinois. It was founded by brothers Paul and Joseph Galvin in 1928 and had been named Motorola since 1947. Many of Motorola's products had been ...
/
Freescale
Freescale Semiconductor, Inc. was an American semiconductor manufacturer. It was created by the divestiture of the Semiconductor Products Sector of Motorola in 2004. Freescale focused their integrated circuit products on the automotive, embedde ...
/
NXP 68HC08 and
S08
* Padauk PDK14 and PDK15
*
Sharp SM83, the CPU found in the
Nintendo Game Boy LR35902
SoC
*
STMicroelectronics
STMicroelectronics Naamloze vennootschap, NV (commonly referred to as ST or STMicro) is a European multinational corporation, multinational semiconductor contract manufacturing and design company. It is the largest of such companies in Europe. ...
STM8
The STM8 is an 8-bit microcontroller family by STMicroelectronics. The STM8 microcontrollers use an extended variant of the ST6 and ST7, ST7 microcontroller architecture. STM8 microcontrollers are particularly low cost for a full-featured 8-bit m ...
*
Zilog
Zilog, Inc. is an American manufacturer of microprocessors, microcontrollers, and application-specific embedded System on a chip, system-on-chip (SoC) products.
The company was founded in 1974 by Federico Faggin and Ralph Ungermann, who were soo ...
Z80
The Zilog Z80 is an 8-bit microprocessor designed by Zilog that played an important role in the evolution of early personal computing. Launched in 1976, it was designed to be software-compatible with the Intel 8080, offering a compelling altern ...
,
Z180,
eZ80 in Z80 mode;
Rabbit Semiconductor 2000
2000 was designated as the International Year for the Culture of Peace and the World Mathematics, Mathematical Year.
Popular culture holds the year 2000 as the first year of the 21st century and the 3rd millennium, because of a tende ...
, 2000A, 3000, 3000A, 4000, 6000;
Toshiba
is a Japanese multinational electronics company headquartered in Minato, Tokyo. Its diversified products and services include power, industrial and social infrastructure systems, elevators and escalators, electronic components, semiconductors ...
TLCS-90; Z80N (
ZX Spectrum Next processor),
R800
The R800 is the central processing unit used in the MSX Turbo-R home computer. The R800 was designed by ASCII Corporation of Japan and built by Mitsui & Co The goal was a modern and pipelined CPU binary compatible with the Z80, and therefore ...
.
*
MOS Technology 6502
The MOS Technology 6502 (typically pronounced "sixty-five-oh-two" or "six-five-oh-two") William Mensch and the moderator both pronounce the 6502 microprocessor as ''"sixty-five-oh-two"''. is an 8-bit computing, 8-bit microprocessor that was desi ...
,
WDC 65C02
The Western Design Center (WDC) 65C02 microprocessor is an enhanced CMOS version of the popular nMOS-based 8-bit MOS Technology 6502. It uses less power than the original 6502, fixes several problems, and adds new instructions and addressing ...
.
Work in progress:
*
Microchip
An integrated circuit (IC), also known as a microchip or simply chip, is a set of electronic circuits, consisting of various electronic components (such as transistors, resistors, and capacitors) and their interconnections. These components a ...
PIC16 and
PIC18
PIC (usually pronounced as /pɪk/) is a family of microcontrollers made by Microchip Technology, derived from the PIC1640 originally developed by General Instrument's Microelectronics Division. The name PIC initially referred to ''Periphera ...
.
Setting up the free compiler SDCC at MPLABX
Google Sites
* Padauk PDK13.
Obsolete:
* AVR microcontrollers
AVR is a family of microcontrollers developed since 1996 by Atmel, acquired by Microchip Technology in 2016. They are 8-bit RISC single-chip microcontrollers based on a modified Harvard architecture. AVR was one of the first microcontrolle ...
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
External links
SDCC homepage
Sandeep Dutta - Anatomy of a Compiler. A Retargetable ANSI-C Compiler. "Circuit Cellar", issue 121, August 2000, page 35
SDCC Open Knowledge Resource
FOSDEM 2015 presentation on SDCC
FOSDEM 2024 presentation on SDCC
Using SDCC on the AT89C52 (8051 derivative)
Using SDCC for PIC on Windows with MPLABX
C (programming language) compilers
Cross-compilers
Free and open source compilers
{{programming-software-stub