Downloaded and integrated latest wiki documentation from the geda website.
[geda-gaf/peter-b.git] / docs / wiki / geda_gsch2pcb_readme.html
blob004457805d64e7beae263e100ce7613ef0a9b7b3
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
4 lang="en" dir="ltr">
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <title>geda:gsch2pcb_readme</title>
8 <meta name="generator" content="DokuWiki Release rc2007-05-24" />
9 <meta name="robots" content="index,follow" />
10 <meta name="date" content="2007-05-24T22:27:24-0400" />
11 <meta name="keywords" content="geda,gsch2pcb_readme" />
12 <link rel="search" type="application/opensearchdescription+xml" href="http://geda.seul.org/wiki/lib/exe/opensearch.php" title="geda Wiki" />
13 <link rel="start" href="http://geda.seul.org/wiki/" />
14 <link rel="contents" href="http://geda.seul.org/wiki/geda:gsch2pcb_readme?do=index" title="Index" />
15 <link rel="alternate" type="application/rss+xml" title="Recent Changes" href="http://geda.seul.org/wiki/feed.php" />
16 <link rel="alternate" type="application/rss+xml" title="Current Namespace" href="http://geda.seul.org/wiki/feed.php?mode=list&ns=geda" />
17 <link rel="alternate" type="text/html" title="Plain HTML" href="http://geda.seul.org/wiki/_export/xhtml/geda:gsch2pcb_readme" />
18 <link rel="alternate" type="text/plain" title="Wiki Markup" href="http://geda.seul.org/wiki/_export/raw/geda:gsch2pcb_readme" />
19 <link rel="stylesheet" media="all" type="text/css" href="lib/exe/css" />
20 <link rel="stylesheet" media="screen" type="text/css" href="lib/exe/001css" />
21 <link rel="stylesheet" media="print" type="text/css" href="lib/exe/002css" />
22 </head>
23 <body>
24 <div class="dokuwiki export">
28 <h1><a name="gsch2pcb_gschem_to_pcb_readme" id="gsch2pcb_gschem_to_pcb_readme">gsch2pcb (gschem to PCB) README</a></h1>
29 <div class="level1">
30 <pre class="code">gsch2pcb
31 --------
32 gsch2pcb is a program that interfaces a set of schematics generated with
33 with the gEDA gschem to PCB layout files.
35 gsch2pcb is conceptually similar to the gschem2pcb shell script, but
36 additionally handles multiple schematics, handles file element footprints,
37 and removes pc board elements corresponding to components deleted from the
38 schematics. It also forward annotates component value changes.
40 Using gsch2pcb allows you to drive all design changes from the gschem
41 schematics without the headache of manually keeping PCB elements and
42 element values in sync.
44 It requires that the gnet-gsch2pcb.scm file be install into the gEDA
45 scheme directory. On Debian this is /usr/share/gEDA/scheme, but see
46 the INSTALL file.
48 Typical usage
49 -------------
50 1) Create your custom PCB elements and save each one into its own file.
51 Some compatibility tips if you will be inserting elements into a
52 layout manually as well as with gsch2pcb:
53 * Make the initial &quot;Description&quot; field of these elements the same
54 as the file name because gsch2pcb depends on this name (which is
55 the gschem footprint
56 value) to know when footprints/elements are changed.
57 * Make the initial layout-name field (displayed when the &quot;name on PCB&quot;
58 menu entry is selected) empty (ie &quot;&quot;) so that gsch2pcb
59 will not delete your element when you want it to be in the layout
60 even though it is not in the schematic. You can later edit the
61 layout-name to be some refdes value, but I&#039;m not sure it makes sense
62 to name a PCB element that is not referenced in the schematic.
64 Note: since once a layout element is named PCB won&#039;t let you reset it
65 to an empty name, a sort of kludge is that setting the first character
66 of the layout-name to a non-alphanumeric will protect the element from
67 being deleted by gsch2pcb.
69 These file elements should be placed in a directory heirarchy that
70 gsch2pcb will search. The default directories /usr/local/pcb_lib and
71 ./packages are searched in addition to any directories you specify with
72 --elements-dir dirname arguments to gsch2pcb.
74 2) Create your schematic with gschem. Make sure each component has a
75 unique refdes attribute and a footprint attribute that matches either
76 a PCB m4 element or one of your custom file element names. Beware of
77 file element names that collide with PCB m4 macro names (or specify the
78 use-files option).
79 Make a project file if you wish.
81 3) Run &quot;gsch2pcb foo.sch&quot; or &quot;gsch2pcb myproject&quot; if you&#039;ve created the
82 myproject file. If you didn&#039;t specify an output name, this will generate
83 a foo.pcb and a foo.net file.
84 If you get errors about footprints not found, you need to create PCB
85 elements for them and repeat this step until you get no errors.
86 Or, just run gsch2pcb again and it will shift unfound elements to
87 foo.new.pcb and you can proceed using PCB on foo.pcb if you wish to
88 fix the errors from inside of PCB.
90 4) Run &quot;pcb foo.pcb&quot;. All the elements will be stacked on top of each other,
91 so move them to desired locations. Load the netlist file foo.net and
92 proceed with using PCB.
94 5) Modify foo.sch and again run &quot;gsch2pcb foo.sch&quot;.
95 * If components were added, PCB elements for them will be placed in the
96 file foo.new.pcb. If components were deleted, the elements for them
97 will be removed from foo.pcb and the original foo.pcb will be renamed
98 to a foo.pcb.bak sequence.
99 * If elements can&#039;t be found for new schematic footprints, then the
100 unfound elements will be indicated with PKG_ lines in foo.new.pcb
101 unless you run &quot;gsch2pcb --remove-unfound foo.sch&quot; which will omit
102 the PKG_ lines so you can go ahead and load foo.new.pcb into PCB.
103 * Note that If you have added elements to the .pcb layout which
104 will not exist on the schematics (mounting holes, etc), make sure
105 there is no &quot;name on PCB&quot; (the gschem refdes) for them or else gsch2pcb
106 will delete them when they don&#039;t match a schematic refdes and footprint.
107 You could use the --preserve option to prevent deleting any elements at
108 all, but this is really not the best way to use gsch2pcb.
110 6) Run &quot;pcb foo.pcb&quot; and clean up any dangling traces left over from removed
111 elements. Load any new elements in foo.new.pcb with the &quot;Load layout
112 data to paste-buffer&quot; function. Load the new netlist foo.net.
115 Caveats
116 -------
117 * gsch2pcb uses a gnetlist backend gnet-gsch2pcb.scm, so be sure when you
118 install gsch2pcb that the gnet-gsch2pcb.scm file gets installed into the
119 right place. Look at the INSTALL file in the tarball.
121 * WARNING: if you wish to start processing with gsch2pcb any existing PCB
122 files that have m4 elements and were originally generated with gschem2pcb,
123 then be sure to run first with at least gsch2pcb 0.4:
125 gsch2pcb --fix-elements
127 on the PCB file schematics or else gsch2pcb will want to delete the
128 m4 elements.
130 * footprint information is saved into PCB element&#039;s Description fields,
131 so it&#039;s probably not a good idea to change element Description values
132 in your layout while using gsch2pcb unless it is a protected element
133 that has an empty layout-name.
137 Bill Wilson billw@wt.net
138 </pre>
140 </div>
141 </div>
142 </body>
143 </html>