lepton-sch2pcb(1)
β¨ lepton-sch2pcb β the manual page, but make it cute β¨
okay bestie, welcome to lepton-sch2pcb(1), section 1 of the manual, brought to you by the Lepton EDA girlies π this page is gonna walk you through updating your PCB layouts straight from your Lepton EDA schematics, and honestly? it's giving glow up. let's get into it π¦
πΈ NAME πΈ
lepton-sch2pcb β Update PCB layouts from Lepton EDA schematics
like. it literally takes your schematic and refreshes your board file. the pipeline is pipeline-ing π
β SYNOPSIS β
lepton-sch2pcb [OPTION ...] {PROJECT | FILE ...}
yep that's it. options first, then either a project file or a whole lil list of schematic files. easy π
π DESCRIPTION π
so lepton-sch2pcb is basically a frontend to lepton-netlist(1), and its whole job is helping you create and update pcb(1) printed circuit board layouts based on a set of electronic schematics made with lepton-schematic(1). no cap, it's the middleman you didn't know you needed π«Ά
instead of typing out every single option and input schematic FILE on the command line, lepton-sch2pcb can just read a PROJECT file instead. lazy girl approved β¨
here's the run of show, step by step, because this tool literally does four things and you're gonna wanna know them all:
- netlist time β
lepton-sch2pcbfirst runslepton-netlist(1)with thePCBbackend (or whatever backend you picked with--backend-net) to create a<name>.netfile containing apcb(1)formatted netlist for the design. iconic π - element hunt β the second step is to run
lepton-netlist(1)again, this time with thegsch2pcbbackend (or the backend from--backend-pcb) to find anyM4(1)elements the schematics need. any missing elements get found by searching a set of file element directories. if there's no<name>.pcbfile for the design yet, it gets created with the required elements. otherwise, any new elements get written out to a<name>.new.pcbfile. so either way you're covered π§ - the purge β if a
<name>.pcbfile does exist, it gets searched for elements with a non-empty element name that have no matching schematic symbol. those elements get removed from the<name>.pcbfile, and you get a backup in a<name>.pcb.bakfile. bye boo ππ (jk we kept a backup, we're not monsters) - pin renaming, final round β finally,
lepton-netlist(1)gets run a third time with thepcbpinsbackend (or the backend from--backend-cmd) to create a<name>.cmdfile. you can load that intopcb(1)to rename all the pin names in the PCB layout so they match the schematic. matching outfits, but for pins π
π OPTIONS π
twenty of them. all of them. we're not skipping a single one, periodt.
-o,--output-name=BASENAMEβ use output filenamesBASENAME.net,BASENAME.pcb, andBASENAME.new.pcb. by default, the basename of the first schematic file in the list of input files gets used, so if you don't set this, the tool just picks for you π-d,--elements-dir=DIRECTORYβ add DIRECTORY to the list of directories to search for PCB file elements. by default these directories get searched if they exist:./packages,/usr/local/share/pcb/newlib,/usr/share/pcb/newlib,/usr/local/lib/pcb_lib,/usr/lib/pcb_lib,/usr/local/pcb_lib. look at that list, it's giving thorough π-f,--use-filesβ force use of file elements in preference to elements generated withM4(1). files first, bestie π-s,--skip-m4β disable element generation usingM4(1)entirely. no m4, none, zero, gone π«--m4-file FILEβ use theM4(1)file FILE in addition to the default M4 files./pcb.incand~/.pcb/pcb.inc. extras welcome π--m4-pcbdir DIRECTORYβ set DIRECTORY as the directory wherelepton-sch2pcbshould look forM4(1)files installed bypcb(1). telling it where the m4 files live, so helpful of you π«Ά-r,--remove-unfoundβ don't include references to unfound elements in the generated.pcbfiles. use this if you wantpcb(1)to be able to load the (incomplete).pcbfile. this is enabled by default, so it's already on unless you say otherwise β¨-k,--keep-unfoundβ keep include references to unfound elements in the generated.pcbfiles. use this if you want to hand edit or otherwise preprocess the generated.pcbfile before runningpcb(1). the crafty option, iykyk βοΈ-p,--preserveβ preserve elements in PCB files which are not found in the schematics. and heads up: since elements with an empty element name (schematic "refdes") are never deleted, this option is rarely useful. lowkey redundant, but it's there for you π--backend-cmd BACKENDβ use BACKEND to generate the<name>.cmdfile instead of the default one (pcbpins). swap it out if you want π--backend-net BACKENDβ use BACKEND to generate the<name>.netfile instead of the default one (PCB). custom net, custom vibe π--backend-pcb BACKENDβ use BACKEND to generate the<name>.pcbfile instead of the default one (gsch2pcb). your board, your backend π--gnetlist BACKENDβ in addition to the default backends, runlepton-netlist(1)with-g BACKEND, with output going to<name>.BACKEND. bonus round π₯--gnetlist-arg ARGβ pass ARG as an additional argument tolepton-netlist(1). just hand it right over π--empty-footprint NAMEβ if NAME is notnone,lepton-sch2pcbwill not add elements for components with that name to the PCB file. β οΈ but note: if the omitted components have net connections, they will still appear in the netlist, andpcb(1)will warn that they are missing. so like, they're not gone-gone, they're just flagged as missing π--fix-elementsβ if a schematic component'sfootprintattribute is not equal to theDescriptionof the corresponding PCB element, update theDescriptioninstead of replacing the element. gentler fix, less drama π©Ή-q,--quietβ don't output information on steps to take after runninglepton-sch2pcb. shhh π€«-v,--verboseβ output extra debugging information. and bestie, you can specify this option twice (-v -v) to get additional debugging for file elements. double the v, double the tea β-h,--helpβ print a help message. classic π-V,--versionβ printlepton-sch2pcbversion information. who are you, really? πͺ
π¦ PROJECT FILES π¦
a lepton-sch2pcb project file is a file (not ending in .sch) containing a list of schematics to process plus some options. it's the chill way to do this, honestly β¨
any long-form command line option can appear in the project file with the leading -- removed. but β and this is the important part β with the exception of --gnetlist-arg, --fix-elements, --verbose, and --version. those four are not allowed in the project file. them's the rules π
schematics should be listed on a line beginning with schematics. so like:
an example project file might look like:
schematics partA.sch partB.sch
output-name design
see? so clean, so readable, so giving organized π
π ENVIRONMENT π
NETLISTERβ specifies thenetlister(1)program to run. the default islepton-netlist. change it if you're feeling spicy π₯
π AUTHOR π
Bill Wilson
shoutout to the author, the actual main character of this page π
π COPYRIGHT π
Copyright Β© 2012-2017 gEDA Contributors.
Copyright Β© 2017-2022 Lepton Developers.
License GPLv2+: GNU GPL version 2 or later. Please see the `COPYING'
file included with this program for full details.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
fr fr, it's free, go wild, but there's no warranty bestie β read the COPYING file for the full details π
β SEE ALSO β
go read those too, they're the whole friend group π«Ά
and that's the page!! this one's from Lepton EDA, version 1.9.18.20220529, dated May 29, 2022 β mwah, thanks for reading, you ate that π
β¨π
π¦ where this page comes from
- debian bookworm: lepton-eda 1.9.18-1 Β· GPL-2.0-or-later
- debian trixie: lepton-eda 1.9.18-3 Β· GPL-2.0-or-later
- nixos 26.05: lepton-eda 1.9.18-20220529
- nixpkgs unstable: lepton-eda 1.9.18-20220529
- ubuntu noble: lepton-eda 1.9.18-2build2 Β· GPL-2.0-or-later
- ubuntu questing: lepton-eda 1.9.18-3
- ubuntu resolute: lepton-eda 1.9.18-4 Β· GPL-2.0-or-later
- ubuntu stonking: lepton-eda 1.9.18-4 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms