diff options
author | Erin van der Veen <erin@erinvanderveen.nl> | 2023-03-10 13:11:58 +0100 |
---|---|---|
committer | Erin van der Veen <erin@erinvanderveen.nl> | 2023-03-10 14:03:30 +0100 |
commit | 7c98145f36b0c023185e71e0a52701a4f6ba419a (patch) | |
tree | cb8a908d097eb8d17e7f7fb41478c05239a45c5f /pkgs/development/embedded | |
parent | 0fc6b63dd3a97d39dc9d9d951fb726781487277f (diff) |
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.
Diffstat (limited to 'pkgs/development/embedded')
-rw-r--r-- | pkgs/development/embedded/openocd/default.nix | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/pkgs/development/embedded/openocd/default.nix b/pkgs/development/embedded/openocd/default.nix index dea8a56f38d41..4915b6df765b9 100644 --- a/pkgs/development/embedded/openocd/default.nix +++ b/pkgs/development/embedded/openocd/default.nix @@ -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" |