Theme 1: SDCC’s quirks and reliability concerns
Many commenters note that while SDCC is a valuable open‑source 8051 compiler, it exhibits unpredictable bugs—especially aggressive loop optimizations that break code unless volatile is used.
- “SDCC has the best OSS 8051 compiler. It is buggy as hell, but it is free.” – dmitrygr
- “the compiler optimized away some ‘empty’ loops a little bit too aggressively without realizing that these loops were setting output pins.” – raphman
- “when you have large code, bugs will find you… adding them together … will produce an access to garbage memory after 5‑6 additions.” – dmitrygr
Theme 2: Exploring alternatives and work‑arounds
Users discuss other compiler options (LLM‑generated cc51, Mikroe compilers, GCC for newer MCUs) and stress best practices like using volatile or filing bug reports.
- “just yesterday I asked an LLM to generate a C compiler for the 8051 … Within 1.5 hour it was correctly compiling my project at 60% of the size of what SDCC generates.” – Jyaif
- “If it has not to be SDCC, Mikroe compilers have support for them across C, BASIC and Pascal compilers.” – pjmlp
- “Please file a bug report, if you haven’t done so.” – uecker
Theme 3: Shift toward modern MCU platforms
Several participants argue that newer 32‑bit cores (STM32, ESP32, RP2350, nRF) offer better toolchains, performance, and power efficiency, making legacy 8‑bit work less attractive.
- “STM32/ESP32/RP2350 or nRF for low power stuff are far less effort these days, and give much better value.” – Joel_Mckay
- “PIC does still have a few key use‑cases, but most people will hit the stack depth limits pretty quickly in C.” – Joel_Mckay
- “great chips now that have free gcc support, reasonable power draw, and 32bit float support (ATSAM3X8E …).” – Joel_Mckay