|  | # Copyright Google LLC 2023 | 
|  | # Copyright lowRISC contributors. | 
|  | # Licensed under the Apache License, Version 2.0, see LICENSE for details. | 
|  | # SPDX-License-Identifier: Apache-2.0 | 
|  |  | 
|  | load("//rules:matcha.bzl", "NEXUS_CORE_TARGETS", "sec_flash_binary", "smc_flash_binary") | 
|  |  | 
|  | package(default_visibility = ["//visibility:public"]) | 
|  |  | 
|  | sec_flash_binary( | 
|  | name = "kelvin_test_sc_extflash", | 
|  | srcs = [ | 
|  | "kelvin_test_sc.c", | 
|  | ], | 
|  | copts = [ | 
|  | "-nostdlib", | 
|  | "-ffreestanding", | 
|  | ], | 
|  | per_device_deps = { | 
|  | "fpga_nexus": [NEXUS_CORE_TARGETS.get("secure_core")], | 
|  | }, | 
|  | deps = [ | 
|  | "//hw/ip/ml_top/data:ml_top_regs", | 
|  | "//sw/device/lib:spi_flash", | 
|  | "//sw/device/lib/dif:rv_plic_sec", | 
|  | "//sw/device/lib/dif:smc_ctrl", | 
|  | "//sw/device/lib/dif:tlul_mailbox", | 
|  | "//sw/device/tests:test_lib", | 
|  | ], | 
|  | ) | 
|  |  | 
|  | smc_flash_binary( | 
|  | name = "kelvin_test_smc", | 
|  | srcs = [ | 
|  | "kelvin_test_smc.c", | 
|  | ], | 
|  | copts = [ | 
|  | "-nostdlib", | 
|  | "-ffreestanding", | 
|  | ], | 
|  | per_device_deps = { | 
|  | "fpga_nexus": [NEXUS_CORE_TARGETS.get("smc")], | 
|  | }, | 
|  | deps = [ | 
|  | "//hw/ip/ml_top/data:ml_top_regs", | 
|  | "//sw/device/lib/dif:ml_top", | 
|  | "//sw/device/lib/dif:rv_plic_smc", | 
|  | "//sw/device/lib/dif:tlul_mailbox", | 
|  | "//sw/device/tests:test_lib_smc", | 
|  | "@lowrisc_opentitan//sw/device/lib/dif:rv_timer", | 
|  | ], | 
|  | ) |