Skip to main content
Visitor II
May 12, 2019
Question

Programming and debugging STM8 with Eclipse and Cosmic

  • May 12, 2019
  • 2 replies
  • 2925 views

Hi all,

I'm a beginner with the STM8 microcontrollers and for my first tests I'm using STVD and Cosmic C compiler.

I'm quite familiar with Eclipse and I'd like to use that IDE. Is there anyone experienced in programming and debugging STM8 with Eclipse and Cosmic C?

Surfing on the internet, I found some people that use Eclipse + SDCC, but I read that SDCC produces less optimized code respect to Cosmic. So, my idea is to use Eclipse + Cosmic C. Is it possible? Can you help me?

Many thanks!

Best regards,

Alessio

    This topic has been closed for replies.

    2 replies

    Visitor II
    June 13, 2019

    While I personally am not familiar with Eclipse, I can offer some data on Cosmic vs. SDCC. I did a comparison a while ago (http://www.colecovision.eu/stm8/compilers.shtml).

    Back then SDCC generated code of similar size to Cosmic. For integer code, SDCC generated faster code, while for floating-point, Cosmic generated faster code.

    Philipp

    Visitor II
    June 16, 2019

    Hi Philipp,

    many thanks for your reply. The link you posted is very interesting.

    Anyone that uses Eclipse with STM8?

    Best regards,

    Alessio

    Visitor II
    June 16, 2019

    There is a German-language thread about getting that to work on Windows here:

    https://www.mikrocontroller.net/topic/438246

    Those who succeeded apparently used information from https://stackoverflow.com/questions/6672785/eclipse-with-sdcc-plug-in-always-has-an-error-of-java-lang-nullpointerexceptio (to get the SDCC plugin for Eclipse working on Windows) and https://stm8-binutils-gdb.sourceforge.io/. The latter is the home of the gdb stm8 port (used for on-target debugging; apparently the author also uses Eclipse - while I have used that gdb port for on-target debugging I did not use it with eclipse).

    A blog entry on using SDCC with Eclipse and the GDB port on GNU/Linux: https://justanotherelectronicsblog.com/?p=432 (this one doesn't use the SDCC plugin for Eclipse though, and just uses a Makefile-based project).