pcb-rnd knowledge pool

 

gsch2pcb-rnd vs. import schematics

gsch2pcb_import by Tibor 'Igor2' Palinkas on 2016-12-17

Tags: insight, gsch2pcb-rnd, import, schematics

node source

 

 

Abstract: gsch2pcb-rnd is a standalone, command line tool for importing. The alternative for the same flow is the pcb-rnd builtin 'import schematics' feautre. The two paths are equivalent in capabilities. There is a misunderstanding about one path is not as capable in some situations as the other; this article shows how equal they are.

  Based on the mailing list archives.

  gsch2pcb-rnd import schematics
works from gui yes 1 yes
works from cli yes yes 2
multiple sch pages yes yes 3

^1: import schematics can work by running make. The action knows how to do it, it's just not bound to a menu item. Making a new menu entry takes like 15 seconds. Unfortunately 'make' support is sort of hardwired and makes assumptions about your Makefile. My long term plan is to convert this to a generic "acquire the update by running an external command". Which means it could easily run gsch2pcb-rnd or gsch2pcb with a few lines of wrapper shell script or any other 3rd party glue program that imports refdes-footprints-value triplets and/or netlists from any source, be it written in shell, awk, python or whitespace/brainfuck/piet.

^2: import schematics is a plugin that lives in pcb-rnd. But who said pcb-rnd is about GUI? The plugin doesn't make anything remotely GUI-related, it merely provides an action. One can emulate gsch2pcb-rnd by running pcb-rnd in batch mode with an action script that runs the import schematics action. Your stock pcb-rnd is obviously more heavy-weight than gsch2pcb-rnd, but if you compile it with all plugins disabled, the minimal core itself is not that bad. On my 32 bit x86 the stripped executable of gsch2pcb-rnd is 204k, pcb-rnd configured with '--all=disable --buildin-import_sch --buildin-hid_batch' is 994k. It's still 4.5x bigger, but not like 10x or 100x.

^3: action: Import(gnetlist, sch1, sch2, sch3, ...)

Anyway at the end, I will have the same code behind both mechanism, and the stand-alone tool gsch2pcb-rnd will be just a wrapper around the plugin.