2015-08-26 21:04:27 +01:00
|
|
|
{ stdenv, fetchurl, libftdi, libusb1, pkgconfig, hidapi }:
|
2009-09-20 17:43:16 +01:00
|
|
|
|
2013-02-09 13:07:30 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "openocd-${version}";
|
2017-02-06 19:09:45 +00:00
|
|
|
version = "0.10.0";
|
2009-09-20 17:43:16 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-07-14 02:17:07 +01:00
|
|
|
url = "mirror://sourceforge/openocd/openocd-${version}.tar.bz2";
|
2017-02-06 19:09:45 +00:00
|
|
|
sha256 = "1bhn2c85rdz4gf23358kg050xlzh7yxbbwmqp24c0akmh3bff4kk";
|
2009-09-20 17:43:16 +01:00
|
|
|
};
|
|
|
|
|
2017-09-05 22:26:13 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ libftdi libusb1 hidapi ];
|
2014-03-30 14:45:00 +01:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-jtag_vpi"
|
|
|
|
"--enable-usb_blaster_libftdi"
|
|
|
|
"--enable-amtjtagaccel"
|
|
|
|
"--enable-gw16012"
|
|
|
|
"--enable-presto_libftdi"
|
|
|
|
"--enable-openjtag_ftdi"
|
|
|
|
"--enable-oocd_trace"
|
|
|
|
"--enable-buspirate"
|
|
|
|
"--enable-sysfsgpio"
|
|
|
|
"--enable-remote-bitbang"
|
|
|
|
];
|
2009-09-24 22:28:27 +01:00
|
|
|
|
2014-03-08 08:30:36 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$out/etc/udev/rules.d"
|
2017-02-06 19:09:45 +00:00
|
|
|
rules="$out/share/openocd/contrib/60-openocd.rules"
|
|
|
|
if [ ! -f "$rules" ]; then
|
|
|
|
echo "$rules is missing, must update the Nix file."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
ln -s "$rules" "$out/etc/udev/rules.d/"
|
2014-03-08 08:30:36 +00:00
|
|
|
'';
|
|
|
|
|
2014-06-25 19:36:16 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Free and Open On-Chip Debugging, In-System Programming and Boundary-Scan Testing";
|
|
|
|
longDescription = ''
|
|
|
|
OpenOCD provides on-chip programming and debugging support with a layered
|
|
|
|
architecture of JTAG interface and TAP support, debug target support
|
|
|
|
(e.g. ARM, MIPS), and flash chip drivers (e.g. CFI, NAND, etc.). Several
|
|
|
|
network interfaces are available for interactiving with OpenOCD: HTTP,
|
|
|
|
telnet, TCL, and GDB. The GDB server enables OpenOCD to function as a
|
|
|
|
"remote target" for source-level debugging of embedded systems using the
|
|
|
|
GNU GDB program.
|
|
|
|
'';
|
2013-05-10 13:21:31 +01:00
|
|
|
homepage = http://openocd.sourceforge.net/;
|
2014-06-25 19:36:16 +01:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ viric bjornfor ];
|
|
|
|
platforms = platforms.linux;
|
2009-09-20 17:43:16 +01:00
|
|
|
};
|
|
|
|
}
|