blob: cbfb01e9893f738846f8116f2e5dc26aad166819 [file]
# Licensed under the Apache-2.0 license
# SPDX-License-Identifier: Apache-2.0
load("@pigweed//pw_kernel/tooling:system_image.bzl", "system_image")
load("@pigweed//pw_kernel/tooling:target_codegen.bzl", "target_codegen")
load("@pigweed//pw_kernel/tooling:target_linker_script.bzl", "target_linker_script")
load("@rules_rust//rust:defs.bzl", "rust_binary")
load("//target/veer:defs.bzl", "TARGET_COMPATIBLE_WITH")
load("//target/veer/tooling:caliptra_runner.bzl", "caliptra_runner", "caliptra_test")
system_image(
name = "interrupts",
kernel = ":target",
platform = "//target/veer",
)
target_linker_script(
name = "linker_script",
system_config = ":system_config",
tags = ["kernel"],
template = "//target/veer:linker_script_template",
)
filegroup(
name = "system_config",
srcs = ["system.json5"],
)
target_codegen(
name = "codegen",
arch = "@pigweed//pw_kernel/arch/riscv:arch_riscv",
system_config = ":system_config",
)
rust_binary(
name = "target",
srcs = ["target.rs"],
edition = "2024",
target_compatible_with = TARGET_COMPATIBLE_WITH,
deps = [
":codegen",
":linker_script",
"//target/veer:entry",
"@pigweed//pw_kernel/arch/riscv:arch_riscv",
"@pigweed//pw_kernel/kernel",
"@pigweed//pw_kernel/subsys/console:console_backend",
"@pigweed//pw_kernel/target:target_common",
"@pigweed//pw_log/rust:pw_log",
],
)
caliptra_runner(
name = "interrupts_runner_emulator",
interface = "emulator",
tags = ["manual"],
target = ":interrupts",
)
caliptra_test(
name = "emulator_test",
interface = "emulator",
# caliptra_runner.py hardcodes --i3c-port=65534, so caliptra emulator
# tests cannot run in parallel without an EADDRINUSE collision.
tags = [
"emulator",
"exclusive",
],
target = ":interrupts",
)