Setup and installation PITA, STM8S Discovery tool chain

As I am writing this, I am no where near finished with the registration and installation part of the software development tools to start using my STM8S Discovery board. In frustration, and while waiting for license approvals, I decided to start this post.

When I received my board I started out early discovering how to approach my new development tool. As I didn’t yet have the time to actually plug the board to my computer, all I could do is browse for information. First off, do not think you can find the product on their web page by simply browsing through the correct categories. There is no such place on their web page dedicated to development boards. You have to either open the whole product catalog and use filters to find what you’re looking for, or actually just search for it.

When you reach the product page of the STM8S Discovery, four manuals is presented to you.
UM1025: STM-Studio getting started
UM0856: Generating PWM signals using STM8S-DISCOVERY
UM0834: Developing and debugging your STM8S-DISCOVERY application code
Of course, you would think that the “STM-Studio” is the main software development tool for your application. So you read through the first manual, spending ages and google trying to find the actual zip file specified in the manual (try googling “” and you find out the only place the software is mentioned is in the actual document you’re reading). I found the file somewhere on the specs page of another ST product eventually… After browsing through the first manual, you open the next one just to find out that STM-Studio has nothing to do with getting started with the STM8S Discovery board! What a complete waste of time!

Now you have found the correct user manual, and just to show you how simple this is, I’ll just paste the four-step quick start guide here:
It is very simple to get started using the STM8S-DISCOVERY, just follow these four steps:
1. Connect the STM8S-DISCOVERY to a PC with a USB cable.
2. Press the TS1 button, and observe LED LD1 blinking.
3. Press the TS1 button to change blinking speed.
4. Visit and follow the tutorial, then discover other

Go ahead, press the link and look for the word “tutorial”. Tried CTRL+F to search for the appearance of the word “tutorial”? So did I. Try pressing the “Design Support” tab, and you’re right back where you started. CTRL+F “tutorial”, nothing…
Besides this hiccup, the rest of the user manual is actually okay. It explains the hardware part of the board, and how to use it/crack it/re-attach it etc.

Skip the PWM document. I was tempted to drag-and-drop it over to the Application Notes section above, as this is where it belongs.

On to manual “UM0834: Developing and debugging your STM8S-DISCOVERY application code”. The toolset provided by ST i called STVD, short for ST Visual Develop. There is also some software called STVP, short for ST Visual Programmer. The manual describes how to download and install the STVD and provides you with a download link, which works. Looking further on in the manual, you see no explanation on where to download or how to install the STVP, but aha, just click on the STVD download link and you see that the tool chain you’re about to download contains both.

ST does not provide you with the C compiler for the dev. software, only the assembler. You have to choose between two free (with 16Kbytes limits) C compilers provided by either Raisonance or Cosmic. There seems to be no pros or cons regarding any of these compilers, or at least ST doesn’t dare telling you them. It is simply only the installation and registration instructions! Why can’t ST tell us the differences? Which one makes the most efficient or most leightweight code? Resonance sure makes their own tools way larger than I hoped for, as you need another software package called “Raid” just so you can install the STM8 linker and compiler. The whole thing sums up to nearly 140MB, compared to Cosmic’ 13MB! I hate big software packages taking up space on my already slow running lab computer, so this will probably be deleted very soon. Thumbs way down, ST. The reason why I don’t blame Resonance for this is because they provide us with a free compiler which is normally used in their development environment, and therefore will probably not install correctly unless you have already installed their IDE. Also beware that Raider wants to install a third additional software called “Raid flasher” or something. God damn, I just want the compiler!
To download and install Resonance C compiler just follow the link that ST provides, which does not work, here is the correct one, and download both sw packages.

Downloading the Cosmic compiler is straight forward.

Now to the tricky part, registration and licenses. Similar for both providers of these compilers is that none of the registration processes is automated. You have to manually fill in an application form and even (on the cosmic compiler) email the damn thing your self. It’s amazing how far we have come in automating these processes, and you would expect more from software providers who is actually making their own compilers!

