blob: 3afaee50495228e85ee82157972e1b9f73a3981e [file] [log] [blame]
Chris Frantz8d799de2022-04-04 11:19:15 -07001# Copyright lowRISC contributors.
2# Licensed under the Apache License, Version 2.0, see LICENSE for details.
3# SPDX-License-Identifier: Apache-2.0
4
Miguel Young de la Sotaec9c6cd2022-04-08 15:16:22 -04005# If you're planning to add to this file, please read
6# //third_party/README.md first.
7
Miguel Young de la Sota98cfa222022-04-06 15:31:06 -04008workspace(name = "lowrisc_opentitan")
Chris Frantze7454162021-08-25 14:43:05 -07009
Timothy Trippel41b46fe2022-08-17 23:01:25 -070010# CRT is the Compiler Repository Toolkit. It contains the configuration for
11# the windows compiler.
12load("//third_party/crt:repos.bzl", "crt_repos")
13crt_repos()
14load("@crt//:repos.bzl", "crt_repos")
15crt_repos()
16load("@crt//:deps.bzl", "crt_deps")
17crt_deps()
18load("@crt//config:registration.bzl", "crt_register_toolchains")
19crt_register_toolchains(riscv32 = True)
Drew Macrae78a58872021-09-07 20:52:19 +000020
Chris Frantz07ece742022-07-28 16:08:37 -070021# Tools for release automation
22load("//third_party/github:repos.bzl", "github_tools_repos")
23github_tools_repos()
24
Timothy Trippelb99dd9c2022-09-26 20:14:00 +000025# Go Toolchain (needed by the Buildifier linter)
Miguel Young de la Sota98cfa222022-04-06 15:31:06 -040026load("//third_party/go:repos.bzl", "go_repos")
27go_repos()
28load("//third_party/go:deps.bzl", "go_deps")
29go_deps()
Drew Macrae78a58872021-09-07 20:52:19 +000030
Timothy Trippelb99dd9c2022-09-26 20:14:00 +000031# Various linters
32load("//third_party/lint:repos.bzl", "lint_repos")
33lint_repos()
34load("//third_party/lint:deps.bzl", "lint_deps")
35lint_deps()
36
Miguel Young de la Sota98cfa222022-04-06 15:31:06 -040037# Python Toolchain + PIP Dependencies
38load("//third_party/python:repos.bzl", "python_repos")
39python_repos()
40load("//third_party/python:deps.bzl", "python_deps")
41python_deps()
42load("//third_party/python:pip.bzl", "pip_deps")
43pip_deps()
Chris Frantze7454162021-08-25 14:43:05 -070044
Chris Frantz3a813b82022-07-28 10:32:42 -070045# Google/Bazel dependencies. This needs to be after Python initialization
46# so that our preferred python configuration takes precedence.
47load("//third_party/google:repos.bzl", "google_repos")
48google_repos()
49load("//third_party/google:deps.bzl", "google_deps")
50google_deps()
51
Miguel Young de la Sota98cfa222022-04-06 15:31:06 -040052# Rust Toolchain + crates.io Dependencies
53load("//third_party/rust:repos.bzl", "rust_repos")
54rust_repos()
55load("//third_party/rust:deps.bzl", "rust_deps")
56rust_deps()
Drew Macrae78a58872021-09-07 20:52:19 +000057
Chris Frantzc69200d2022-05-04 09:36:57 -070058# Cargo Raze dependencies
59load("//third_party/cargo_raze:repos.bzl", "raze_repos")
60raze_repos()
61load("//third_party/cargo_raze:deps.bzl", "raze_deps")
62raze_deps()
Dan McArdle438e9132022-10-31 16:16:05 -040063# The raze instructions would have us call `cargo_raze_transitive_deps`, but
64# that wants to re-instantiate rules_rust and mess up our rust configuration.
65# The single other action that transitive_deps would perform is to load and
66# instantiate `rules_foreign_cc_dependencies`, but this has already been done
67# above, so we can do nothing here.
68
69# OpenOCD
70load("//third_party/openocd:repos.bzl", "openocd_repos")
71openocd_repos()
Chris Frantzc69200d2022-05-04 09:36:57 -070072
Miguel Young de la Sota98cfa222022-04-06 15:31:06 -040073# Protobuf Toolchain
74load("//third_party/protobuf:repos.bzl", "protobuf_repos")
75protobuf_repos()
76load("//third_party/protobuf:deps.bzl", "protobuf_deps")
Timothy Trippel65b77b92022-03-24 15:52:25 -070077protobuf_deps()
78
Miguel Young de la Sota98cfa222022-04-06 15:31:06 -040079# FreeRTOS; used by the OTTF
80load("//third_party/freertos:repos.bzl", "freertos_repos")
81freertos_repos()
Chris Frantz903bcec2021-11-09 16:43:29 -080082
Miguel Young de la Sota98cfa222022-04-06 15:31:06 -040083# RISC-V Compliance Tests
84load("//third_party/riscv-compliance:repos.bzl", "riscv_compliance_repos")
85riscv_compliance_repos()
Chris Frantz74b07402022-04-07 18:07:34 -070086
Arun Thomasb1506d42022-05-13 16:13:44 -040087# CoreMark benchmark
88load("//third_party/coremark:repos.bzl", "coremark_repos")
89coremark_repos()
90
Chris Frantz74b07402022-04-07 18:07:34 -070091# Bitstreams from https://storage.googleapis.com/opentitan-bitstreams/
92load("//rules:bitstreams.bzl", "bitstreams_repo")
93bitstreams_repo(name = "bitstreams")
Chris Frantz74f90952022-04-18 20:57:01 -070094
Chris Frantz6d7c82a2022-05-12 14:20:17 -070095# Setup for linking in external test hooks.
96load("//rules:hooks_setup.bzl", "hooks_setup")
97hooks_setup(
98 name = "hooks_setup",
99 dummy = "sw/device/tests/closed_source",
100)
101
102# Declare the external test_hooks repository.
103load("@hooks_setup//:repos.bzl", "hooks_repo")
Timothy Trippeldf881c02022-05-25 15:48:12 -0700104hooks_repo(name = "manufacturer_test_hooks")
Chris Frantz6d7c82a2022-05-12 14:20:17 -0700105
Chris Frantz74f90952022-04-18 20:57:01 -0700106# The nonhermetic_repo imports environment variables needed to run vivado.
107load("//rules:nonhermetic.bzl", "nonhermetic_repo")
108nonhermetic_repo(name = "nonhermetic")