blob: b1af82e863d1ea5d65561fe238e4c3901fa4cbf6 [file] [log] [blame] [view]
Miguel Osorio40caa9e2021-05-27 21:45:20 -07001---
2title: "OpenTitan Software Build Instructions"
3---
Miguel Young de la Sotad258b332019-10-29 14:05:23 -05004
Timothy Trippelaa870692022-06-09 16:38:23 -07005All OpenTitan software is built with [Bazel](https://bazel.build/).
Miguel Young de la Sota8ff30b82019-11-25 12:58:34 -06006
Timothy Trippelaa870692022-06-09 16:38:23 -07007For example, to build and run the OpenTitan UART smoke test located in `sw/device/tests/` for Verilator, run
Miguel Osorio40caa9e2021-05-27 21:45:20 -07008
Miguel Young de la Sota8ff30b82019-11-25 12:58:34 -06009```console
Timothy Trippelaa870692022-06-09 16:38:23 -070010cd "$REPO_TOP"
11bazel test --test_output=streamed //sw/device/tests:uart_smoketest_sim_verilator
Miguel Young de la Sotad258b332019-10-29 14:05:23 -050012```
Miguel Young de la Sota8ff30b82019-11-25 12:58:34 -060013
Timothy Trippelaa870692022-06-09 16:38:23 -070014The resulting binaries will be located under `bazel-out/`. For more information, check out [the Building Software guide]({{< relref "doc/getting_started/build_sw" >}}).