STM8

Compiler Comparison
RTOS Availability

Tutorials

STM8L-DISCOVERY

LED Timer
Serial

STM8S-DISCOVERY

LED Timer
Serial

STM8A-DISCOVERY

STM8AF LED Timer
STM8AF Serial
STM8AF Benchmarks
STM8AL LED Timer
STM8AL Serial

EX-STM8-Q64a-207

LED Timer
Serial
Benchmarks

Open8S208Q80

LED Timer
Serial
Benchmarks

EX-STM8-Q48a-105

LED Timer
Serial

STM8/128-EVAL

LED Timer
Serial
Benchmarks

STM8L101-EVAL

Serial

colecovision.eu

ColecoVision

STM8

MCS-51

LLVM+SDCC

Contact

2016 to 2018 changes in C compilers targeting the STM8

This page summarizes notable changes in C implementations targeting the STM8 from mid-2016 to early 2018 and early 2020. See the 2016 comparion, the 2018 comparion and the 2020 comparion on the situation in the respective years.

early 2020early 2018mid 2016
Cosmic4.4.114.4.74.4.4
SDCC4.0.03.7.03.6.0
Raisonance2.62.17.2632.62.17.2632.58.15.267
IAR3.11.1.2073.10.1.2012.20.1.176

Standard Compliance

From 2016 to 2018, SDCC improved ISO C99 compliance. Besides a few minor improvements there is new support for declarations in for loops, static and type qualifiers in array parameters. From 2018 to 2020 experimental (and still incomplete)) support for the upcoming C2X standard was added. The other compilers saw no or only minor improvements in standard compliance.

Code Quality

From 2016 to 2018 most notable are the improvements in SDCC code speed. While Whetstone score only improved by a moderate 6% Dhrystone scores increased by 126%, Coremark scores increased by 75%. This left SDCC still with the lowest Whetstone scores, but it now achieves higher Dhrystone and Coremark scores than any other compiler. There were also moderate reductions in code size across all three benchmarks. basically, apart from the remaining weakness in floating-point performance, SDCC improved from generating the the slowest to generating the fastest code among the compilers.

From 2018 to 2020, SDCC doubled their Whetstone scores, but is still far behind the other compilers in this floating-point benchmark. Dhrystone and Coremark scores improved, too. For all three benchmarks, code size went down substantially.

From 2016 to 2018, IAR managed to improve their already good Whetstone and Coremark scores a bit further, but Dhrystone scores regressed; There were also moderate reductions in code size across all three benchmarks. There were no noticeable from 2018 to 2020.

From 2016 to 2018, Cosmic saw a moderate increase in scores across the benchmarks, which came at a cost in code size. From 2018 to 2020, Cosmic regressed slightly in code size and speed for Whetstone. It improved substantially in code size and sightly in speed for Dhrystone. Coremark saw a substantial reduction in code size, which came at the cost of a slight speed regression.

Raisonance saw virtually no change from 2016 to 2018. There was a tiny increase in Coremark scores and code size. Raisonance did not update their compiler between early 2018 and early 2020.

OS support

The only change was SDCC dropping official support for Solaris from 2016 to 2018, but it is still ahead of the other compilers in OS support.

Licensing

There were no changes in available license options for the compilers.

Summary

While most compilers only got small improvements, SDCC has made huge progress. In 2016 SDCC used to generate the slowest and biggest code among the compilers. Raisonance still generates the smallest code, but Cosmic and SDCC have about halved the distance. SDCC still generates the slowest floating-point code. But in all other aspects SDCC is now on-par or ahead of the other compilers.