1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5 <link rel=
"stylesheet" media=
"screen" type=
"text/css" href=
"./style.css" />
6 <link rel=
"stylesheet" media=
"screen" type=
"text/css" href=
"./design.css" />
7 <link rel=
"stylesheet" media=
"print" type=
"text/css" href=
"./print.css" />
9 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8" />
13 <h1 id=
"gsch2pcbgschemtopcbreadme">gsch2pcb (gschem to PCB) README
</h1>
15 <pre class=
"code">gsch2pcb
17 gsch2pcb is a program that interfaces a set of schematics generated with
18 with the gEDA gschem to PCB layout files.
20 gsch2pcb is conceptually similar to the gschem2pcb shell script, but
21 additionally handles multiple schematics, handles file element footprints,
22 and removes pc board elements corresponding to components deleted from the
23 schematics. It also forward annotates component value changes.
25 Using gsch2pcb allows you to drive all design changes from the gschem
26 schematics without the headache of manually keeping PCB elements and
27 element values in sync.
29 It requires that the gnet-gsch2pcb.scm file be install into the gEDA
30 scheme directory. On Debian this is /usr/share/gEDA/scheme, but see
35 1) Create your custom PCB elements and save each one into its own file.
36 Some compatibility tips if you will be inserting elements into a
37 layout manually as well as with gsch2pcb:
38 * Make the initial
"Description
" field of these elements the same
39 as the file name because gsch2pcb depends on this name (which is
41 value) to know when footprints/elements are changed.
42 * Make the initial layout-name field (displayed when the
"name on PCB
"
43 menu entry is selected) empty (ie
"") so that gsch2pcb
44 will not delete your element when you want it to be in the layout
45 even though it is not in the schematic. You can later edit the
46 layout-name to be some refdes value, but I
'm not sure it makes sense
47 to name a PCB element that is not referenced in the schematic.
49 Note: since once a layout element is named PCB won
't let you reset it
50 to an empty name, a sort of kludge is that setting the first character
51 of the layout-name to a non-alphanumeric will protect the element from
52 being deleted by gsch2pcb.
54 These file elements should be placed in a directory heirarchy that
55 gsch2pcb will search. The default directories /usr/local/pcb_lib and
56 ./packages are searched in addition to any directories you specify with
57 --elements-dir dirname arguments to gsch2pcb.
59 2) Create your schematic with gschem. Make sure each component has a
60 unique refdes attribute and a footprint attribute that matches either
61 a PCB m4 element or one of your custom file element names. Beware of
62 file element names that collide with PCB m4 macro names (or specify the
64 Make a project file if you wish.
66 3) Run
"gsch2pcb foo.sch
" or
"gsch2pcb myproject
" if you
've created the
67 myproject file. If you didn
't specify an output name, this will generate
68 a foo.pcb and a foo.net file.
69 If you get errors about footprints not found, you need to create PCB
70 elements for them and repeat this step until you get no errors.
71 Or, just run gsch2pcb again and it will shift unfound elements to
72 foo.new.pcb and you can proceed using PCB on foo.pcb if you wish to
73 fix the errors from inside of PCB.
75 4) Run
"pcb foo.pcb
". All the elements will be stacked on top of each other,
76 so move them to desired locations. Load the netlist file foo.net and
77 proceed with using PCB.
79 5) Modify foo.sch and again run
"gsch2pcb foo.sch
".
80 * If components were added, PCB elements for them will be placed in the
81 file foo.new.pcb. If components were deleted, the elements for them
82 will be removed from foo.pcb and the original foo.pcb will be renamed
83 to a foo.pcb.bak sequence.
84 * If elements can
't be found for new schematic footprints, then the
85 unfound elements will be indicated with PKG_ lines in foo.new.pcb
86 unless you run
"gsch2pcb --remove-unfound foo.sch
" which will omit
87 the PKG_ lines so you can go ahead and load foo.new.pcb into PCB.
88 * Note that If you have added elements to the .pcb layout which
89 will not exist on the schematics (mounting holes, etc), make sure
90 there is no
"name on PCB
" (the gschem refdes) for them or else gsch2pcb
91 will delete them when they don
't match a schematic refdes and footprint.
92 You could use the --preserve option to prevent deleting any elements at
93 all, but this is really not the best way to use gsch2pcb.
95 6) Run
"pcb foo.pcb
" and clean up any dangling traces left over from removed
96 elements. Load any new elements in foo.new.pcb with the
"Load layout
97 data to paste-buffer
" function. Load the new netlist foo.net.
102 * gsch2pcb uses a gnetlist backend gnet-gsch2pcb.scm, so be sure when you
103 install gsch2pcb that the gnet-gsch2pcb.scm file gets installed into the
104 right place. Look at the INSTALL file in the tarball.
106 * WARNING: if you wish to start processing with gsch2pcb any existing PCB
107 files that have m4 elements and were originally generated with gschem2pcb,
108 then be sure to run first with at least gsch2pcb
0.4:
110 gsch2pcb --fix-elements
112 on the PCB file schematics or else gsch2pcb will want to delete the
115 * footprint information is saved into PCB element
's Description fields,
116 so it
's probably not a good idea to change element Description values
117 in your layout while using gsch2pcb unless it is a protected element
118 that has an empty layout-name.
122 Bill Wilson billw@wt.net
</pre>