docs.jitx.com is the main source of documentation on the JITX language and IDE.
Also see: Tips For When You're Stuck
You can compile a design by:
- Have VSCode open in a folder that has a stanza.proj file linking the design. Open the file in VSCode and press <Ctrl> + <Enter> to run the design in the JITX Shell.
- Call the JITX executable directly with the file. e.g.
/path/to/.jitx/jitx repl my-file.stanza. (<Ctrl> + <Enter> is a shortcut for this operation)
Try the Check a design tutorial to learn how to check designs in JITX.
Top Level Commands describes
export-bom to export CAD and bill of materials data.
You can also write scripts in JITX to collect, transform, and export any data you want.
Top Level Commands describes
import-cad for bringing in existing CAD data. It's also common to write one-off importers for things like bump-maps or FPGA constraint files. These typically read the source data and emit JITX code that can be run as part of a design.
The best way to edit a schematic in JITX is to organize it by following the Organize a schematic tutorial.
You can pre-place components in the layout using
loc statements to hard-code geometric constraints. If you place components in a module, and then use that module in a design, remember to place the module too. Typically we only pre-place things that actually need to be fixed, then leave it to the solvers, and finish ourselves in CAD.
Symbols are defined in JITX code. You can import them, define them yourself, or use the pre-defined symbols in
inst c : my-component
You can import existing CAD designs to create libraries of JITX code (see the guide How to import from Altium).
To use a library of JITX code, edit the
stanza.proj file in your active project to include a line like
include "../path/to/library/stanza.proj. Everything linked by that
stanza.proj file can now be used in your project.
From the menu in the JITX extension pane, click
Report a bug.
You can test search your JITX libraries for keywords, and query the component database for large-scale searches: Part Query API
When you run
view-board() for your design, the placer will show you a dense layout of your components so you know the overall size of the design.
Pin assignment is not optimized for routability yet (being worked on now - it'll be great!). To lock in specific preferences for pin assignments, directly net pins instead of using
support statements. e.g.
net (stm32.PA sensor.i2c.sda) net (stm32.PA sensor.i2c.scl)
require i2c:i2c from stm32 net (sensor.i2c i2c)
We have 1500+ STM32 microcontrollers in our component database.
designs/mcu.stanza in the open components database shows how to query for microcontrollers based on parameters like which STM32 series you want to use.
The ESP32-PICO-D4 is modeled in the open components database, and you can also look to
designs/ble-mote.stanza as an example design using the ESP32.
A JITX design is code, and you can share it like you share any other file. We usually keep the code for a project checked into a Git repository, which makes for easy collaboration on JITX designs and generators.
By default, when you assign a position to an instance in a module it's in a global frame associated with that module. You can create relative poses using the
relative-to keyword in a
stanza.proj files are used to link your JITX code together. They contain pointers to which packages are defined where. For example in ocdb, the stanza.proj file for TDK components contains:
package ocdb/components/tdk/MPZ1608 defined-in "MPZ1608.stanza"
For example the root level stanza.proj brings in the file mapping TDK components:
Fork the open source repository and create a pull request. This is a great way to get feedback on your code while contributing back to the community.
utils/file-system package has a helper function for returning the current working directory as a
import utils/file-system println(get-cwd())
There is a known bug in Visual Studio Code that causes the following error message :
Error loading webview: Error: Could not register service workers: InvalidStateError: Failed To Register a ServiceWorker: The document is in an invalid state.
This error occurs happens when Visual Studio Code updates itself automatically and is not unique to JITX. It can be tracked here :
A workaround is to kill any running VSCode processes and restart.
Open Task Manager, locate any running instances of VS Code, and force kill them.
This error usually occurs after an update of VS Code. To prevent it from arising, you can disable auto updates.