It not takes much time to find that there is only one practically useful free Linux C compiler for STM8 micro-controller at the moment. And this is SDCC.
More and more people start to use it for STM8 development. As result more bugs fixed and more changes applied to it. This leads to fast increasing difference between current developed version and default version of SDCC in Ubuntu repository. Actually the default version of SDCC in Ubuntu 14.04 LTS is not supporting STM8 at all.
To benefit from more features and also to contribute to SDCC testing I recommend to build it from latest sources. Here I describe how to do it.
First of all you need to install some extra packages:
sudo apt-get install build-essential gputils subversion bison flex libboost-all-dev texinfo
Also to build latest SDCC from source the automake 1.15 required to be on your system. You could find it at https://packages.debian.org/sid/all/automake/download . Install it in the way like this:
cd ~/Downloads
wget http://ftp.uk.debian.org/debian/pool/main/a/automake-1.15/automake_1.15-3_all.deb
sudo dpkg -i automake_1.15-3_all.deb
Now get the latest SDCC source code and compile it:
mkdir ~/src
cd ~/src
svn checkout svn://svn.code.sf.net/p/sdcc/code/trunk/sdcc sdcc
cd sdcc/
mkdir build
cd build/
../configure
make
The compilation process will take some time.
When it completes you will be able to install SDCC to your system with next standard command:
sudo make install
If after some time you decide to recompile it with recent updates then do next:
cd ~/src/sdcc
svn update
cd build
make
And then install it as before with "sudo make install".
No comments:
Post a Comment