How to Build KiCad on Ubuntu 18.04 / 20.04 and Import Altium PCB Files

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.

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:


We should then install some dependencies:

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:


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:


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:


Time to build KiCAD:


If you want to install it on your system run:


I just want to try it for now so I’ll run the executable in the build directory:


We get “KiCad 5.99” welcome window, and we can click on OK to start the program.

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.

Click to Enlarge

Some parts of the PCB layout look fine.

Click to Enlarge

But in other places, it’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.

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.

Support CNX Software - Donate via PayPal or become a Patron on Patreon
Subscribe
Notify of
guest
17 Comments
oldest
newest most voted
Drew Fustini
4 months ago

The another exciting new is the BeagleBoard.org Foundation (I’m member of the Board of Directors) has contracted Kicad Services Corporation (https://www.kipro-pcb.com/) to convert the BeagleBone AI design from Cadence Allegro to KiCad. Seth Hillbrand has almost completed the converter and it should be available in the V6 release.

Tsvetan
Tsvetan
4 months ago

be careful with the development version, we had to switch back to 5.1.5 stabile after we burned with few multilayer boards got inner layer connected to GND with no reason, (vias which were not isolated from the inner layers) which DRC didn’t catch my guess is their gerber generator is buggy.

dimtass
4 months ago

I’ve created two PRs for this. One is to accelerate the build for the ngspice:
https://gitlab.com/dimtass/kicad/-/commit/3151cc10713be25204d53ea758d22d0ff18ef536

And the other is to be able to build kicad with docker, so all the dependencies of the build environment are resolved:
https://gitlab.com/dimtass/kicad/-/commit/838dcf589673a3e196438e926e01fc04342e3cc1

Anton Fosselius
4 months ago

we have had bad luck with importing orcad files to altium..

I am very happy to finally see altium imports in kicad!

Diego
Diego
4 months ago

Wondering when/if orcad 9 files can be imported. Not that I’m having something substantial, just might dig out the old pc with the stuff from my apprenticeship time around y2k… Nostalgia is coming up 😛

John Eaton
John Eaton
4 months ago

Tried this on a virgin 19.04 system. The libboost .65’s have different versions.

Also had to add automake bison flex

I did a sudo apt install curl but it still errors out with

CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)

Could you wait two weeks and do this again after 20.02 comes out?

aprayoga
aprayoga
4 months ago

Actually you could get number of core using nproc command instead of grep /proc/cpuinfo

js0x0
js0x0
4 months ago

If we’re talking about the CMake build, it’s better to just use the Ninja generator instead of the Makefile generator.
Ninja defaults to nproc+1, and will build faster as well.

Ryan McCarty
Ryan McCarty
4 months ago

I’ve tried this on new installs twice with Ubuntu 18.04, and both times the software builds fine once I add the missing libraries, but then displays an error “cannot open shared object file: No such file or directory” when trying to run EEschema or Pcbnew. Any idea what the cause of this might be?

John Major
John Major
2 months ago

Fixed this using ‘sudo ldconfig’

Stefan
Stefan
3 months ago

on my Linux Mint 19.3 the package “swig3.0, doxygen and doxygen dot/graphviz” was missing, so I had to install it with “sudo apt install swig3.0 doxygen graphviz”

eeintech
eeintech
3 months ago

Thanks for sharing the instructions, for a first-timer compiler of KiCad, I was missing those libraries:

./get_libngspice_so.sh

sudo apt install autoconf libtool automake bison flex

cmake -DCMAKE_BUILD_TYPE=Release ../../

sudo apt install libcurl4-openssl-dev libcairo-dev libpython-dev libssl-dev

John Eaton
John Eaton
2 months ago

This did work on my regular machine but I tried a virgin install and got:

— Python module install path: lib/python2.7/dist-packages
CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
(Required is at least version “2.6”)
Call Stack (most recent call first):
/usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
CMakeModules/FindPythonLibs.cmake:233 (find_package_handle_standard_args)
CMakeLists.txt:729 (find_package)

— Configuring incomplete, errors occurred!
See also “/home/johne/kicad_cnx/kicad/build/release/CMakeFiles/CMakeOutput.log”.
See also “/home/johne/kicad_cnx/kicad/build/release/CMakeFiles/CMakeError.log”.

And that was with libpython3-dev

Advertisements