262 lines
21 KiB
HTML
262 lines
21 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=windows-1252"/>
|
|
<title>kicad help</title>
|
|
<meta name="generator" content="LibreOffice 4.3.4.1 (Windows)"/>
|
|
<meta name="created" content="00:00:00"/>
|
|
<meta name="changed" content="2014-12-03T20:04:24.723000000"/>
|
|
<meta name="created" content="00:00:00">
|
|
<meta name="changed" content="2014-12-03T20:04:06.003000000">
|
|
<meta name="created" content="00:00:00">
|
|
<meta name="changed" content="2014-12-03T19:59:24.882000000">
|
|
<style type="text/css">
|
|
@page { margin: 2cm }
|
|
p { margin-bottom: 0.21cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto }
|
|
p.western { font-family: "Arial", sans-serif; font-size: 10pt; so-language: en-US }
|
|
a:link { color: #004586; text-decoration: none }
|
|
a.western:link { font-family: "Liberation Sans", sans-serif; so-language: zxx; font-style: italic }
|
|
a.sdfootnotesym-western { font-family: "DejaVu Serif", serif }
|
|
</style>
|
|
</head>
|
|
<body lang="en-AU" link="#004586" dir="ltr">
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto"><a name="__RefHeading__2925_482973253"></a>
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>1
|
|
- Full documentation:</b></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>The
|
|
</b></font></font><font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><i><b>Eeschema
|
|
documentation, chapter 14</b></i></font></font> <font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>describes
|
|
this intermediate netlist and gives examples<br>See also
|
|
</b></font></font><font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><i><b>https://answers.launchpad.net/kicad/+faq/2265</b></i></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b><i>2
|
|
- </i>The intermediate Netlist File</b></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">BOM
|
|
files (and netlist files) can be created from an Intermediate netlist
|
|
file created by Eeschema.</font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">This
|
|
file uses XML syntax and is called the intermediate netlist. The
|
|
intermediate netlist includes a large amount of data about your board
|
|
and because of this, it can be used with post-processing to create a
|
|
BOM or other reports.</font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">Depending
|
|
on the output (BOM or netlist), different subsets of the complete
|
|
Intermediate Netlist file will be used in the post-processing.</font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>3
|
|
- Conversion to a new format</b></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">By
|
|
applying a post-processing filter to the Intermediate netlist file
|
|
you can generate foreign netlist files as well as BOM files. Because
|
|
this conversion is a text to text transformation.</font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">this
|
|
post-processing filter can be written using Python, XSLT, or any
|
|
other tool capable of taking XML as input.</font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><span style="font-variant: normal"><span style="font-style: normal"><span style="font-weight: normal">XSLT
|
|
itself is a XML language very suitable for XML transformations. There
|
|
is a free program called </span></span></span><i><span style="font-weight: normal">xsltproc</span></i><span style="font-variant: normal">
|
|
</span><span style="font-variant: normal"><span style="font-style: normal"><span style="font-weight: normal">that
|
|
you can download and install. The</span></span></span><span style="font-variant: normal">
|
|
</span><span style="font-variant: normal"><span style="font-style: normal"><span style="font-weight: normal">xsltproc
|
|
program can be used to read the Intermediate XML netlist input file,
|
|
apply</span></span></span><span style="font-variant: normal"> </span><span style="font-variant: normal"><span style="font-style: normal"><span style="font-weight: normal">a
|
|
style-sheet to transform the input, and save the results in an output
|
|
file. Use of xsltproc requires a style-sheet file using XSLT
|
|
conventions. The full conversion process is handled</span></span></span><span style="font-variant: normal">
|
|
</span><span style="font-variant: normal"><span style="font-style: normal"><span style="font-weight: normal">by
|
|
Eeschema, after it is configured once to run xsltproc in a specific
|
|
way.</span></span></span></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>4
|
|
- Initialization of the dialog window</b></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">You
|
|
should add a new pluging (a script) in plugin list by clicking on the
|
|
Add Plugin button.</font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>4.1
|
|
- Plugin Configuration Parameters</b></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">The
|
|
Eeschema plug-in configuration dialog requires the following
|
|
information:</font></font></p>
|
|
<ul>
|
|
<li/>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">The
|
|
title: for instance, the name of the netlist format.</font></font></p>
|
|
<li/>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">The
|
|
command line to launch the converter (usually a script).</font></font></p>
|
|
</ul>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">Once
|
|
you click on the generate button the following will happen:</font></font></p>
|
|
<ol>
|
|
<li/>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">Eeschema
|
|
creates an intermediate netlist file *.xml, for instance <i>test.xml.</i></font></font></p>
|
|
<li/>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">Eeschema
|
|
runs the script from the command line to create the final output
|
|
file.</font></font></p>
|
|
</ol>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>4.2
|
|
- Generate netlist files with the command line</b></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">Assuming
|
|
we are using the program <i>xsltproc.exe</i><span style="font-variant: normal">
|
|
</span><span style="font-variant: normal"><span style="font-style: normal">to
|
|
apply the sheet style to the intermediate file, </span></span><i>xsltproc.exe</i><span style="font-variant: normal">
|
|
</span><span style="font-variant: normal"><span style="font-style: normal">is
|
|
executed with the following command.</span></span></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">xsltproc.exe
|
|
-o < output filename > < style-sheet filename > <
|
|
input XML file to convert ></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><font size="2" style="font-size: 11pt">On</font>
|
|
<font size="2" style="font-size: 11pt">Windows the command line is
|
|
the following.<br></font><font size="2" style="font-size: 11pt"><i>f:/kicad/bin/xsltproc.exe
|
|
-o “%O” f:/kicad/bin/plugins/myconverter.xsl “%I”</i></font></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><font size="2" style="font-size: 11pt">On</font>
|
|
<font size="2" style="font-size: 11pt">Linux the command becomes as
|
|
following.<br></font><font size="2" style="font-size: 11pt"><i>xsltproc
|
|
-o “%O” /usr/local/kicad/bin/plugins/myconverter .xsl
|
|
“%I”</i></font></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><span style="font-variant: normal"><font size="2" style="font-size: 11pt"><span style="font-style: normal"><span style="font-weight: normal">Where
|
|
</span></span></font></span><span style="font-variant: normal"><font size="2" style="font-size: 11pt"><i><span style="font-weight: normal">myconverter</span></i></font></span><font size="2" style="font-size: 11pt"><i><span style="font-weight: normal">.xsl</span></i></font><span style="font-variant: normal">
|
|
</span><span style="font-variant: normal"><font size="2" style="font-size: 11pt"><span style="font-style: normal"><span style="font-weight: normal">is
|
|
the style-sheet that you are applying. Do not forget the double
|
|
quotes</span></span></font></span><span style="font-variant: normal">
|
|
</span><span style="font-variant: normal"><font size="2" style="font-size: 11pt"><span style="font-style: normal"><span style="font-weight: normal">around
|
|
the file names, this allows them to have spaces after the
|
|
substitution by Eeschema.</span></span></font></span></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">The
|
|
command line format accepts parameters for filenames:</font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">The
|
|
supported formatting parameters are.</font></font></p>
|
|
<ul>
|
|
<li/>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">%B
|
|
=> base filename and path of selected output file, minus path and
|
|
extension.</font></font></p>
|
|
<li/>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">%I
|
|
=> complete filename and path of the temporary input file (the
|
|
intermediate net file).</font></font></p>
|
|
<li/>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">%O
|
|
=> complete filename and path (but without extension) of the user
|
|
chosen output file.</font></font></p>
|
|
</ul>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">%I
|
|
will be replaced by the actual intermediate file name<br><span style="font-variant: normal"><span style="font-style: normal"><span style="font-weight: normal">%O
|
|
will be replaced by the actual output file name.</span></span></span></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>4.3
|
|
- Command line format: example for <span style="font-variant: normal"><span style="font-style: normal">xsltproc</span></span></b></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; font-variant: normal; font-style: normal; widows: 0; orphans: 0">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>4.3.1
|
|
- Command line</b></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><span style="font-variant: normal"><span style="font-style: normal">The
|
|
command line format for xsltproc is the following:<br>< path of
|
|
</span></span>xsltproc > <span style="font-variant: normal"><span style="font-style: normal">xsltproc
|
|
< </span></span>xsltproc parameters ></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">On
|
|
Windows:<br><i><b>f:/kicad/bin/xsltproc.exe -o “%O”
|
|
f:/kicad/bin/plugins/netlist_form_pads-pcb.xsl “%I”</b></i></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><font size="2" style="font-size: 11pt">On</font>
|
|
<font size="2" style="font-size: 11pt">Linux:<br></font><font size="2" style="font-size: 11pt"><i><b>xsltproc
|
|
-o “%O”
|
|
/usr/local/kicad/bin/plugins/netlist_form_pads-pcb.xsl “%I”</b></i></font></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><span style="font-variant: normal"><font size="2" style="font-size: 11pt"><span style="font-style: normal"><span style="font-weight: normal">The
|
|
above examples assume</span></span></font></span><span style="font-variant: normal">
|
|
</span><span style="font-variant: normal"><font size="2" style="font-size: 11pt"><span style="font-style: normal"><span style="font-weight: normal">xsltproc
|
|
is installed on your PC under Windows and all files located in
|
|
kicad/bin.</span></span></font></span></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; font-variant: normal; font-style: normal; widows: 0; orphans: 0">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>4.3.2
|
|
- Remark:</b></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">Most
|
|
of time, the created file must have an extension, depending on its
|
|
type.<br>Therefore you have to add to the option <i><b>%O</b></i> the
|
|
right file extension.</font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">For
|
|
instance <i><b>%O.csv</b></i> to create a .csv file (comma separated
|
|
value file).</font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0">
|
|
<br/>
|
|
|
|
</p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>4.4
|
|
- Command line format: example fo<span style="font-variant: normal"><span style="font-style: normal">r
|
|
python scripts</span></span></b></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; font-variant: normal; font-style: normal; widows: 0; orphans: 0">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>4.4.1
|
|
- Command line</b></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">The
|
|
command line format for python is something like:<br><span style="font-variant: normal"><span style="font-style: normal">python</span></span><span style="font-variant: normal">
|
|
</span><span style="font-variant: normal"><span style="font-style: normal"><
|
|
script file name </span></span>> < input filename > <
|
|
output filename ></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">On
|
|
Windows:<br><i><b>python.exe f:/kicad/python/my_python_script.py</b></i>
|
|
“<i><b>%I” “%O”</b></i></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">On
|
|
Linux:<br><i><b>python</b></i>
|
|
<i><b>/usr/local/kicad/python/my_python_script.py</b></i> “<i><b>%I”
|
|
“%O”</b></i></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">Assuming
|
|
python is installed on your PC.</font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
<br/>
|
|
|
|
</p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; font-variant: normal; font-style: normal; widows: 0; orphans: 0"><a name="__RefHeading__1787_435485510"></a>
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>4.4.2
|
|
- Remark:</b></font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">Most
|
|
of time, the created file must have an extension, depending on its
|
|
type.<br>Therefore you have to add to the option <i><b>%O</b></i> the
|
|
right file extension.</font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0">
|
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">For
|
|
instance <i><b>%O.html</b></i> to create a .html file.</font></font></p>
|
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0">
|
|
<br/>
|
|
|
|
</p>
|
|
</body>
|
|
</html> |