SDCC is a free and versatile ANSI-C compiler that can be optimized and retargeted for various platforms.
SDCC relies on freeware, retargetable assembler and linker tools called ASXXXX and ASLINK to make a comprehensive compilation suite. It also includes MCU (8051)-specific language extensions to utilize your hardware more efficiently. Additionally, it has a source-level debugger and simulator included, and can easily generate debug info for the NoICE debugger.
SDCC includes a range of key features that makes it a great choice, such as global subexpression elimination, loop optimizations, constant folding and propagation, jump tables for switch statements, full data type support, and the ability to add inline assembler code to your functions. It also provides a function complexity report for you to make informed decisions on what needs to be rewritten in assembler. You can even customize the optimization settings to suit your needs and see the benefits!
The latest release of SDCC comes with a predefined preprocessor macro, an updated preprocessor, support for many PIC devices, tail call optimization for functions that take no parameters on Z80, and an improvement in multiplication of unsigned chars. The release also includes numerous enhancements and bugfixes.
Overall, SDCC is a powerful, flexible, and open-source compiler suite that can tackle challenging projects of all kinds. With its MCU-specific optimisations and adaptable backend, SDCC gives you a lot of control over your code while also handling the low-level details for you.
Version 2.8.0: N/A