delorie.com/archives/browse.cgi   search  
Mail Archives: geda-help/2014/04/09/00:17:40

X-Authentication-Warning: delorie.com: mail set sender to geda-help-bounces using -f
X-Recipient: geda-help AT delorie DOT com
Date: Wed, 9 Apr 2014 06:21:09 +0200 (CEST)
X-X-Sender: igor2 AT igor2priv
To: geda-help AT delorie DOT com
X-Debug: to=geda-help AT delorie DOT com from="gedah AT igor2 DOT repo DOT hu"
From: gedah AT igor2 DOT repo DOT hu
Subject: Re: [geda-help] Workflow Schematic Editor -> schem2pcb -> PCB
Designer won't work!
In-Reply-To: <53445BD8.4070505@mochima.com>
Message-ID: <alpine.DEB.2.00.1404090557260.8305@igor2priv>
References: <533F4740 DOT 5010606 AT mochima DOT com> <alpine DOT DEB DOT 2 DOT 00 DOT 1404050517330 DOT 8305 AT igor2priv> <533F89FE DOT 2060808 AT mochima DOT com> <alpine DOT DEB DOT 2 DOT 00 DOT 1404050746030 DOT 8305 AT igor2priv> <534000E2 DOT 5080703 AT mochima DOT com> <alpine DOT DEB DOT 2 DOT 00 DOT 1404060625040 DOT 8305 AT igor2priv>
<5342AF6B DOT 6010405 AT mochima DOT com> <alpine DOT DEB DOT 2 DOT 00 DOT 1404080523041 DOT 8305 AT igor2priv> <53445BD8 DOT 4070505 AT mochima DOT com>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
MIME-Version: 1.0
Reply-To: geda-help AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-help AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com


On Tue, 8 Apr 2014, Carlos Moreno wrote:

>
> So, I did the experiments as you suggested:   worked on the machine
> with the distro packages (installed directly through the Ubuntu repositories).
> gEDA version 1.6.2 20110115;  PCB Designer version 20110918.
>
> Worked with the exact same files I had uploaded in the previous
> message  (the ones you used and that worked on your side).  Quoting
> from my previous message --- the following files:
>
>> At any rate, I placed the footprint files at:
>> http://www.mochima.com/tmp/LME49811.fp and
>> http://www.mochima.com/tmp/R-SMT-0805.fp
>> 
>> Quoting from my previous message --- the above files go with:
>> Symbol file for the LME: http://www.mochima.com/tmp/LME49811.sym
>> 
>> Schematic using this LME and just two resistors and a couple of
>> connections: http://www.mochima.com/tmp/nada-LME49811.sch 
>
> This time, I used gsch2pcb  (command-line).
>
> The footprint files are located at /usr/share/pcb/pcblib-newlib/generic/
> The LME49811.sym file is located at  /home/carlos/tmp/symbols/
> (the .gEDA/schemrc file contains the line:
> (component-library "/home/carlos/tmp/symbols/" "User-defined") )
>
>
> I did the following:  Created a directory PCBs and placed the .sch file
> only.  Run gsch2pcb, then cp * step-1/  to copy all files generated into
> that directory.  Then, open the .pcb file with PCB Designer, load nets,
> disperse, optimize rats, then save.  Then, cp * step-2/
>
> I enabled directory listings so that you can see all the files. Here's
> the link:
>
> http://www.mochima.com/tmp/PCBs/
>
> Hope we can figure out where the problem is!   As you pointed out, a
> bug in the PCB or sch2pcb programs sounds strange, since I tried on
> several different machines, Ubuntu, CentOS, and with the distro versions
> and also the versions installed from source (from the latest stable versions).


The netlist in step2 is broken: it lists all the Rs but not any pin of U1. 
The netlist is generated from the sch (gsch2pcb should use gnetlist for 
this afaik) and does not depend on footprints, but it does depend on 
symbols being accessible.

Most probably gsch2pcb didn't find your LME symbol and footprint. There 
are search paths where it looks for those and there are multiple ways 
changing them. The ones I know about:

1. I've built my own sym and fp libs and configured gsch2pcb using 
~/.gEDA/gafrc (symbol paths as "component-library") and ~/.gEDA/gsch2pcb 
(footprint path as "elements-dir") to point to my local svn checkout of 
my lib. Useful if you plan to maintain your libs.


2. A .prj file may also specify paths, so if you have local custom 
syms/fps, you may want to use a .prj for gsch2pcb. Useful if you are 
experimenting or have local syms/fps that won't be part of a bigger lib.

3. embed the symbol in the shcematics (gschem: select the symbol and 'eb' 
or edit menu / embed component); this means the symbol data is copied from 
the file into the .sch, so the .sch is self-describing. This is good for 
uploading/porting your sch and will make sure gsch2pcb finds the symbol at 
least, but is bad if you fix something on your symbol (e.g. that nc to pas 
pin property) and you have to remember 200 schematics you have the symbol 
already embedded and have to fix all them manually. Once the symbol is 
embedded, gsch2pcb will find it for sure; for the footprint, gsch2pcb 
seems to have a "-d DIR" command line option to modify the footprint 
search paths

4. in theory this works, but I don't recommend doing this: you could just 
copy our footprint and symbol to the default lib, 
/usr/share/pcb/newlib and /usr/share/gEDA/sym  on Debian (and probably on
  Ubuntu as well). This is probably the quickest but dirtiest solution; all 
tools would find your files without extra configuration but your system 
will be a mess and maintaining/copying your (part of the) fp/sym library 
would be hard.


Once this si done and you repeat the gsch2pcb step,  you should see the 
following differences in the output:

A. you have 4 components (3 resistors and the LME), so the netlist 
must reference all of them as long as they are really connected on 
the sch; the netlist format is trivial, just cat the file and see 
if all R1, R2, R3 and U1 are in there; if this doesn't happen and U1 is 
missing, it's the sym on the sch that gnetlist (from gsch2pcb) didn't 
find; this is the current state in your uploaded step 1

B. gsch2pcb should say it found and embedded 4 components, not 3. If it 
says 3 embedded and 0 missing, probably point A. above went wrong (it 
didn't even know you needed U1). If it says 3 embedded, 1 missing then it 
has found the footprint for the 3 resistors, it knew you wanted U1 but 
didn't find the footprint for it.

C. if it says 4 components embedded, the PCB should be good to go: it 
should contain R1, R2, R3 and U1. If the netlist looked OK at point A., 
you can load the pcb and the netlist and it should just work. You need the 
cmd file only if some pins are renamed - generally won't happen if all 
pins have only numbers.


Regards,

Tibor

P.S. btw, this demo-board-level thing shouldn't be this hard normally; 
your case is special because you used your own symbol and footprint, and, 
as you see, using symbols or footprints from outside of the standard 
library requires an extra step of setup and when it goes wrong the error 
messages/symptomps are not always intuitive. Also that GUI gsch2pcb 
wrapper may have done something strange that could interfere, but I am 
still not sure about that part - once you figure it out using gsch2pcb you 
could check again and compare what does that tool do differently.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019