Small Device C Compiler
   HOME

TheInfoList



OR:

The Small Device C Compiler (SDCC) is a
free-software Free software or libre software is computer software distributed under terms that allow users to run the software for any purpose as well as to study, change, and distribute it and any adapted versions. Free software is a matter of liberty, no ...
, partially retargetable C
compiler In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs tha ...
for 8-bit microcontrollers. It is distributed under the
GNU General Public License The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the four freedoms to run, study, share, and modify the software. The license was the first copyleft for general ...
. The package also contains an
assembler Assembler may refer to: Arts and media * Nobukazu Takemura, avant-garde electronic musician, stage name Assembler * Assemblers, a fictional race in the ''Star Wars'' universe * Assemblers, an alternative name of the superhero group Champions of ...
,
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 the imitation of the operation of a real-world process or system over time. Simulations require the use of models; the model represents the key characteristics or behaviors of the selected system or process, whereas the s ...
and
debugger A debugger or debugging tool is a computer program used to test and debug other programs (the "target" program). The main use of a debugger is to run the target program under controlled conditions that permit the programmer to track its executi ...
. As of March 2007, SDCC is the only open-source C compiler for
Intel 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 were pop ...
-compatible microcontrollers. In 2011 the compiler was downloaded on average more than 200 times per day.


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. It is the world's largest semiconductor chip manufacturer by revenue, and is one of the developers of the x86 seri ...
8031, 8032, 8051, 8052;
Maxim Maxim or Maksim may refer to: Entertainment * ''Maxim'' (magazine), an international men's magazine ** ''Maxim'' (Australia), the Australian edition ** ''Maxim'' (India), the Indian edition *Maxim Radio, ''Maxim'' magazine's radio channel on Sir ...
/Dallas DS80C390; C8051 *
Motorola Motorola, Inc. () was an American multinational telecommunications company based in Schaumburg, Illinois, United States. After having lost $4.3 billion from 2007 to 2009, the company split into two independent public companies, Motorol ...
/
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, embedd ...
/ NXP
68HC08 The 68HC08 (HC08 in short) is a broad family of 8-bit microcontrollers originally from Motorola Semiconductor, later from Freescale Semiconductor. HC08's are fully code-compatible with their predecessors, the Motorola 68HC05. Like all Motorola pr ...
and 68HCS08 * Padauk PDK14 and PDK15 * STMicroelectronics
STM8 The STM8 is an 8-bit microcontroller family by STMicroelectronics. The STM8 microcontrollers use an extended variant of the ST7 microcontroller architecture. STM8 microcontrollers are particularly low cost for a full-featured 8-bit microcontrolle ...
* Zilog
Z80 The Z80 is an 8-bit microprocessor introduced by Zilog as the startup company's first product. The Z80 was conceived by Federico Faggin in late 1974 and developed by him and his 11 employees starting in early 1975. The first working samples were ...
, Z180,
eZ80 The Zilog eZ80 is an 8-bit microprocessor from Zilog, introduced in 2001. eZ80 is an updated version of the company's first product, the Z80 microprocessor. Design The eZ80 (like the Z380) is binary compatible with the Z80 and Z180, but a ...
in Z80 mode; Rabbit Semiconductor
2000 File:2000 Events Collage.png, From left, clockwise: Protests against Bush v. Gore after the 2000 United States presidential election; Heads of state meet for the Millennium Summit; The International Space Station in its infant form as seen from S ...
, 2000A, 3000, 3000A, 4000;
Sharp Sharp or SHARP may refer to: Acronyms * SHARP (helmet ratings) (Safety Helmet Assessment and Rating Programme), a British motorcycle helmet safety rating scheme * Self Help Addiction Recovery Program, a charitable organisation founded in 19 ...
LR35902 (Game Boy processor);
Toshiba , commonly known as Toshiba and stylized as TOSHIBA, is a Japanese multinational conglomerate corporation headquartered in Minato, Tokyo, Japan. Its diversified products and services include power, industrial and social infrastructure systems, ...
TLCS-90; Z80N (
ZX Spectrum Next ZX Spectrum Next is an 8-bit home computer, initially released in 2017, which is compatible with software and hardware for the 1982 ZX Spectrum. It also has enhanced capabilities. It is intended to appeal to retrocomputing enthusiasts and to " ...
processor). Work in progress: *
Microchip An integrated circuit or monolithic integrated circuit (also referred to as an IC, a chip, or a microchip) is a set of electronic circuits on one small flat piece (or "chip") of semiconductor material, usually silicon. Large numbers of tiny ...
PIC16 and
PIC18 PIC (usually pronounced as ''"pick"'') is a family of microcontrollers made by Microchip Technology, derived from the PIC1650"PICmicro Family Tree", PIC16F Seminar Presentation originally developed by General Instrument's Microelectronics ...
. * Padauk PDK13. *
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 microprocessor that was designed by a small te ...
Obsolete: * AVR microcontrollers use to be a supported target, but was made obsolete by avr-gcc in 2010 (SDCC 3.0.0).


See also

*
Z88DK Z88DK is a Small-C-derived cross compiler for a long list of Z80 based computers. The name derives from the fact that it was originally developed to target the Cambridge Z88. Z88DK is much developed from Small-C and it accepts many features of ANS ...
- C compiler for Z80-based systems *
cc65 cc65 is a cross development package for 6502 and 65C02 targets, including a macro assembler, a C cross compiler, linker, librarian and several other tools. Overview cc65 is based on a native C compiler that was originally adapted for the At ...
- 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



Using SDCC on the AT89C52 (8051 derivative)

Using SDCC for PIC on Windows with MPLABX
C (programming language) compilers Cross-compilers Free compilers and interpreters {{programming-software-stub