SDCC Small Device C Compiler
Ranked 8 of 18 c compilers by recommenders
Free C compiler for 8051, STM8, Z80 and 6502 microcontrollers, a big step up from assembly. Caveat: quirky, with bugs and a less mature 6502 port.
Free C compiler for 8051, STM8, Z80 and 6502 microcontrollers, a big step up from assembly. Caveat: quirky, with bugs and a less mature 6502 port.
16 people gave an opinion
- recommend it
- 12
- criticize it
- 4
- approval share
- 75%
Recommended in 3 of 13 months
- November 2025: not recommended
- December 2025: recommended
- January 2026: not recommended
- February 2026: not recommended
- March 2026: not recommended
- April 2026: not recommended
- May 2026: not recommended
- June 2026: not recommended
- July 2026: not recommended
- August 2026: not recommended
- September 2026: recommended
- October 2026: recommended
- November 2026: not recommended (month in progress)
Why it doesn’t carry the badge
- 12 people recommend itNeeds 10 or more, met.
- 3 recommenders for every criticNeeds 2 to 1 or better, met.
- Recommended in 3 of 13 monthsNeeds 4 or more, not met.
The same three rules apply to every product, and the badge can’t be bought. How the badge works
What people say about it
The reasons people give, with the number of comments that give each one. Open a reason to read what they said.
Why people recommend it
Each mark is one comment
Serviceable across many microcontrollers
“sdcc is a perfectly good compiler which is sufficient for a lot of 8051 applications”
Comment from 11 Dec 2025 in “Do 8051/8031 assembly like its 1984” “I've been using 4.4.0 which is fine for Z80 code”
Comment from 2 Dec 2025 in “LLVM-MOS – Clang LLVM fork targeting the 6502” “Has worked well enough for me on 8051 and stm8”
Comment from 19 Sep 2026 in “SDCC – Small Device C Compiler” - Comment from 19 Sep 2026 in “SDCC – Small Device C Compiler”
What people warn about
Each mark is one comment
Buggy and quirky output
“never ran into "bugs" as in this is just broken, but it's quirky for sure”
Comment from 19 Sep 2026 in “SDCC – Small Device C Compiler” “when you have large code, bugs will find you”
Comment from 19 Sep 2026 in “SDCC – Small Device C Compiler” “It is buggy as hell, but it is free.”
Comment from 19 Sep 2026 in “SDCC – Small Device C Compiler” Immature 6502 code generation
“The 6502 port has been usable, but doesn't seem fully mature.”
Comment from 1 Dec 2025 in “LLVM-MOS – Clang LLVM fork targeting the 6502” “even if the codegen for 6502 needs a lot of work right now”
Comment from 1 Dec 2025 in “LLVM-MOS – Clang LLVM fork targeting the 6502” Optimizer removes or mangles code
“Slightly larger switch() statement and you'll run into peephole optimizer just eating away at jump target instructions”
Comment from 19 Sep 2026 in “SDCC – Small Device C Compiler” “compiler optimized away some 'empty' loops a little bit too aggressively”
Comment from 19 Sep 2026 in “SDCC – Small Device C Compiler” “but SDCC indeed ignored 'volatile'”
Comment from 19 Sep 2026 in “SDCC – Small Device C Compiler” Suboptimal generated code
“stm8 array access is suboptimal.”
Comment from 19 Sep 2026 in “SDCC – Small Device C Compiler” “SDCC's output was not optimized”
Comment from 19 Sep 2026 in “SDCC – Small Device C Compiler”
Other c compilers people recommend
The four most recommended other c compilers, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.
| Product | Recommend | Criticize | Approval | Months | Owned | Badge |
|---|---|---|---|---|---|---|
| Fil-C | 160 | 60 | 73% | 13 | — | Approved |
| Claude's C Compiler | 39 | 83 | 32% | 5 | — | — |
| Visual C++ | 29 | 17 | 63% | 12 | — | — |
| Tiny C Compiler (TCC) | 22 | 3 | 88% | 9 | — | Approved |
| SDCC Small Device C CompilerThis page | 12 | 4 | 75% | 3 | — | — |
What people said
18 of the 19 comments that mention it, newest first. Each links to the original comment.
“For 8051 it's waaay better at optimization than industry standard Keil C51, and of course sdcc.”
“stm8 array access is suboptimal.”
“but SDCC indeed ignored 'volatile'”
“Slightly larger switch() statement and you'll run into peephole optimizer just eating away at jump target instructions”
“It was a huge step up from writing assembly.”
“spending more time reading the assembly to figure out workarounds for the compiler than actually writing C code”
“SDCC's output was not optimized”
“compiler optimized away some 'empty' loops a little bit too aggressively”
“has been a nice resource for a variety of MCUs”
“when you have large code, bugs will find you”
“Has worked well enough for me on 8051 and stm8”
“never ran into "bugs" as in this is just broken, but it's quirky for sure”
“It is buggy as hell, but it is free.”
“sdcc is a perfectly good compiler which is sufficient for a lot of 8051 applications”
“even SDCC has uptodate C standard support (better than MSVC actually)”
“I've been using 4.4.0 which is fine for Z80 code”
“The 6502 port has been usable, but doesn't seem fully mature.”
“even if the codegen for 6502 needs a lot of work right now”
Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.