cancel
Showing results for 
Search instead for 
Did you mean: 

getting started with STM8S003F3

aamirali641989
Associate II
Posted on July 04, 2014 at 14:17

I have to get started for STM8S003F3. I have made a custom board.

1. What debugger to choose?

2. What IDE, freeware preferably for c language

3. Any example code to get started
4 REPLIES 4
Nevyn
Associate II
Posted on July 04, 2014 at 15:07

If you are writing small applications then IAR have a free development environment (IDE/Compiler/Debugger) for non-commercial use.

If you don't want to go down the standard library route then

http://blog.mark-stevens.co.uk/the-way-of-the-register/

about using the registers to control the STM8S.

Regards,

Mark

terry2
Associate II
Posted on July 05, 2014 at 17:32

Hello

   I recently bought some of the cheap 'far east' 'STM8 Minimum development kits' off of eBay.  They prominently feature the STM8S003F3P6 processor, but the 'kit' is essentially a break-out board with a USB plug for power. 

STM8S003F3P6 STM8 Minimum System Development Board SWIM Debug

http://www.icstation.com/product_image.php?products_id=2745

I initially used the IAR C compiler for the STM8 and ended up buying some fo the cheap STLINKV2 clones, again from eBay.  They work with the IAR product under Windows, and more importantly for me, they work with the stm8flash command line utility for Linux.  As I am a hobbyist, the IAR product was pretty overwhelming (let me restate: I'm a Very Casual Hobbyist) and also wanted a Linux development environment.   The SDCC  compiler now supports (limited) STM8 application building, certainly more than adequate for my humble needs.

The SourceForge site has the relevant STM8 stuff for SDCC as well as some examples.  I noted that the 'simple blinky LED' example relies on the ADC and interrupts, a tad exotic for my tastes.

http://sourceforge.net/directory/os:linux/freshness:recently-updated/?q=stm8

-there is an SDCC port for Windows as well I believe.

Finally I found that the site by Mark Stevens called 'Silverlight Developer'  http://blog.mark-stevens.co.uk/the-way-of-the-register/ is a fabulous site, helped me to (somewhat) understand the low-level register setups of the STM8 products.  I see that he's responded to your post and I can vouch that its a great site.

If you're running under linux, I don't think you can use the debugging features of SWIM. 

Hope this helps

Good Luck

Terry

at1
Associate II
Posted on July 22, 2014 at 08:42

Hi,

I recommend COSMIC compiler as on F003 programs always need to be optimized - I tried IAR and Raisonance and both where buggy especially on highest optimization levels. Advice from Raisonance was to not use optimization... ;-). So far Cosmic performed best.

As Debugger I use RLINK but I think there are cheaper ones that can do the same.

Best regards,

Alex

kirill
Associate II
Posted on August 01, 2014 at 17:12

1. As hardware debugger use Discovery board. It's cheap, and you can use its own MCU as target.

Or use Chinese clone of ST-LINK - lots of them on ebay.

2. As IDE and software debugger I reccomend to use IAR EWB. It's free with code size limitation of 8 kbytes - it's more than enough for start.

3. Examples of code - look here: