PCB Card Replicating Project Directory
In the process of pcb card replicating, although not required, a typical project directory will contain the schematics and board layout at the top level.
Schematic symbols and pcb card footprints which are unique to this project are stored in subdirectorie.
For this example, ‘sym’ contains the project specific schematic symbols and ‘pkg’ contains the project specific footprints. Set up the project subdirectory and subdirectories by executing when pcb card replicating:
mkdir ~/myproj
cd ~/myproj
mkdir sym
mkdir pkg
mkdir pkg/newlib
mkdir pkg/m4
The gEDA tools, specifically gschem and gnetlist, use configuration files to set the search path for symbol libraries in addition to other user preferences.
Create a file in the top level project directory called ‘gschemrc’. Add the following lines to that file:
;; list libraries here. Order matters as it sets the
;; search order
(component-library “./sym”)
This sets the local search path for the schematic capture program gschem. Now the netlister, gnetlist, must also be configured after pcb card replicating.
This can be done by copying the file ‘gschemrc’ to ‘gnetlistrc’ by running ‘cp gschemrc gnetlistrc’.
Alternatively, you can create a soft link so only a single file needs to be updated if additional symbol paths are added. The link is created by running ‘ln -s gschemrc gnetlistrc’.
The program gsch2pcb, not to be confused with the older gschem2pcb script, is used to link the schematic to layout. gsch2pcb is responsible for creating the netlist used to provide connectivity information to pcb card replicating as well creating an initial layout with all components instantiated in the design.
Forward annotation of schematic changes to the layout is also done using gsch2pcb. gsch2pcb uses a project file to set up the schematic file names, pcb card replicating library locations, and output file names. Create a project file called ‘project’ using the following as an example:
# List all the schematics to be netlisted
# and laid out on the pc board. schematics first.sch second.sch third.sch
# For an output-name of foo, gsch2pcb generates files
# foo.net, foo.pcb, and foo.new.pcb. If there is no
# output-name specified, the file names are derived from
# the first listed schematic, i.e. first.net, etc. output-name preamp