cancel
Showing results for 
Search instead for 
Did you mean: 

Hi All, what compiler should i use?

leoren_tm
Associate II
Posted on August 17, 2010 at 04:07

Hi All, what compiler should i use?

#stm8-compilers #compiler #raisonance #cosmic #iar

13 REPLIES 13
wolfgang239955_stm1_st
Associate II
Posted on May 17, 2011 at 15:10

Hi leo,

I don't know your requirement, but for me there are some essentials:

- performance of the generated code

- good support

- can be used from STM's STVD

a. Raisonance (RIDE): I didn't test deeply enough. So I'am not able to assess.

b. IAR can not yet be used from STVD, and the generated code is not that what I espected.

c. The Cosmic compiler suits my purpose best. First of all, Cosmic offers an effective support through a permanent presence in all (known) STM forums. The compiler seems to me the most sophisticated of the three of them. When you register, you can use the compiler free up to 32k for one year. Find details on the Cosmic site 

http://www.cosmicsoftware.com/stm8.php

Hope that my points of view are suitable,

WoRo 

luca239955_stm1_st
Senior II
Posted on May 17, 2011 at 15:10

>> Cosmic 16k only ithink.

Think again:

http://www.cosmicsoftware.com/download_stm8_32k.php

leoren_tm
Associate II
Posted on May 17, 2011 at 15:10

ops, thank you for that. RIDE gives you 32k free with-out time limit, im  interested at cosmic as its new to me, support? I really was thinking of compiler that would say ''no support needed, bug free'' :)

also running at STVD with ride or cosmic, as i point out, would just let you open 1 window, or its just my PC? also running STVD really SLOW., but will try pure cosmic, also does cosmic has support for ST-LINK?

general requirement:

1. user friendly

2. code generation

3. debug

sramsauer9
Associate II
Posted on May 17, 2011 at 15:10

Hi leo,

I am using Eclipse CDT with Cosmic compiler

1. Create your project with STVP (toolset = STM8 Cosmic)

2. Select Project->Export Makefile...

3. Close STVP (save all changes)

3. Rename generated makefile ''{prjname}.mak'' to ''makefile''

4. Start eclipse

5. Select File->Import...->C/C++->Existing Code as Makefile Project

6. Enter Project Name

7. Browse Code Location to saved STVP-Project

8. Uncheck ''C++''

9. Press Finish

10. Open makefile in eclipse

11. Add the compiler switch ''-gge'' and ''-pge'' to CFLAGS_PRJ (exists two times)

   -> CFLAGS_PRJ=$(ToolsetBin)\cxstm8 -gge -pge ...

   This flags will generate GNU-Style errors and warnings

12. Select Project->Properties->C/C++ Build

13. Uncheck ''Use default build command''

14. Enter Build command: ''C:\Program files\STMicroelectronics\st_toolset\stvd\gmake.exe''

15. Apply and close properties dialog

15. Select Window->Show View->Make Target

16. Add ''New Make Target''

    Target name: all

17. Double click ''all'' to compile you project

18. To flash device from eclipse you will need STVP programming toolkit

    http://www.st.com/stonline/products/support/micro/files/um0151.exe

    http://www.st.com/stonline/books/pdf/docs/11472.pdf

19. Add following lines to makefile

   

    Device=STM8L152x6

    FlashTool=APISample.exe

   

    flash :

        $(FlashTool) -BoardName=ST-LINK -Device=$(Device) -Port=USB -ProgMode=SWIM -no_loop -no_log -no_verif -FileProg=$(OutputPath)\$(TargetSName).s19

20. Add ''New Make Target''

    Target name: flash

21. To debug you can either use STVP (just doubleclick {prjname}.stw in eclipse)

    or commandline GNU-Debugger ''C:\Program Files\STMicroelectronics\st_toolset\stvd\gdb7.exe''

leoren_tm
Associate II
Posted on May 17, 2011 at 15:10

thank you Stefan Ramsauer.

 

disirio2
Senior
Posted on May 17, 2011 at 15:10

Hi, I just wrote a small comparison:

It is available

http://chibios.sourceforge.net/dokuwiki/doku.php?id=chibios:articles:stm8_compilers

.

Far from being a full comparison but I hope it can help.

Giovanni

---

http://chibios.sourceforge.net/

leoren_tm
Associate II
Posted on May 17, 2011 at 15:10

GREAT!! Thank you. also if you able to finish your chibi/OS for STM8L, im very interested on using and testing it.

leo

disirio2
Senior
Posted on May 17, 2011 at 15:10

I don't have any STM8L hardware right now so I couldn't perform tests but the port should be very easy.

If you have one of those cheap STM8S-Discovery boards you may try ChibiOS/RT there.

Giovanni

---

http://chibios.sourceforge.net/

leoren_tm
Associate II
Posted on May 17, 2011 at 15:10

Yes I got STM8S, ill try it and hopefully ill be able to port it to STM8L

Thank you.

wish me luck :)