KiCad open-source EDA (Electronics Design Automation) suite software is now very popular, and many new projects are designed with the utility. AFAIK, some companies like Olimex switched all their new designs to KiCAD. But since many schematics and PCB layouts have been designed with other tools like EAGLE, Orcad Allegro, or Altium PCB design tools, it would be nice to be able to import those designs into KiCad.
Converters have been around for a long time but when I tried to convert Beagleboard-xM OrCAD schematics to import them in KiCAD back in 2012, the results were really awful and unusable. But I recently saw a tweet saying it’s now possible to import Altium files into KiCAD.
Finally, importing #altium boards into #kicad is only one click away (in the developer version).
This allows to view and edit #opensource #hardware which was designed with #proprietary software, and thus, in fact, not open for everyone. pic.twitter.com/oogiJeyynW
— Thomas Pointhuber __ __ ____ (@Chaos_Robotic) April 4, 2020
This requires the development version though, and while one day it will be in a KiCAD release (KiCAD 6.0?), if we want to try it today, we’ll need to build KiCAD. So I’ll start by showing how to build KiCAD on Ubuntu 18.04 before trying to import an Altium file and see how it goes.
Build KiCAD on Ubuntu 18.04 / 20.04
KiCAD documentation website has generic instructions to build the software, but nothing really specific to any Linux distributions. Let’s do that with Ubuntu 18.04.3 LTS. [Update May 2020: Tested again with Ubuntu 20.04]
First, let’s get the latest source code:
1 2 |
git clone https://gitlab.com/kicad/code/kicad.git cd kicad |
We should then install some dependencies:
1 |
sudo apt install build-essential libboost-dev libboost-system-dev libboost-test-dev libboost-filesystem-dev cmake freeglut3-dev libglew-dev libglm-dev liboce-foundation-dev liboce-ocaf-dev python-wxgtk3.0-dev libwxgtk3.0-gtk3-dev swig3.0 doxygen graphviz libcurl4-openssl-dev libcairo-dev libpython3-dev libssl-dev |
Note it’s possible some dependencies are missing as I’ve built other programs before, and some may have already been installed. If you try on your own Ubuntu 18.04 installation and I forgot some do let me know.
We’ll also need to get, build and install NGSpice library since it’s not part of Ubuntu package:
1 2 3 4 |
cd ./scripting/build_tools chmod +x get_libngspice_so.sh ./get_libngspice_so.sh sudo ./get_libngspice_so.sh install |
You may want to edit get_libngspice_so.sh script before running it, with make -j <number of cores>
for a faster build.
Now we can configure KiCAD as follows:
1 2 3 4 |
mkdir -p build/release mkdir build/debug # Optional for debug build. cd build/release cmake -DCMAKE_BUILD_TYPE=Release ../../ |
If you can an error during cmake, you can try to find the missing packages with commands like aptitude.
Upon successful configuration, you should see an output similar to:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
cmake -DCMAKE_BUILD_TYPE=Release ../../ -- KiCad install dir: </usr/local> -- Check for installed GLEW -- found -- Boost version: 1.65.1 -- Check for installed Python Interpreter -- found -- Python module install path: lib/python2.7/dist-packages -- Found wxPython 3.0.2.0/gtk3 (wxWidgets 3.0.2.0) -- Found wxWidgets: -L/usr/lib/x86_64-linux-gnu;-pthread;;;-lwx_gtk3u_gl-3.0;-lwx_gtk3u_aui-3.0;-lwx_gtk3u_adv-3.0;-lwx_gtk3u_html-3.0;-lwx_gtk3u_core-3.0;-lwx_baseu_net-3.0;-lwx_baseu-3.0;-lwx_baseu_xml-3.0;-lwx_gtk3u_stc-3.0 (found suitable version "3.0.4", minimum required is "3.0.2.0") -- Found wxPython.h in /usr/lib/x86_64-linux-gnu/wx/include/gtk3-unicode-3.0/wx/wxPython -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) -- WARNING: Doxygen not found - doxygen-docs (Source Docs) target not created -- Creating linux metadata -- Using Git to determine build version string. -- S3DSG version: 2.0.0 -- Boost version: 1.65.1 -- Found the following Boost libraries: -- unit_test_framework -- filesystem -- system -- Found wxWidgets: -L/usr/lib/x86_64-linux-gnu;-pthread;;;-lwx_gtk3u_gl-3.0;-lwx_gtk3u_aui-3.0;-lwx_gtk3u_adv-3.0;-lwx_gtk3u_html-3.0;-lwx_gtk3u_core-3.0;-lwx_baseu_net-3.0;-lwx_baseu-3.0;-lwx_baseu_xml-3.0;-lwx_gtk3u_stc-3.0 (found suitable version "3.0.4", minimum required is "3.0.0") -- Boost version: 1.65.1 -- Found the following Boost libraries: -- unit_test_framework -- Configuring done -- Generating done -- Build files have been written to: /home/jaufranc/edev/kicad/build/release |
Time to build KiCAD:
1 |
make -j$(nproc) |
If you want to install it on your system run:
1 |
sudo make install |
I just want to try it for now so I’ll run the executable in the build directory:
1 2 |
cd kicad ./kicad |
Importing Altium PCB Layout in KiCad
Thomas used LimeSDR PCB layout as an example in his Twitter video. But I’ll try BeagleBone Black Altium PCB layout instead which you can find on Github (BeagleBoardBlack_RevA5_Altium.zip).
At first, I tried to launch kicad to open the file, but I could not find any way to import PCB layouts even switching to “Edit PCB“, and was eventually told I should open pcbnew in standalone mode which I did, and there’s indeed an “Import Non-KiCad Board File” option.
Now we can filter for Altium Designer .PcbDoc files, and load our file.
Some errors show up. Altium PCB import function is still in the development branch, so it’s expected some errors may still occur.

Some parts of the PCB layout look fine.

But in other places, it&8217;s all mixed up for now.
It’s getting there, but there’s still a bit more work, or BeagleBone Black schematics are based on an older version of Altium that’s not supported by KiCad import function.
[Update: Actually the import worked as expected… This is what it looks in Altium.
Yes, there are fabrication and assembly drawings in a giant scale around the board, along with notes, drill table, and layer stack up pic.twitter.com/3jmmTcsb85
— Matt Mets (@cibomahto) April 5, 2020
Error messages should be fixed with the following commit.
]
Altium schematic support is also coming, and for people wanting to import OrCAD Allegro files. Thomas explains there’s no open-source parser for allegro just yet, but the files could be imported via an Allegro -> Altium -> KiCad conversion. He also mentions it’s possible to create an Allegro parser, but their file format seems to be some custom binary.

Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress