-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
openocd-vexriscv is required because openocd-riscv does not allow the CPU to be reset while openocd is connected. This is unfortunately required for the current state of swCcTopologyTest and is non-trivial to fix. We intend to at some point remove this test case and get rid of the custom openocd version in favor of the "official" riscv version.
- Loading branch information
Showing
7 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ pkgs ? import ./nixpkgs.nix {} }: | ||
|
||
pkgs.stdenv.mkDerivation rec { | ||
name = "openocd-vexriscv"; | ||
|
||
buildInputs = [ | ||
pkgs.autoconf | ||
pkgs.automake | ||
pkgs.coreutils | ||
pkgs.git | ||
pkgs.libtool | ||
pkgs.libusb1 | ||
pkgs.libyaml | ||
pkgs.pkg-config | ||
pkgs.texinfo | ||
pkgs.which | ||
]; | ||
|
||
src = pkgs.fetchgit { | ||
url = "https://github.com/SpinalHDL/openocd_riscv.git"; | ||
rev = "058dfa50d625893bee9fecf8d604141911fac125"; | ||
sha256 = "sha256-UuX4Zfr9DiJx60nvBAv+9xCbWXExrk5KNSC5V5e4rsw="; | ||
fetchSubmodules = true; | ||
deepClone = true; | ||
postFetch = '' | ||
# See: https://github.com/NixOS/nixpkgs/issues/8567#issuecomment-1846499599 | ||
find "$out/" -type d -name '.git' | xargs rm -rf | ||
''; | ||
}; | ||
|
||
installPhase = '' | ||
SKIP_SUBMODULE=1 ./bootstrap | ||
./configure --enable-ftdi --enable-dummy --prefix=$out | ||
make -j $(nproc) | ||
make install | ||
mv $out/bin/openocd $out/bin/openocd-vexriscv | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters