The Small Device C Compiler (SDCC) released version 4.6.0 on 22 June 2026, continuing a development lineage that began in 1999. SDCC is a retargetable, optimizing C compiler suite that implements ANSI C89, ISO C99, ISO C11, and the emerging ISO C23 standard. Unlike mainstream compilers that focus on 32‑ and 64‑bit processors, SDCC targets 8‑bit microcontrollers—architectures still widely used in embedded control, consumer electronics, and legacy industrial equipment.

Small Device C Compiler project banner image from its GitHub repository
SDCC project repository on GitHubgithub.com

This image is from the official SDCC GitHub repository (swegener/sdcc) and provides visual context for the open-source compiler project discussed throughout the article. SDCC is an open-source, retargetable optimizing C compiler for 8-bit microcontrollers that has been in development since 1999.

### Supported architectures and current status

SDCC’s primary targets include the Intel MCS‑51 family (8031, 8032, 8051, 8052), Maxim (formerly Dallas) DS80C390, Freescale/Motorola HC08 and S08, Zilog Z80 variants (Z80, Z180, eZ80, Rabbit 2000/3000/4000, SM83, TLCS‑90, R800), Padauk (pdk14, pdk15), STMicroelectronics STM8, and the MOS 6502 and WDC 65C02. Work in progress covers Rabbit 5000/6000, Padauk pdk13, and the f8/f8l targets. The PIC16 and PIC18 ports are listed as unmaintained. The compiler runs on Linux (amd64, x86, aarch64, ppc64), macOS (amd64), and Windows (via MinGW cross‑compilation), with FreeBSD aarch64 also tested.

### What’s new in 4.6.0

The 4.6.0 release adds a substantial list of C23 and C2y features: the `_Countof` operator, octal literals, if‑declarations, conditional operators with omitted second operands, compound literals with storage‑class specifiers, signed bit‑precise integer types (`_BitInt`), bit utilities, `umaxabs`, `uabs`/`ulabs`/`ullabs`, `constexpr` (mostly), the `containerof` macro, `_Optional` qualifier, and C23 variadic functions with `va_start`. Language‑level changes include making plain `int` bit‑fields signed, adopting C99 semantics for `realloc(ptr, 0)`, and warning on array‑parameter accesses that exceed declared bounds. The release also introduces an experimental f8l port, a new r4k port for the Rabbit 4000, experimental r5k/r6k ports for Rabbit 5000/6000, and `__far` support in Rabbit ports for a 1 MB data address space. Code generation for Z80‑related ports has been “substantially improved,” and the ez80 port replaces the former ez80_z80 variant.

### Funding and development model

SDCC has historically been developed by unpaid volunteers, with occasional support from university employees allowed to contribute during paid time and hardware samples from MCU vendors. In October 2025 the project announced two funding awards. The NGI0 Commons Fund supports hardware‑specific improvements for Padauk, Rabbit, and Toshiba TLCS targets, plus machine‑independent work on recent ISO C standards, a local‑variable memory‑usage optimization, and link‑time optimization to remove unused functions—the latter a long‑standing user request. The Sovereign Tech Fund commissioned work on safety and security for embedded firmware: modern C features relevant to safe coding, post‑quantum cryptography readiness, side‑channel mitigations, and extended testing of less‑common command‑line combinations. Both projects involve the existing developer team.

### Community context and alternatives

Long‑time users recall SDCC as a pivotal free alternative to commercial compilers such as Hi‑Tech C for PIC16 development in the early 2000s. The 8051 port is frequently cited as the most capable open‑source option for that architecture, though some developers note persistent bugs. The MOS 6502 port originated as a modification of the HC08 backend and was later cleaned up and merged by Gabriele Gorla; today, alternative 6502 toolchains such as llvm‑mos and Oscar64 offer different optimization profiles. Requests for PIC10/PIC12 support remain open. The compiler’s component suite includes a retargetable assembler/linker (sdas/sdld, derived from ASXXXX), a preprocessor (sdcpp, from GCC cpp), simulators (ucsim), a source‑level debugger (sdcdb), and binutils‑derived archive utilities—all under GPL or compatible licenses.

### What remains uncertain

The project does not publish a formal roadmap with dates, so the timeline for completing the Rabbit 5000/6000, Padauk pdk13, and f8/f8l ports is unclear. The PIC16/PIC18 ports are marked unmaintained, but no plan for their removal or revival is stated. Link‑time optimization, while funded, has not yet appeared in a release. Users evaluating SDCC against proprietary compilers should verify current code‑quality and bug status for their specific target, as the supplied sources do not provide comparative benchmarks.