2014-03-30 15:45:00 +02:00
|
|
|
{ stdenv, fetchurl, libftdi, libusb1, pkgconfig }:
|
|
|
|
|
|
|
|
# TODO: Add "hidapi" as dependency to gain access to CMSIS-DAP debuggers.
|
|
|
|
# Support should be auto-detected, but if not, pass "--enable-cmsis-dap" to
|
|
|
|
# configure.
|
2009-09-20 18:43:16 +02:00
|
|
|
|
2013-02-09 14:07:30 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "openocd-${version}";
|
2014-03-30 15:45:00 +02:00
|
|
|
version = "0.8.0";
|
2009-09-20 18:43:16 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-07-14 03:17:07 +02:00
|
|
|
url = "mirror://sourceforge/openocd/openocd-${version}.tar.bz2";
|
2014-03-30 15:45:00 +02:00
|
|
|
sha256 = "0byk7hnccgmhw0f84qlkfhps38gp2xp628bfrsc03vq08hr6q1sv";
|
2009-09-20 18:43:16 +02:00
|
|
|
};
|
|
|
|
|
2014-03-30 15:45:00 +02:00
|
|
|
buildInputs = [ libftdi libusb1 pkgconfig ];
|
|
|
|
|
|
|
|
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 23:28:27 +02:00
|
|
|
|
2014-03-08 09:30:36 +01:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$out/etc/udev/rules.d"
|
2014-03-30 15:45:00 +02:00
|
|
|
ln -s "$out/share/openocd/contrib/99-openocd.udev" "$out/etc/udev/rules.d/99-openocd.rules"
|
2014-03-08 09:30:36 +01:00
|
|
|
'';
|
|
|
|
|
2009-09-20 18:43:16 +02:00
|
|
|
meta = {
|
2013-05-10 14:21:31 +02:00
|
|
|
homepage = http://openocd.sourceforge.net/;
|
2010-10-05 00:23:37 +02:00
|
|
|
description = "OpenOCD, an on-chip debugger";
|
|
|
|
|
|
|
|
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.
|
|
|
|
'';
|
|
|
|
|
|
|
|
license = "GPLv2+";
|
2013-05-20 19:33:18 +02:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ viric bjornfor ];
|
2009-09-20 18:43:16 +02:00
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
};
|
|
|
|
}
|