blob: bda09215be2dc3bce230ada16a071f4bc7a2c5a5 [file] [log] [blame] [edit]
# Copyright 2023 Google Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
workspace(name = "matcha")
local_repository(
name = "lowrisc_opentitan",
path = "../opentitan-upstream",
)
new_local_repository(
name = "isp_yocto",
build_file = "third_party/vendor/BUILD",
path = "../../hw/ip/isp/ispyocto",
)
new_local_repository(
name = "axi2sramcrs",
build_file = "third_party/vendor/BUILD",
path = "../../hw/ip/isp/axi2sramcrs",
)
local_repository(
name = "kelvin_hw",
path = "../kelvin",
)
new_local_repository(
name = "kelvin-gcc",
build_file = "third_party/kelvin-gcc/BUILD",
path = "../../cache/toolchain_kelvin",
)
new_local_repository(
name = "kelvin-binary",
build_file = "third_party/kelvin-binary/BUILD",
path = "../../out/kelvin/sw/bazel_out",
)
new_local_repository(
name = "cheriot-llvm",
build_file = "third_party/cheriot-llvm/BUILD",
path = "../../cache/cheriot-tools",
)
# Used by airgapped environment
new_local_repository(
name = "kelvin_core",
build_file_content = """
exports_files(glob(["**"]))
filegroup(
name = "all_files",
srcs = glob(["*.*"]),
visibility = ["//visibility:public"],
)
""",
path = "../../out/kelvin/hw/kelvin_core",
)
# Used by airgapped environment
new_local_repository(
name = "fastvdma_core",
build_file_content = """
exports_files(glob(["**"]))
filegroup(
name = "all_files",
srcs = glob(["*.*"]),
visibility = ["//visibility:public"],
)
""",
path = "../../out/matcha/hw/fastvdma_core",
)
# CRT is the Compiler Repository Toolkit. It contains the configuration for
# the windows compiler.
load("@lowrisc_opentitan//third_party/crt:repos.bzl", "crt_repos")
crt_repos()
load("@crt//:repos.bzl", "crt_repos")
crt_repos()
load("@crt//:deps.bzl", "crt_deps")
crt_deps()
load("@crt//config:registration.bzl", "crt_register_toolchains")
crt_register_toolchains(riscv32 = True)
load("//platforms:registration.bzl", "kelvin_register_toolchain")
kelvin_register_toolchain()
load("//platforms:registration.bzl", "cheriot_register_toolchain")
cheriot_register_toolchain()
# Tools for release automation
load("@lowrisc_opentitan//third_party/github:repos.bzl", "github_tools_repos")
github_tools_repos()
# Python Toolchain + PIP Dependencies
load("@lowrisc_opentitan//third_party/python:repos.bzl", "python_repos")
python_repos()
load("@lowrisc_opentitan//third_party/python:deps.bzl", "python_deps")
python_deps()
load("@lowrisc_opentitan//third_party/python:pip.bzl", "pip_deps")
pip_deps()
# Google/Bazel dependencies. This needs to be after Python initialization
# so that our preferred python configuration takes precedence.
load("@lowrisc_opentitan//third_party/google:repos.bzl", "google_repos")
google_repos()
load("@lowrisc_opentitan//third_party/google:deps.bzl", "google_deps")
google_deps()
# Rust Toolchain + crates.io Dependencies
load("@lowrisc_opentitan//third_party/rust:repos.bzl", "rust_repos")
rust_repos()
load("@lowrisc_opentitan//third_party/rust:deps.bzl", "rust_deps")
rust_deps()
load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")
crate_universe_dependencies(bootstrap = True)
load("@lowrisc_opentitan//third_party/rust/crates:crates.bzl", "crate_repositories")
crate_repositories()
# The nonhermetic_repo imports environment variables needed to run vivado.
load("@lowrisc_opentitan//rules:nonhermetic.bzl", "nonhermetic_repo")
nonhermetic_repo(name = "nonhermetic")
# FreeRTOS; used by the OTTF
load("@lowrisc_opentitan//third_party/freertos:repos.bzl", "freertos_repos")
freertos_repos()
# Binary firmware image for HyperDebug
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
http_file(
name = "hyperdebug_firmware",
urls = ["https://github.com/lowRISC/hyperdebug-firmware/releases/download/20240621_01/hyperdebug-firmware.tar.gz"],
sha256 = "649a8cd6d183bc3fb286ea5895c752cfec3aa29b9990f44bb9e7621c0414c7de",
)
# kelvin verilog dependencies
load("@kelvin_hw//rules:repos.bzl", "kelvin_repos")
kelvin_repos()
# Scala setup
load("@io_bazel_rules_scala//:scala_config.bzl", "scala_config")
scala_config(scala_version = "2.13.11")
load("@io_bazel_rules_scala//scala:scala.bzl", "rules_scala_setup", "rules_scala_toolchain_deps_repositories")
rules_scala_setup()
rules_scala_toolchain_deps_repositories(fetch_sources = True)
load("@io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_toolchains")
scala_register_toolchains()
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()
load("@kelvin_hw//rules:deps.bzl", "kelvin_deps")
kelvin_deps()