Skip to content

Commit

Permalink
[ci] fix CI to select correct device for openFPGALoader
Browse files Browse the repository at this point in the history
  • Loading branch information
nbdd0121 authored and AlexJones0 committed Nov 29, 2024
1 parent aaf4ef8 commit 7d49e4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
6 changes: 5 additions & 1 deletion nix/bitstream.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
'';
};
}

0 comments on commit 7d49e4b

Please sign in to comment.