blob: 690d41fdb3514bf4b61356ba0cb7505c80c42d49 [file] [log] [blame]
# Copyright 2023 Google LLC.
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
package(default_visibility = ["//visibility:public"])
BOOTSTRAP_DEPS = [
"//hw/top_matcha/sw/autogen:top_matcha",
"//hw/top_matcha/ip/flash_ctrl/data/autogen:flash_ctrl_regs",
"@lowrisc_opentitan//hw/ip/gpio/data:gpio_regs",
"@lowrisc_opentitan//hw/ip/otp_ctrl/data:otp_ctrl_regs",
"@lowrisc_opentitan//sw/device/lib/base:abs_mmio",
"@lowrisc_opentitan//sw/device/lib/base:bitfield",
"@lowrisc_opentitan//sw/device/lib/base:hardened",
"@lowrisc_opentitan//sw/device/silicon_creator/lib:error",
"@lowrisc_opentitan//sw/device/silicon_creator/lib/base:chip",
"@lowrisc_opentitan//sw/device/silicon_creator/lib/drivers:flash_ctrl",
"@lowrisc_opentitan//sw/device/silicon_creator/lib/drivers:otp",
"@lowrisc_opentitan//sw/device/silicon_creator/lib/drivers:rstmgr",
"@lowrisc_opentitan//sw/device/silicon_creator/lib/drivers:spi_device",
]
cc_library(
name = "bootstrap",
srcs = ["bootstrap.c"],
hdrs = ["bootstrap.h"],
deps = BOOTSTRAP_DEPS,
)
cc_library(
name = "bootstrap_no_otp",
srcs = ["bootstrap.c"],
hdrs = ["bootstrap.h"],
defines = ["OTP_IS_RAM"],
deps = BOOTSTRAP_DEPS,
)