[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: PCB PKG CONNECTOR



On Sat, 9 Aug 2003 14:15:06 -0700 (PDT)
Mikey Sklar <sklarm@screwdecaf.cx> wrote:

> On Sat, 9 Aug 2003, Terry Porter wrote:
> > Using the graphical footprint design technique in the 1.99 series, just
> > use a make your own part and save it to your local pcb parts directory. I
> > havent used M4 to make a part since I started using the 1.99 series. 
> 
> This works fine within PCB.
> 
> Btw, the exact terminal block I needed did come with PCB.
> 
> /usr/local/pcb_lib/connectors/3terminal_screw_block
> 
> Its still not clear to me how to make a new FOOTPRINT on per project
> basis for gschem2pcb automation. I realize I could mess with the system
> wide pcb files under:
> 
> /usr/X11R6/lib/X11/pcb/m4
> 
> Creating a custom .list, .m4, and .inc. Followed by modifications to
> common.m4 to include the fresh .inc file. Seems like enugh work, that
> I'm taking the wrong approach.
> 
> Is anyone able to easily able to generate fresh footprints for usage
> within gschem and PCB without this sort of system wide hackery?

Yes, I do this regularly.  But I couldn't with gschem2pcb which knows
only about the m4 approach so I made gsch2pcb which you might take a
look at:

    http://web.wt.net/~billw/gsch2pcb/gsch2pcb.html

I've been thinking about putting up a short tutorial, but haven't had
time so far, so I'll just describe a simple setup that works well for
me with gsch2pcb.

1) An example directory setup I use is like so:

   gaf/gschem-sym
       I make custom gschem symbols here which have footprint attributes
       to match custom pcb elements I make.
   gaf/pcb-elements
       I put all my custom pcb-elements here organized into subdirs.
       All the elements are made with PCB 1.99 by drawing silk
       layer lines, placing vias, use "n" to number the vias, selecting
       everything, copying to buffer, converting buffer to element, then
       saving the buffer elements to file.  I frequently start by loading
       an existing similar element to buffer, break buffer element to
       pieces, placing it and editing from there. The file name of the
       saved element should match the footprint attribute value in the
       appropriate gschem symbol.  Finally, and most important if you
       use my gsch2pcb and might ever also add PCB elements manually,
       edit the pcb element file and duplicate the file name into the
       Description field.  For example, my laydown trimmer
       resistor element file RtrimL initially had the first line:

         Element(0x00000000 "" "" "" 400 800 -75 75 0 100 0x00000000)
       and I edited it to be:
         Element(0x00000000 "RtrimL" "" "" 400 800 -75 75 0 100 0x00000000)

   gaf/project1
       I make this link in all my project dirs so that PCB can find my
       custom PCB elements ("packages" is a magic default for PCB in
       the app-defaults pcb.ad file):
            ln -s ../pcb-elements/ packages
       If there is more than one schematic in the project, I make a
       gsch2pcb "project" file.  For example in my active filter crossover
       project I specify four schematics and a pcb output file name with
       this in the "project" file:
           schematics  sub.sch mid.sch high.sch power.sch
           output-name filter
       Running "gsch2pcb project" will generate filter.pcb or filter.new.pcb
       from the four schematics.

   gaf/project2
   ...

2) In my ~/.gEDA I have both a gnetlistrc and gschemrc file with the line:
      (component-library "${HOME}/gaf/gschem-sym")
   so that gschem will find my custom symbols.

3) I loop through the edit schematics, run gsch2pcb, run pcb sequence I
   describe on my gsch2pcb page.  gsch2pcb automatically searches "packages"
   but can also search other custom PCB element file directories (which
   can be specified in the project file) for project specific elements.
   My projects are now entirely based on custom PCB element files and I think
   it's overall a much simplified experience over trying to update the M4
   database with custom elements.

If you try gsch2pcb on a project you initially started with gschem2pcb,
be sure to run "gsch2pcb --fix-elements" on the schematics first (again,
see the gsch2pcb page).  If anybody has problems with this step I'd
be interested in hearing about it.

Bill

--------
Bill Wilson <bill@gkrellm.net>