As always, ST is kind enough to provide you with links and instructions on the whole process. This is the one for Resonance which DOES NOT work, here is the correct one, and the instructions are faulty.
To get your free 16 Kbyte activation code, go to
Fill the question form with your personal information (see Figure 8), and the
registration form with your serial key (see Figure 9).

I know my way around the internet, but ST could be a bit more generous with the info on how to find this form. Luckily I have the direct link here

So now I am sitting here waiting to be approved for the STM8S special license from both Cosmic and Raisonance. There is absolutely no “Quick start” way of doing this unless you’re programming in Assembler, and if there is such a quick start guide it must be removed. Whichever software license reaches me first I will try out. I cannot believe ST hasn’t made it’s own licensing approval program that comes with the actual Discovery board itself, or any other easier way of doing this, for that matter.

It took Cosmic only one day to send me the license file for the software, wich is actually pretty impressive! They could also inform me that there is now a 32K license also for free to use with the STM8S, which by now is the only reason I have gotten to choose one compiler over the other. It is just the small matter of re-applying for the 32K version, and waiting another day for that to arrive. If I were to give Cosmic a little tip, it would be to tell me there is a 32K version BEFORE I applied for the 16K version. And why do they even keep the 16K version? Just replace it!

I have not yet received any license key from Raisonance, but I do have started to receive blank newsletters from them!

Update 2:
As I decided start developing with the Discovery board on my laptop, i needed to download and install the software once again. I can see ST has made some changes…
The PWM application note is now correctly placed under “Application Notes” on the STM8-S Discovery page at
But where are all the other documents I have written about earlier in this article? The document called “UM0834: Developing and debugging your STM8S-DISCOVERY application code” not there anymore, and this is the document where I found the tutorial. The only clue to where I could get a clue on where to find the right installation instructions are gone. What I do find now is a zip file called “Developing and debugging your STM8S-DISCOVERY application code (UM0834)” listed under “Firmware”, but this only contains some example programs and a 3 pages long PDF with legal disclaims.

When I google “ST Visual Develop”, the first result is a site hosted by ST which seems way outdated, where I first click “Downloads” then pick and choose my microcontroller and other preferences and eventually get the option to “Download software for PC”. Trying to go further with this displays a message saying your not allowed to do so. On the very last bottom of the page you can read this, just above the REAL link to the download page:

The ST MCU Toolset with ST Visual Develop, ST Visual Programmer and Assembler Linker toolchain is available for free download from ST. It is also provided on the software CD-ROM provided with all supported hardware tools.

I did not receive any CD.

And for everyone who happen to find the original manual on where and how to get the resonance free 16K compiler, please follow this link directly to the free 32K version to begin with:

Update 3:
Wow, I just sent an email request for the license file on the 32K version, I got a personal response with license file included in less than 3 minutes!

This article has 6 comments

  1. Hi there,

    I know I am commenting an old post but its one of the results you get when searching google for STM8S-discovery…

    Any ways thanks for the info. Just got mine working…

    Would like too hint to others that if you cant connect to your STM8S-discovery even thou it have been identified as an disk drive and it is visible in the “Device Manager” look if you are using Daemon Tools or any other software that creates virtual RAM drives… as soon as I removed the virtual RAM drive STVP and STVD could communicate with the board…


  2. The free C compiler sdcc ( can also target the stm8. The stm8 port is in the snapshots and of course the source from the svn, and will be in the 3.4.0 release.


    • hello Philipp,

      just finished my first SDCC project for the STM8 :-)  Using the STVP I can upload it alright, but how can I debug the SW? Any help is greatly appreciated!


      • Unfortunately, there is no free software for the debugging yet. However, we should soon have basic ELF/DWARF support which could allow some debugging of SDCC-compiled programs using STVD.


  3. I made about the same experience and was not happy with the commercial compilers. It might look different if I had to go into some kind of production with stm8, but for hobby making free software (or at least free of charge) should be available. Fortunately this is the case; You can now use free software and circumvent the limitations of the free-of-charge licenses available for the commercial compilers. I chose Code::Bocks as IDE and, of course, SDCC as compiler. Finally my blog is ready; Read about it on (english and german versions available).

Leave a Reply