cancel
Showing results for 
Search instead for 
Did you mean: 

A comparison of C compilers for the STM8

Philipp Krause
Senior II
Posted on June 15, 2016 at 10:18

A comparison of the 4 most important C implementations for the STM8 can be found at:

http://colecovision.eu/stm8/compilers.shtml

It uses the current (mid 2016) versions of all 4 compilers. Only aspects of the C implementation itself are compared (i.e. other aspects such as IDE integration are not).

Here's the summary table from the comparison:

Standard Compliance Code Speed Code Size OS Support License

Cosmic - o o - o

SDCC + - - + +

Raisonance - o + - -

IAR + + - - -

Philipp

#cosmic-c-stvd-test
3 REPLIES 3
Philipp Krause
Senior II
Posted on June 17, 2016 at 13:40

The comparison was not done as carefully as it should have been wrt. Cosmic. I now reevaluated Cosmic C and added Cosmic benchmarks results when optimizing for size and speed.

The updated comparison can be found at the original link. The new summary table is:

Standard Compliance Code Speed Code Size OS Support License

Cosmic o o o o o

SDCC + - - + +

Raisonance - o + - -

IAR + + - - -

Philipp Krause
Senior II
Posted on July 25, 2016 at 12:35

I was notified that the default code space setting of the compilers other than Cosmic corresponds to Cosmic with +modsl0 option. So I redid the comparison, using +mosdl0 for Cosmic. This resulted in a very slight improvement of Cosmic code size and score.

http://colecovision.eu/stm8/compilers.shtml

has been updated accordingly.

Philipp

mrtaotao789
Associate II
Posted on August 12, 2016 at 20:07

latest of my test... 2 groups

IAR for STM8 with STM8S103K3 :

i think, it slower than STVD + COSMIC_C

for set/reset periperial bit of mcu

example.. port of GPIOx->ODR

COSMIC_C use 2 clock of TIM1's CNT

but IAR use more than 6 clock    O_o!

(reference.. HSI 16 MHz,

opt.. maximum speed of C complier

same simple code)

so now..

i use STVD + COSMIC_C

Free and CooL..!!