for those of you who need to import the kicad netlist into another tool (for example boundary scan, ICT; FPT) please find a proposal here: http://www.blunk-electronic.de/pdf/how_to_parse_the_kicad_netlist.pdf
Your feedback is appreciated !
For those needing to parse an eeschema netlist in C89, we have working code in pcb-rnd, the very actively developed fork of gEDA PCB, that allows an eeschema netlist to be imported into the PCB layout tool. pcb-rnd doesn’t care what tool you use for schematic design!!
We also export to kicad legacy and kicad s-expression formats, for those who are keen to play with existing gEDA PCB designs in kicad.
Personally, I would implement a generic S-expression parser, and then use that to read KiCad files. I haven’t seen many people writing in Ada, interesting choice.
KiCad can also produce a netlist in XML format, which might be easier to read.
Is there a Windows build?
The project architecture emphasizes portability, such that the code is not tied to a particular HID, whether it be headless, gtk2, gtk3, lesstiff or some other HID.
There is no windows build currently due to a lack of testers, but a headless cross compiled exe or native build would be possible at present, for those simply using it as a CLI utility.
We would revisit the windows port if we had >= 4 dedicated testers.
I’m interested in trying it out. How to clone or download the complete set of the source code?
Do you know where to find the syntax specifications for the KiCad Netlist? Having the specification handy would be very helpful to review your design documents.
the standard netlist exported by KiCad is self explaining. At least I myself am able to read it without greater difficulties. Just let me know where I can help you.
I don’t think the netlist file is documented anywhere, but the s-expression syntax is mostly documented. I can never remember where that document is though, on launchpad somewhere I think.
Ok, I found it file formats. That doc is old and not maintained though, but at least gives some background.
I think the general policy of KiCad is not to work to design specs. Definitive behaviour is defined by the source code.
For the s-expression netlist, the best place to look is probably the parser in pcbnew : https://github.com/KiCad/kicad-source-mirror/blob/master/pcbnew/kicad_netlist_reader.cpp
There is an open invitation to anyone wanting better docs, to go ahead and write them I have found it difficult to write a precise, formal description of the file formats because there is a lot of “quirkiness” in the implementation.
For example, you might think that a worksheet file with no entries would create a blank worksheet, but in fact KiCad uses the default worksheet instead. To get a blank sheet, I had to create a dummy entry with a line of zero length.
Oh yes, been there done that. I documented it somewhere on this forum only though, mea culpa
There are three main ways to install it
there is a debian package which lags svn head
just download a release tarball
- best of all, use subversion to checkout svn head
you don’t necessarily need to make install if you are doing a quick build and test.
./configure will let you know if you are missing any dependencies.
If you have any issues, compliments or code contributions feel free to drop into
where someone should be able to help.
FWIW we have just about finished the protel autotrax/easytrax importer (complete with netlist support), which now gives anyone with kicad a pathway to achieve:
legacy protel autotrax/easytrax layout -> pcb-rnd -> Kicad legacy/kicad s-expression layout
pcb-rnd can be run headless too, so converting formats by using it as a CLI tool is possible, with the right CLI incantations.