Forum 2005-2010 (read only)
Bugs & Suggestions
To have reference designs in gEDA & PCB files
Topic: To have reference designs in gEDA & PCB files
(Read 8055 times)
Re: To have reference designs in gEDA & PCB files
Jan 01, 2011, 11:51 pm
mmmh! Coding is not what I do with any real knowledge about what I am doing, as is obvious from some of the garbage I have posted around the forum in the past.
If you have a copy of the pcb source code, then to change the number of trace styles available is easy. In the top level directory is a file called [glow]globalconst.h[/glow] and this just needs the [glow]#define NUM_STYLES 4[/glow] entry changing to whatever value you want. That's it!
The mildly awkward bit is satisfying all the library dependencies needed for the source code to be compiled. I am not sure if everything necessary is in the Ubuntu repositories, I am using Debian and I seem to remember it was still a bit of a struggle to get everything.
The other file that needs altering is (on a Debian system) [glow]/usr/local/share/gEDA/scheme/gnet-gsch2pcb.scm[/glow] and this has to be altered so it writes the same number of trace styles as the figure used in the pcb code mod above.
The difficult bit (for me) is that this now introduces a screaming bug into the program. When trying to load an already existing (from the pre code mod days) pcb layout the application crashes when it tries to free the memory used by the non existent (in the old board layout) trace styles. Using the gdb debugger I have traced this right down to the line of source code where it actually happens, but fixing it is for me, as I said earlier another ball game. If I study the code for long enough I may get there but it won't be any time soon.
If anybody has any advice or knowledge about what to do about this I would like to hear it.