4 ms·
What benefit does SDCC have over GCC for most embedded development? And if it's the only FOSS compiler for PICs, why hasn't someone ported parts of SDCC's backe
by archimedespi 11y ago
What benefit does SDCC have over GCC for most embedded development? And if it's the only FOSS compiler for PICs, why hasn't someone ported parts of SDCC's backend over to LLVM or GCC?
- sjburt 11y agoIt has a few compiler extensions that are very useful for small embedded development, but GCC won't add (eg an "at" keyword to let you place a symbol at a specific address). As for "why" nobody has done it, it's probably just because nobody has. The targets are mostly 8-bit devices with limited resources and SDCC is good enough. Typically the vendors have their own paid toolchains. I don't really know how well GCC would perform on those targets (although AVR8 uses GCC).
- archimedespi 11y agoYeah, I can get that. When I was working with SDCC, I really would have preferred GCC or clang - SDCC has some funky quirks that really pissed me off and introduced some weird bugs. And yeah, AVR8 (and IIRC 16 and 32) have GCC toolchains as well as avr-llvm, which is pretty sweet.
- aexaey 11y ago>AVR8 (and IIRC 16 and 32) What's AVR16, may I ask?
- jdblair 11y agoSDCC supports architectures that GCC doesn't support. 8051 is one of these. I'm not sure if GCC supports any 8-bit CPUs.
- tavish1 11y agosdcc is the only(viable?) foss option for many 8-bit/older architectures. 8051, z80, stm8 are what I've used it for. A lot of newer chips(example many of TI cc2xxx SoCs) actually have 8051 still, stm8 is newer entry(I think).