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.
This commit is contained in:
Erin van der Veen 2023-03-10 13:11:58 +01:00
parent 0fc6b63dd3
commit 7c98145f36

View File

@ -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"