Skip to main content
Visitor II
June 15, 2016
Question

A comparison of C compilers for the STM8

  • June 15, 2016
  • 3 replies
  • 922 views
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
    This topic has been closed for replies.

    3 replies

    Visitor II
    June 17, 2016
    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 + + - - -

    Visitor II
    July 25, 2016
    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

    Visitor II
    August 12, 2016
    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..!!