granddaa.blogg.se

Stm8 c compiler
Stm8 c compiler






stm8 c compiler

Sadly this was written for the STM8L (low power version of the same microcontroller). SDDC seems to have some good support in many IDEs (there is a good example using Code::Blocks if that’s your kind of thing) but I just wanted a simple Makefile at this point, so I went off searching and found some example code on github by the same guy that wrote the flash tool. If you are lucky, you might have a good version in your repository so in that case you can just do sudo apt-get install sdcc. Then, check it’s installed correctly with To install manually, download from  then just do something like this: tar jxjf sdcc*.bz2 There is a version of SDCC in the Ubuntu repositories but I’m still on Ubuntu 13.10 and the version I had didn’t support the stm8 so I downloaded the latest snapshot and installed manually (there is sadly no ppa). The open source compiler of choice for this level of microcontrollers is the Small Device C Compiler (SDCC) which looks great, plenty of contributions and active use. There’s plenty of code on the ST website but it’s all for proprietary compilers and the lack of any sort of Makefile made me want to cry! Connectivity is done, the next step was to try and compile some code for the chip. I’ll post details when I can remember which way I did it! For basic programming though, it doens’t seem to cause a problem, you can leave it mounted.

stm8 c compiler

You can configure Linux to ignore this device when auto-mounting via a variety of methods. One thing you will find with the STM8 is that Linux tries to auto-mount it as a file system – there is some documentation on this little file system, but this can apparently cause some issues with accessing the UART later on. To install just do the following: git clone I couldn’t work out if there was support for this programmer in openocd, the documentation was sketchy, so instead I elected to go for the simpler stm8flash tool. I think this is purely a historical thing – the maturity of the embedded Linux tools happened quite late in the life of this processor, and in the meantime many people have moved to 32bit architectures. I could see straight away that the open source toolchain is not as rich as the STM32 – and much of the code and tools are still proprietary. I read that some people just buy this kit for the programmer, snap it off and throw the main board away! It uses the older STLink programmer – not the STLink2 that the STM32 uses.

stm8 c compiler

It’s an interesting little board, comes with a snap off programmer (also an STM8S), touch sensor, a prototype area (through-hole and SMD).

stm8 c compiler

I purchased an STM8S Discovery board for about $10 from element14. The STM8 microcontroller is the 8 bit version from the same manufacturer, similar performance to an Arduino but with much lower power and incredibly cheap. After my adventures with the STM32 I decided to give the STM8 a go.








Stm8 c compiler