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. See the 2016 comparion and the 2018 comparion on the situation in the respective years.

early 2018mid 2016
Cosmic4.4.74.4.4
SDCC3.7.03.6.0
Raisonance2.62.17.2632.58.15.267
IAR3.10.1.2012.20.1.176

Standard Compliance

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. The other compilers saw no or only minor improvements in standard compliance.

Code Quality

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 leaves 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.

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.

Cosmic saw a moderate increase in scores across the benchmarks, which came at a cost in code size.

Raisonance saw virtually no change. There was a tiny increase in Coremark scores and code size.

OS support

The only change was SDCC dropping official support for Solaris, 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. SDCC used to generate the slowest and biggest code among the compilers. Now, Raisonance still generates the smallest code, and SDCC still generates the slowest floating-point code. But in all other aspects SDCC is now on-par or ahead of the other compilers.