nickoe / kicadocaml

Automatically exported from code.google.com/p/kicadocaml
0 stars 0 forks source link

debugging kicadocaml board loading code #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
A user has had a problem loading a board, and wanted to figure out how to
fix the error/exception.  Here is my response as a summary of how I fix any
errors, for the purpose of sharing on the web - 

Hi Yann -

okay, what I do to debug loading the board is to call the load
function outside of the toploop.  e.g. edit kicadocaml.ml and add in

openFile top "/home/tlh24/svn/myopen/emg_dsp/stage4/stage4.brd ;

(this line is presently commented out; uncomment and replacing my
board with the path to your board)

then compile a bytecode executable, and run it with
> ocamlrun -b kicadocaml
(the reason for this is that the Tcl/Tk toplevel catches any unhandled
exceptions.  things get better in ocaml 3.11, i think. )

alternately, email your board file to me - i will not share it - and i
will happily debug this for you.

thanks!
Tim

Original issue reported on code.google.com by sideskate@gmail.com on 26 Mar 2010 at 12:49

GoogleCodeExporter commented 9 years ago
Thanks, that seems to do the trick. I now got a traceback. Although the last 
three
levels were from "unknown location", probably meaning a generated regex parser 
(as
it's a Pcre.extract call), it also seems to point out the problem. The "Op" 
lines,
apparently auto placement parameters, have arguments with value A. Apparently 
there
was a typo with a / instead of a \ in mod.ml.

Original comment by yann.ver...@gmail.com on 26 Mar 2010 at 11:36

Attachments:

GoogleCodeExporter commented 9 years ago
Hm, that's quite a simple fix - now it's in svn - wonder why I did not see it 
in my
board files?  Oh well.

Original comment by sideskate@gmail.com on 29 Mar 2010 at 3:15

GoogleCodeExporter commented 9 years ago
I tried kicadocaml on my design and it cannot load any of my boards. I use 
testing version of KiCad, so I'm guessing there might be file format 
incompatibilities. Shall I send you my design so you could try it out? I'm 
really curious about the features kicadocaml offers but wouldn't shift back to 
old version of KiCad.

Original comment by svof...@gmail.com on 7 Dec 2012 at 6:47

GoogleCodeExporter commented 9 years ago
Absolutely -- send or post your board & schematic and I can have a
look at it to figure out where the error is.

Tim

Original comment by sideskate@gmail.com on 7 Dec 2012 at 6:52

GoogleCodeExporter commented 9 years ago
Cool! I don't mind sharing it, so here goes.

Original comment by svof...@gmail.com on 7 Dec 2012 at 6:54

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry about the delay in response. 

I haven't been tracking changes to PCBNEW in a while -- looks like they shifted 
to decimal representation of all coordinates.  This makes total sense, and I'm 
glad it happened, but will take a little work to update kicadocaml :)

Original comment by sideskate@gmail.com on 12 Dec 2012 at 8:02

GoogleCodeExporter commented 9 years ago
That is cool, good things come with waiting ;)

Original comment by svof...@gmail.com on 12 Dec 2012 at 8:03

GoogleCodeExporter commented 9 years ago
Hi, what about the new kicad_pcb format? Is there hope to have it supported by 
kicadocaml?

Original comment by svof...@gmail.com on 12 Apr 2015 at 11:20