blob: 9eb984c417f1548adb5c9eac928335cb6c2a27e9 [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 Frantz1a6f7002023-02-14 20:14:11 +000058load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")
59crate_universe_dependencies(bootstrap = True)
60
Chris Frantz95594022023-02-13 17:59:54 +000061load("//third_party/rust/crates:crates.bzl", "crate_repositories")
Chris Frantz1a6f7002023-02-14 20:14:11 +000062crate_repositories()
Dan McArdle438e9132022-10-31 16:16:05 -040063
64# OpenOCD
65load("//third_party/openocd:repos.bzl", "openocd_repos")
66openocd_repos()
Chris Frantzc69200d2022-05-04 09:36:57 -070067
Miguel Young de la Sota98cfa222022-04-06 15:31:06 -040068# Protobuf Toolchain
69load("//third_party/protobuf:repos.bzl", "protobuf_repos")
70protobuf_repos()
71load("//third_party/protobuf:deps.bzl", "protobuf_deps")
Timothy Trippel65b77b92022-03-24 15:52:25 -070072protobuf_deps()
73
Miguel Young de la Sota98cfa222022-04-06 15:31:06 -040074# FreeRTOS; used by the OTTF
75load("//third_party/freertos:repos.bzl", "freertos_repos")
76freertos_repos()
Chris Frantz903bcec2021-11-09 16:43:29 -080077
Alphan Ulusoy95fb5d42023-01-04 12:37:12 -050078# LLVM Compiler Runtime for Profiling
79load("//third_party/llvm_compiler_rt:repos.bzl", "llvm_compiler_rt_repos")
80llvm_compiler_rt_repos()
81
Miguel Young de la Sota98cfa222022-04-06 15:31:06 -040082# RISC-V Compliance Tests
83load("//third_party/riscv-compliance:repos.bzl", "riscv_compliance_repos")
84riscv_compliance_repos()
Chris Frantz74b07402022-04-07 18:07:34 -070085
Arun Thomasb1506d42022-05-13 16:13:44 -040086# CoreMark benchmark
87load("//third_party/coremark:repos.bzl", "coremark_repos")
88coremark_repos()
89
Fatih Balli6a3c2e92022-12-20 22:42:58 +010090# The standard Keccak algorithms
91load("//third_party/xkcp:repos.bzl", "xkcp_repos")
92xkcp_repos()
93
Chris Frantz74b07402022-04-07 18:07:34 -070094# Bitstreams from https://storage.googleapis.com/opentitan-bitstreams/
95load("//rules:bitstreams.bzl", "bitstreams_repo")
96bitstreams_repo(name = "bitstreams")
Chris Frantz74f90952022-04-18 20:57:01 -070097
Chris Frantz6d7c82a2022-05-12 14:20:17 -070098# Setup for linking in external test hooks.
99load("//rules:hooks_setup.bzl", "hooks_setup")
100hooks_setup(
101 name = "hooks_setup",
102 dummy = "sw/device/tests/closed_source",
103)
104
105# Declare the external test_hooks repository.
106load("@hooks_setup//:repos.bzl", "hooks_repo")
Timothy Trippeldf881c02022-05-25 15:48:12 -0700107hooks_repo(name = "manufacturer_test_hooks")
Chris Frantz6d7c82a2022-05-12 14:20:17 -0700108
Chris Frantz74f90952022-04-18 20:57:01 -0700109# The nonhermetic_repo imports environment variables needed to run vivado.
110load("//rules:nonhermetic.bzl", "nonhermetic_repo")
111nonhermetic_repo(name = "nonhermetic")
Jes B. Klinke3a7f9422023-01-19 12:43:34 -0800112
113# Binary firmware image for HyperDebug
114load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
115http_file(
116 name = "hyperdebug_firmware",
Jes B. Klinke155a62c2023-02-14 16:11:54 -0800117 urls = ["https://storage.googleapis.com/aoa-recovery-test-images/hyperdebug_v2.0.20491-956ccf530.bin"],
118 sha256 = "e9c93d2935b9b6a571b547f20fe6177c48a909535d87533b7a0c64fb049bd643",
Jes B. Klinke3a7f9422023-01-19 12:43:34 -0800119)