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 |
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.
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
If somebody with Altium designer could load BeagleBone Black PCB layout and take a screenshot it may help with debugging.
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.
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.
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
we have had bad luck with importing orcad files to altium..
I am very happy to finally see altium imports in kicad!
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 😛
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?
When building the development version of the libraries are needed since they contain the header files.
So you’d probably need to run:
In a more generic case, if some header files are missing, just search for for the name with aptitude
then look for -dev libraries on your system.
I’ll update the instructions once I install Ubuntu 20.04 on my system.
Actually you could get number of core using nproc command instead of grep /proc/cpuinfo
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.
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?
Fixed this using ‘sudo ldconfig’
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”
Thanks. I’ve added the missing packages.
I did not have doxygen on my system when I built KiCad, so the documentation did not get built but all programs still work.
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
Thanks. I added those and took the opportunity to make sure it works with Ubuntu 20.04. I had to select libpython3-dev instead.
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
Hello, run into a CMake error:
CMake Error at CMakeLists.txt:219 (include):
include could not find load file:
PerformFeatureChecks
CMake Error at CMakeLists.txt:220 (perform_feature_checks):
Unknown CMake command “perform_feature_checks”.
— Configuring incomplete, errors occurred
PerformFeatureChecks.cmake file is under CmakeModules folder
Any help for a noob will be much appreciated…