diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4bd0fee3..f3917d68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -150,7 +150,7 @@ jobs: - name: Flash bitstream run: | - nix run .#bitstream-load + DEVICE=/dev/ttySONATA_JTAG_FPGA nix run .#bitstream-load - name: Run software tests run: | diff --git a/nix/bitstream.nix b/nix/bitstream.nix index 8d059566..c781f3bc 100644 --- a/nix/bitstream.nix +++ b/nix/bitstream.nix @@ -61,7 +61,11 @@ in { runtimeInputs = [pythonEnv pkgs.openfpgaloader]; text = '' BITSTREAM=$(find ./ -type f -name "lowrisc_sonata_system_0.bit") - openFPGALoader -c ft4232 "$BITSTREAM" + if [[ -n "''${DEVICE-}" ]]; then + openFPGALoader -c ft4232 -d "$DEVICE" "$BITSTREAM" + else + openFPGALoader -c ft4232 "$BITSTREAM" + fi ''; }; }