Commit 7c98145f authored by Erin van der Veen's avatar Erin van der Veen
Browse files

openocd: rework configuration flags

Removed configure flags no longer present in openocd 0.12, and allows
easy configuration of boards. Also removes the two boards that were
enabled before.
parent 0fc6b63d
Loading
Loading
Loading
Loading
+11 −10
Original line number Diff line number Diff line
@@ -3,9 +3,13 @@
, fetchurl
, pkg-config
, hidapi
, libftdi1
, libusb1
, libgpiod

, enableFtdi ? true, libftdi1

# Allow selection the hardware targets (SBCs, JTAG Programmers, JTAG Adapters)
, extraHardwareSupport ? []
}:

stdenv.mkDerivation rec {
@@ -24,17 +28,14 @@ stdenv.mkDerivation rec {
  configureFlags = [
    "--disable-werror"
    "--enable-jtag_vpi"
    "--enable-usb_blaster_libftdi"
    (lib.enableFeature (! stdenv.isDarwin) "amtjtagaccel")
    (lib.enableFeature (! stdenv.isDarwin) "gw16012")
    "--enable-presto_libftdi"
    "--enable-openjtag_ftdi"
    (lib.enableFeature (! stdenv.isDarwin) "oocd_trace")
    "--enable-buspirate"
    (lib.enableFeature stdenv.isLinux "sysfsgpio")
    (lib.enableFeature stdenv.isLinux "linuxgpiod")
    "--enable-remote-bitbang"
  ];
    (lib.enableFeature enableFtdi "ftdi")
    (lib.enableFeature stdenv.isLinux "linuxgpiod")
    (lib.enableFeature stdenv.isLinux "sysfsgpio")
  ] ++
    map (hardware: "--enable-${hardware}") extraHardwareSupport
  ;

  env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [
    "-Wno-error=cpp"