6.1 Running lepton-netlist

lepton-netlist has a command-line interface and can be run as any CLI (Command Line Interface) utility in a terminal window, from Makefile or shell script and in a variety of other ways. To get a useful result you at least need to specify:

A simple command to run lepton-netlist might look like this:

lepton-netlist -g drc2 -o report.drc power-supply.sch test-board.sch

Here, you use the backend ‘drc2’ for generating a DRC (Design Rule Checking) report in the file report.drc for your design consisting of two schematic files, power-supply.sch and test-board.sch.

To automate your work on netlist creation, you could use the make command. Create a file named Makefile and write down dependencies between input and output file in it. For the above example the file contents would look like this:

schematics = power-supply.sch test-board.sch
drc-netlist = report.drc

.PHONY: all
all: $(netlist)

$(drc-netlist): $(schematics)
	lepton-netlist -g drc2 -o $@ $<

To update your netlist after editing your schematics, just run make and you’re done!

There are several other lepton-netlist options that can be used for more advanced tasks.