Month: July 2016

SDCC went from worst STM8 compiler to best in a very short time

I never used STM8 but I’m impressed with this achievement of SDCC compiler.

The ST marketing materials put STM8 Dhrystone performance at 0.29 DMIPS / Mhz.

Commercial compilers as Raisonance achieves 0.289 DMIPS / Mhz, Cosmic achieves 0.296 DMIPS / Mhz and IAR achieves 0.347 DMIPS / Mhz. See benchmark comparison here:

SDCC 3.5.0 achieves 0.151 DMIPS / Mhz and SDCC 3.6.0 achieve 0.167 DMIPS / Mhz.

Now the SDCC in the repository (Revision #9652) outperforms them all at 0.355 DMIPS / Mhz.

If you want to use STM8 on Linux, these links could be useful:

Source: Philipp Klaus Krause email in the SDCC mailing list “STM8 Dhrystone performance – new record at 0.355 DMIPS / Mhz using SDCC”.

How to copy a schematic block in the KiCAD

KiCAD is a very nice EDA software, but it try to avoid copying blocks from a schematic to another (from different projects in this case).

Don’t worry! There is a way to you do that:

1) Select the block you want to copy;
2) Using the right mouse button select: "Save Block";
3) Insert a Hierarchical Sheet: menu Place -> Hierarchical Sheet;
4) Choose a "File name" for new sheet and click OK;
5) Press ESC and double click over the Hierarchical Sheet block;
6) Past (Ctrl+V) the saved block in this new sheet, save and close;
7) Open the other schematic where you want to include this block and import it:
   File -> Import Schematic Sheet Content

It might be easier, but KiCAD folks want to avoid users to mess.

Compiling KiCAD from source code on Debian Sid

These are the steps I did to compile KiCAD on Debian 8 Sid:

Download the source code:

$ git clone

Create a build directory:

$ cd kicad-source-mirror/
$ mkdir -p build/release
$ cd build/release

Install the dependences:

$ sudo apt-get install libwxbase3.0-dev libwxgtk3.0-dev libgl1-mesa-dev libglew-dev libglm-dev libcurl4-openssl-dev libboost-dev libboost-thread-dev libboost-system-dev libboost-context-dev libssl-dev wx-common libpython-dev python-wxgtk3.0-dev swig3.0

//create a symbolic link to pretend be swig2.0 for cmake:
$ sudo ln -s /usr/bin/swig3.0 /usr/bin/swig2.0

Execute the cmake configuration:

$ make
$ sudo checkinstall

Done! Now we have a cutting-edge KiCAD version installed on our system!