Skip to content

How to Export from JITX into Kicad

We can export a JITX design to a Kicad project that can be opened immediately in Kicad 7 or 8.

Before you start, make sure you have Kicad 7 or 8 installed.

Set up export-cad

We configure an export to Kicad in our program by first creating a new design in JITX. Then, add the following code to the end of your main.stanza file.

set-main-module(my-design)

val board-shape = Rectangle(10.0, 10.0)

pcb-board my-circuit-board :
  stackup: my-stackup
  boundary: board-shape
  signal-boundary: board-shape

  layer(Silkscreen("F-silk", Top)) =
    Text("Board v1.2.3", 2.54, C, loc(0.0, 0.0))

set-board(my-circuit-board)
set-current-design("jitx-design")
set-export-backend(`kicad)
set-use-layout-groups()
export-cad()
set-current-design("jitx-design") This sets the directory where our Kicad project will be created

set-export-backend(`kicad) This specifies that Kicad should be used for export.

set-use-layout-groups() This defines that components should be grouped in the generated layout by layout-group.

export-cad() Run the exporter.

Custom Layer Mapping

Currently, the {@linke type:CustomLayer} geometry is exported using two mappings.

Static Mapping

CustomLayer Layer Name Kicad Layer Name
"Drawings" "Dwgs.User"
"Comments" "Cmts.User"
"Eco1" "Eco1.User"
"Eco2" "Eco2.User"
"Margin" "Margin"
"Fab" "Fab"

Other Custom Layers

Any other custom layers are mapped in order of appearance to the layers User.2, User.3, User.4, ..., User.8. Any custom layers beyond User.8 are all flattened into User.9.

Open Kicad and run the design

Launch Kicad.

In JITX, run a generator that includes the export functions defined above.

A ready-to-use Kicad project will be generated for you in the "CAD/kicad" directory. Open this project. You've now imported a JITX design into Kicad!