lowRISC / lowRISC/opentitan

[opentitantool] Tool fails when cw310 isn't connected

Open
#13,440 3 comments 0 reactions 1 assignee View on GitHub

@jon-flatley is already working on this.

Since Jun 28, 2022.

Earlgrey-PROD Triaged SW:opentitantool
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

When invoking `opentitantool` with the `--interface=cw310` argument provided, `opentitantool` prints `Error: Found no USB device` and exits. The [FPGA Setup documentation](https://docs.opentitan.org/doc/getting_started/setup_fpga/#flash-the-bitstream-onto-the-fpga) gives instructions to add this flag to `~/.config/opentitantool/config`. This means that all bazel targets that invoke `opentitantool` will fail if the cw310 isn't plugged in, even in cases where the cw310 isn't used.

A printout of a failing target, for example:
```
$ bazel build //sw/device/silicon_creator/rom_ext:virtual_addr
INFO: Invocation ID: 7a99f9ac-bd1c-47f1-8d6f-211cf0f87fd3
INFO: Analyzed target //sw/device/silicon_creator/rom_ext:virtual_addr (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /usr/local/google/home/jflat/ws/opentitan/sw/device/silicon_creator/rom_ext/BUILD:173:23: Action sw/device/silicon_creator/rom_ext/virtual_addr_fpga_cw310.test_key_0.signed.bin failed: (Exit 1): opentitantool failed: error executing command bazel-out/k8-fastbuild/bin/sw/host/opentitantool/opentitantool image manifest update '--key-file=sw/device/silicon_creator/mask_rom/keys/test_key_0_rsa_3072_exp_f4.der' --sign ... (remaining 3 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox
Error: Found no USB device
ERROR: /usr/local/google/home/jflat/ws/opentitan/sw/device/silicon_creator/rom_ext/BUILD:173:23: Action sw/device/silicon_creator/rom_ext/virtual_addr_fpga_nexysvideo.test_key_0.signed.bin failed: (Exit 1): opentitantool failed: error executing command bazel-out/k8-fastbuild-ST-e846b08c7501/bin/sw/host/opentitantool/opentitantool image manifest update '--key-file=sw/device/silicon_creator/mask_rom/keys/test_key_0_rsa_3072_exp_f4.der' --sign ... (remaining 3 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox
Error: Found no USB device
Target //sw/device/silicon_creator/rom_ext:virtual_addr failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.405s, Critical Path: 0.10s
INFO: 9 processes: 9 internal.
FAILED: Build did NOT complete successfully
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.