2010-08-16 07:07 PM
Hi All, what compiler should i use?
#stm8-compilers #compiler #raisonance #cosmic #iar2011-05-17 06:10 AM
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 Hope that my points of view are suitable, WoRo2011-05-17 06:10 AM
>> Cosmic 16k only ithink.
Think again:2011-05-17 06:10 AM
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. debug2011-05-17 06:10 AM
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''2011-05-17 06:10 AM
thank you Stefan Ramsauer.
2011-05-17 06:10 AM
Hi, I just wrote a small comparison:
It is availablehttp://chibios.sourceforge.net/dokuwiki/doku.php?id=chibios:articles:stm8_compilers
. Far from being a full comparison but I hope it can help. Giovanni ---2011-05-17 06:10 AM
2011-05-17 06:10 AM
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 ---2011-05-17 06:10 AM
Yes I got STM8S, ill try it and hopefully ill be able to port it to STM8L
Thank you. wish me luck :)