[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gEDA-user: gschem2pcb Issues



radiowdvl@hushmail.com wrote:
> Chris was right, this was the problem.
> 
> After changing the (define *m4-pcbdir* "/usr/X11R6/lib/X11/pcb/m4") path in the file gnet-PCBboard.scm like he said, It worked-I didn't get the usual error messages.  It could now find all of the footprints.  However, upon running gschem2pcb on a very simple schematic it produced the netlist ok, but when it moved on to the "-g PCBboard" part, it just sat there cranking away until it finally produced the following .pcb file:
> 
> 
> # release: pcb 1.6.3
> PCB("" 6000 5000)
> Grid(10 0 0)
> Cursor(10 270 3)
> Flags(0x000000d0)
> Groups("1,2,3,s:4,5,6,c:7:8:")
> Styles("Signal,10,40,20:Power,25,60,35:Fat,40,60,35:Skinny,8,36,20")
> 
> Element(0x00 "CONNECTOR_2" "CONN2" "unknown" 160 10 3 100 0x00)
> (
> 	Pin(50 50 50 20 "1" 0x101)
> 	Pin(50 150 50 20 "2" 0x01)
> 	
> 	ElementLine(  0 50   0 150 20)
> 	ElementLine(100 50 100 150 20)


Here is the m4 code that generates the CONNECTOR footprint:

define(`PKG_CONNECTOR',
	`define(`MAXY', `eval(`$4' * 100)')
	define(`MAXX', `eval(`$5' * 100)')
Element(0x00 "$1" "$2" "$3" eval(MAXX + 60) 0 3 100 0x00)
(
	forloop(`row', 1, $4, `forloop(`col', 1, $5,
		`PIN(eval(col * 100 -50), eval(row * 100 -50), 60, 30, eval((row-1)*$5+col))
	') ')

if you look at the first number in your Element(0x00 .. line, you have 
160. If you look at the m4 code, that means parameter $4 was null, which 
would create the infinite loop in the forloop code above.

Seeing how $1 is CONNECTOR_2, I strongly suspect you defined the value 
in gschem to be value=CONNECTOR_2, when it should have been CONNECTOR 2 
with a space, which means you didn't have a valide size parameter.

Remove that extra _ and it should work.

Chris.