lepton-sch2pcb(1)

πŸ“¦
version 1.9.18 Β· 2 versions
  • 1.9.18 Β· debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.9.16 Β· ubuntu jammy
, in debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ 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:

  1. netlist time β€” lepton-sch2pcb first runs lepton-netlist(1) with the PCB backend (or whatever backend you picked with --backend-net) to create a <name>.net file containing a pcb(1) formatted netlist for the design. iconic πŸ’…
  2. element hunt β€” the second step is to run lepton-netlist(1) again, this time with the gsch2pcb backend (or the backend from --backend-pcb) to find any M4(1) elements the schematics need. any missing elements get found by searching a set of file element directories. if there's no <name>.pcb file for the design yet, it gets created with the required elements. otherwise, any new elements get written out to a <name>.new.pcb file. so either way you're covered 🧚
  3. the purge β€” if a <name>.pcb file 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>.pcb file, and you get a backup in a <name>.pcb.bak file. bye boo πŸ‘‹πŸ’€ (jk we kept a backup, we're not monsters)
  4. pin renaming, final round β€” finally, lepton-netlist(1) gets run a third time with the pcbpins backend (or the backend from --backend-cmd) to create a <name>.cmd file. you can load that into pcb(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 filenames BASENAME.net, BASENAME.pcb, and BASENAME.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 with M4(1). files first, bestie πŸ’–
  • -s, --skip-m4 β€” disable element generation using M4(1) entirely. no m4, none, zero, gone 🚫
  • --m4-file FILE β€” use the M4(1) file FILE in addition to the default M4 files ./pcb.inc and ~/.pcb/pcb.inc. extras welcome πŸŽ€
  • --m4-pcbdir DIRECTORY β€” set DIRECTORY as the directory where lepton-sch2pcb should look for M4(1) files installed by pcb(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 .pcb files. use this if you want pcb(1) to be able to load the (incomplete) .pcb file. 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 .pcb files. use this if you want to hand edit or otherwise preprocess the generated .pcb file before running pcb(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>.cmd file instead of the default one (pcbpins). swap it out if you want πŸ’…
  • --backend-net BACKEND β€” use BACKEND to generate the <name>.net file instead of the default one (PCB). custom net, custom vibe 🌈
  • --backend-pcb BACKEND β€” use BACKEND to generate the <name>.pcb file instead of the default one (gsch2pcb). your board, your backend πŸ‘‘
  • --gnetlist BACKEND β€” in addition to the default backends, run lepton-netlist(1) with -g BACKEND, with output going to <name>.BACKEND. bonus round πŸ”₯
  • --gnetlist-arg ARG β€” pass ARG as an additional argument to lepton-netlist(1). just hand it right over 🎁
  • --empty-footprint NAME β€” if NAME is not none, lepton-sch2pcb will 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, and pcb(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's footprint attribute is not equal to the Description of the corresponding PCB element, update the Description instead of replacing the element. gentler fix, less drama 🩹
  • -q, --quiet β€” don't output information on steps to take after running lepton-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 β€” print lepton-sch2pcb version 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 the netlister(1) program to run. the default is lepton-netlist. change it if you're feeling spicy πŸ”₯

πŸ‘‘ AUTHOR πŸ‘‘

Bill Wilson

shoutout to the author, the actual main character of this page πŸ’–


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 πŸ’…βœ¨πŸ’–