| # Copyright 2022 Google contributors. |
| |
| load("//rules:matcha.bzl", "bin_to_c_file") |
| |
| package(default_visibility = ["//visibility:public"]) |
| |
| # TODO(b/268228671): Remove binary kelvin_sim_verilator_elf. |
| genrule( |
| name = "kelvin_sim_verilator_bin_objcopy", |
| srcs = ["//sw/device/tests/testdata:kelvin_sim_verilator_elf"], |
| outs = [ |
| "kelvin_sim_verilator.bin", |
| ], |
| cmd = "$(location @com_lowrisc_toolchain_rv32imc_compiler//:bin/riscv32-unknown-elf-objcopy) -O binary -g $< $@", |
| tools = [ |
| "@com_lowrisc_toolchain_rv32imc_compiler//:bin/riscv32-unknown-elf-objcopy", |
| ] |
| ) |
| |
| bin_to_c_file( |
| name = "kelvin_sim_verilator_bin", |
| srcs = [":kelvin_sim_verilator.bin"], |
| var_name = "kelvin_sim_verilator_bin", |
| ) |