Commit Graph

177 Commits

Author SHA1 Message Date
Antonio Borneo 32f517f5d6 helper/jim-nvp: avoid camelcase error by deprecated API
Commit b8e18d292e ("helper/jim-nvp: comply with coding style
[1/2]") tags as deprecated the old CamelCase API of jim-nvp, so
that old patches already in gerrit or in user's local git can
still build while dumping a deprecated message.

So far, we have not found any such case, so the deprecated API can
be safely dropped in preparation of v0.12.0-rc1.

Drop the compile flag "-Wno-error=deprecated-declarations" and the
deprecated API.

Change-Id: I52ce47eda69a51c2dd29aac15f16e285492d89b4
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7052
Tested-by: jenkins
2022-07-23 13:59:49 +00:00
Antonio Borneo 96202cda19 openocd: build: add SPDX tag
Add the SPDX tag to makefiles, configuration scripts and tcl files
present in the folders under src/

Change-Id: I1e4552aafe46ef4893d510da9d732c5f181784a4
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7051
Tested-by: jenkins
2022-07-23 13:06:38 +00:00
Erhan Kurubas 3d61a9593e jtag: add esp_usb_jtag driver
This driver is used with the ESP32 chips which has builtin USB-JTAG
interface. e.g. with ESP32-C3, ESP32-S3

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: If966268cb8d26f76540dd5440245a17ed0b72c61
Reviewed-on: https://review.openocd.org/c/openocd/+/6943
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2022-07-02 08:24:01 +00:00
R. Diez c7bdce33e2 configure: provide advice if PKG_PROG_PKG_CONFIG unavailable
These are the misleading error messages that this change prevents:
configure.ac:13: error: possibly undefined macro: AC_MSG_WARN
  If this token and others are legitimate, please use m4_pattern_allow.
  See the Autoconf documentation.
configure.ac:48: error: possibly undefined macro: AC_DEFINE
configure.ac:342: error: possibly undefined macro: AC_MSG_ERROR
configure.ac:608: error: possibly undefined macro: AC_MSG_NOTICE

Change-Id: I21bcc7715eeac0f3d0bcc60bba6801e6a895cdd0
Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/7035
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-07-02 08:23:13 +00:00
Erhan Kurubas 0a36acbf6a configure: build jimtcl with json extension
Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: I5845c240e50ee832c082df3f26fabbd4b14d6edd
Reviewed-on: https://review.openocd.org/c/openocd/+/6890
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-05-21 09:03:42 +00:00
Steve Marple bd4bd54b60 drivers/am335xgpio: Add AM335x driver for bitbang support on BeagleBones
Change-Id: Iac1c9f3d380e2474c8b77407c89c2aad96fbf2ea
Signed-off-by: Steve Marple <stevemarple@googlemail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6941
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-05-14 08:59:30 +00:00
Antonio Borneo 2e5df83de7 nds32: deprecate it, together with aice adapter driver
The target nds32 and its companion adapter aice have not received
any real improvement since 2013.
It has been hard to keep them aligned during the evolution of
OpenOCD code, with no way for maintainers to really check if they
are still working.
No real documentation is present for them in OpenOCD.

The arch nds32 has been dropped from Linux kernel v5.18-rc1.

Deprecate both nds32 target and aice adapter with the target of
dropping them for v0.13.0.
Remove automatic build of aice, forcing user to select it.

Change-Id: Ib465d676246fa3b4e95c3d399ba9a5cf1f8b3baf
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6887
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
2022-04-23 09:16:52 +00:00
Antonio Borneo c5a23e9687 jimtcl: add configure flag for build maintainer mode
When jimtcl is built in maintainer mode, it runs extra tests at
exit to look for memory leak due to jim objects not properly freed
either through Jim_IncrRefCount()/Jim_DecrRefCount() or by passing
it to a jim API.

Add optional OpenOCD configure flag '--enable-jimtcl-maintainer'
to enable jimtcl maintainer mode.

Modify the implementation of macro AX_CONFIG_SUBDIR_OPTION to
allow expanding a variable passed as second argument.

Change-Id: Id1a39b25cee3773b172faf70803fa150182f0cd6
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6871
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
2022-03-12 09:47:18 +00:00
Jacek Wuwer f998a2aaf1 Cadence virtual debug interface (vdebug) integration
Change-Id: I1bc105b3addc3f34161c2356c482ff3011e3f2cc
Signed-off-by: Jacek Wuwer <jacekmw8@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6097
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
Reviewed-by: zapb <dev@zapb.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-02-14 15:12:10 +00:00
Antonio Borneo b3a51bbb59 helper: remove fix for libusb pre-v1.0.9
Libusb v1.0.9 has been released on April 2012. We can reasonably
expect that every user has already updated his system to a libusb
newer of equel to v1.0.9.

Remove the fix for older libusb.

Change-Id: I0c40e53d7af85a11b0bb265bbf8035857a2dfce1
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6253
Tested-by: jenkins
Reviewed-by: Xiaofan Chen <xiaofanc@gmail.com>
2021-08-30 13:51:46 +00:00
Antonio Borneo b8e18d292e helper/jim-nvp: comply with coding style [1/2]
The helper jim-nvp does not comply with OpenOCD coding style due
to typedef of struct and CamelCase symbol names.
While it's trivial fixing the helper and all its current use in
the code, changing these APIs will potentially break a number of
patches pending in gerrit. Gerrit will not trigger any alert, but
the code will generate compile error after the merge.

Add the compile flag "-Wno-error=deprecated-declarations" to keep
as warning (not as error) the use of "deprecated" functions and
types.
Rename all the CamelCase symbols is lowercase and provide struct
prototypes in place of the typedef.
Add a DEPRECATED section to 'jim-nvp.h' where the old CamelCase
symbols and the old typedef are re-declared with compile attribute
'deprecated'.

With this change OpenOCD compiles, but generates warnings.
The remaining changes allover OpenOCD code will be fixed in a
separate patch for easier review.

The patches merged later that still use the old deprecated API
will compile with warnings. This will permit to identify and fix
these cases.

Change-Id: I786385d0f662dbb1be5be313ae42623156d68ce5
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6183
Tested-by: jenkins
Reviewed-by: Marc Schink <dev@zapb.de>
2021-06-04 17:40:39 +01:00
R. Diez 909d45e35c configure.ac: use a separate folder for Autoconf-generated files
Autoconf generates several files in root folder of the project.
Keep the root folder cleaner by specifying subfolder 'build-aux'.
Align .gitignore accordingly.

Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Change-Id: Ied87faba495d9eeb8f98e78c2e2b7e7e596febfb
Reviewed-on: http://openocd.zylin.com/6236
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-05-22 10:08:09 +01:00
R. Diez 229c4c6a71 Warn on undefined preprocessor symbols
Preprocessor directives like "#if SYMBOL" silently replace undefined or
misspelt symbols with 0, which makes configuration bugs hard to spot.
Compiler flag "-Wundef" prevents such errors.

Change-Id: I91b7ba2db02ef0c3c452d334601c53aebda4660e
Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Reviewed-on: http://openocd.zylin.com/6238
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-05-22 10:07:38 +01:00
R. Diez c5c2a83001 Enable adapter "Bus Pirate" by default.
The Bus Pirate is now listed in the "OpenOCD configuration summary" too.

Change-Id: Ieb7bf9134af456ebe9803f3108a243204fb2a62d
Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Reviewed-on: http://openocd.zylin.com/5637
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-05-08 09:50:19 +01:00
Tim Newsome 87c90393fe Cleanup of config/includes.
Remove a use of AH_BOTTOM from configure.ac. This macro is used by
autoheader to add '#include' of some include file to the end of
config.h.in and then to config.h. OpenOCD can be built with a custom
config.h, so it's preferable to move these '#include' statement directly
in the C files that need them dropping this unneeded dependency.

It also causes problems when I want to use the gnulib library (which
comes with its own Makefile, and does not have the same include path as
the top-level Makefile).

So this change touches a lot of files, but is actually really simple. It
does not affect functionality at all.

Change-Id: I52c70bf15eb2edc1dd10e0fde23b2bcd4caec000
Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: http://openocd.zylin.com/6171
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-05-01 14:35:09 +01:00
Florian Meister 9206bd243b target/image: allow loading of 64-bit ELF files
Change-Id: I9b88edacf5ffcc3c1caeab8c426693de0d92a695
Signed-off-by: Florian Meister <florian.meister@advantest.com>
Signed-off-by: Christian Hoff <christian.hoff@advantest.com>
Reviewed-on: http://openocd.zylin.com/5204
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Ooi, Cinly <cinly.ooi@intel.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2021-05-01 13:36:15 +01:00
Antonio Borneo 68e50415a1 openocd: drop dependency from libusb0
Now that the old drivers have been converted to libusb1, there is
no need to keep the build dependency from libusb0.

Drop libusb0 from configure and makefiles, remove the libusb0
helper and remove libusb0 and libusb-compat from the README files.

Change-Id: Icc05be74ae5971ba6cbb67d39107c709a4d826e6
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5993
Tested-by: jenkins
2021-04-05 23:25:34 +01:00
Antonio Borneo ef41652caf drivers/arm-jtag-ew: switch to libusb1
Convert the driver from libusb0 to libusb1.

Change-Id: Idef0b6cf10fab583bc8d13b3b4fadd5cc368c090
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5990
Tested-by: jenkins
2021-04-05 23:25:08 +01:00
Antonio Borneo 5c53e2cd41 drivers/usbprog: switch to libusb1
Convert the driver from libusb0 to libusb1.

Change-Id: I3f334f2d02515d612097955e714910a587169990
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5992
Tested-by: jenkins
2021-04-05 23:25:02 +01:00
Antonio Borneo 25218e8935 jtag: remove minidriver code and minidriver-dummy
With zy1000 removed, there is no other implementation that uses
the minidriver, apart from the test/example minidriver-dummy.
While the idea of the minidriver is probably still valid (that is
to intercept jtag primitives before serialization), there is no
current use case, no guarantee it is really working, and the way
it was implemented (by macros and #if conditionals) is really hard
to maintain and test.

Let's let it rip in git history, from where it could eventually be
taken back in a more modern implementation.
The entry points of minidriver API are still in the code with the
original names.

Change-Id: I882e32cb26cf5842f9cba14e3badaf8948e3760d
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6091
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2021-03-19 21:56:06 +00:00
Antonio Borneo b0fe92dba7 zy1000: drop the code, deprecated in v0.10.0
The code for zy1000 has been marked as deprecated in release
v0.10.0, 4 years ago.

Time to drop it!

Change-Id: I08fca2a2bf8f616f031e15fd37dac3197a40ba50
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6090
Tested-by: jenkins
2021-03-19 21:55:50 +00:00
Antonio Borneo 58b95eac48 ioutil: drop the code, deprecated in v0.10.0
The code for ioutil has been marked as deprecated in release
v0.10.0, 4 years ago.

Time to drop it!

Change-Id: I36dce1669ebe9acada5f9e752835c53e5214e3be
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6089
Tested-by: jenkins
2021-03-19 21:55:23 +00:00
Antonio Borneo 26a57b06cf oocd_trace: drop the code, deprecated in v0.10.0
The code for oocd_trace has been marked as deprecated in release
v0.10.0, 4 years ago.

Time to drop it!

Change-Id: I989f8345dee4ff2369bcf5e2e2ace86bbd5aa6a5
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6088
Tested-by: jenkins
2021-03-19 21:55:15 +00:00
Antonio Borneo 4c00f96fc2 configure.ac: switch to autoconf 2.69
OpenOCD file configure.ac requires autoconf equal or newer then
2.64, which is quite old.
These are the release dates so far:
- autoconf-2.64 2009-07-26
- autoconf-2.65 2009-11-21
- autoconf-2.66 2010-07-02
- autoconf-2.67 2010-08-02
- autoconf-2.68 2010-09-22
- autoconf-2.69 2012-04-24
- autoconf-2.70 2020-12-08

Switch to autoconf 2.69, which is old enough to be the standard in
current systems.
This should reduce the effort on configure.ac compatibility.

Change-Id: Ia7c78d2fa34c50ed5ccf4fb66ad3484369cf3b4a
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6008
Tested-by: jenkins
2021-03-10 21:47:48 +00:00
Antonio Borneo 47fa000193 drivers/rlink: switch to libusb1
Convert the driver from libusb0 to libusb1.

Change-Id: I17d14522db18b4050d462d23151ec97d3a315a7f
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5991
Tested-by: jenkins
Reviewed-by: Marc Schink <dev@zapb.de>
2021-03-10 21:32:12 +00:00
Paul Fertser 4307d93eb0 Restore normal development cycle
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2021-03-07 15:44:45 +03:00
Paul Fertser f342aac084 The openocd-0.11.0 release
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2021-03-07 13:36:49 +03:00
Antonio Borneo ba0f382137 autotools: generate list of NEWS-xx file during configure
Commit 4fc0f3530c ("Makefile.am: fix non-POSIX warning from
automake") uses the BSD make extension '!=' to generate the list
of files NEWS-xx, but it's not POSIX (yet), it's not backward
compatible with GNU make 3.82 (used in CentOS 7, EOL scheduled for
2024) and depending on automake evolution it could trigger again
the warning 'apparently' just fixed.

Move in configure the generation of the file list.
The only drawback is that when a developer adds a new NEWS-xx
file, he/she has to run configure again before 'make distcheck',
otherwise will get failure.

Change-Id: Ia97e7f4e612655a97702f95e8451040539659b85
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reported-by: Jan Matyáš <jmatyas@codasip.com>
Reviewed-on: http://openocd.zylin.com/6054
Tested-by: jenkins
Reviewed-by: Jan Matyas <matyas@codasip.com>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2021-02-13 13:09:00 +00:00
Paul Fertser 5c17ce508e Restore +dev suffix
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2021-01-25 01:43:17 +03:00
Paul Fertser a5e526d857 The openocd-0.11.0-rc2 release candidate
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2021-01-25 00:24:17 +03:00
Antonio Borneo bd1adcffe7 configure: drop macro 'AC_HEADER_TIME'
The macro AC_HEADER_TIME has been obsoleted by autoconf 2.70.

Not all systems provide 'sys/time.h', plus some old system didn't
allowed to include both 'time.h' and 'sys/time.h' because 'time.h'
was included by 'sys/time.h' and was not properly protected to
allow multiple inclusion.
The macro AC_HEADER_TIME helps to detect such odd case.
Nowadays all the systems properly protect 'time.h', so its safe to
unconditionally include 'time.h', even if it is also included by
'sys/time.h'.

The case of systems without 'sys/time.h' is already covered by
configure.ac through the directive
	AC_CHECK_HEADERS([sys/time.h])

Remove the obsoleted autoconf macro and simplify the code by
including 'time.h' unconditionally and check HAVE_SYS_TIME_H to
include 'sys/time.h'.

Change-Id: Iddb3f3f1d90c22668b97f8e756e1b4f733367a7d
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6010
Tested-by: jenkins
Reviewed-by: Marc Schink <dev@zapb.de>
2021-01-18 15:32:46 +00:00
Antonio Borneo 8b7569c219 configure.ac: drop macro 'AC_PROG_CC_C99' from autoconf 2.70
The macro AC_PROG_CC_C99 has been obsoleted by autoconf 2.70 and
triggers a set of warnings from both 'aclocal' and 'autoconf'.
The test of AC_PROG_CC_C99 is now included in AC_PROG_CC.

For autoconf 2.69 and earlier the macro is still required, so
cannot be simply dropped.

Use a conditional test to avoid the warning on autoconf 2.70 but
still use AC_PROG_CC_C99 on older autoconf.

Change-Id: I5e8437f5a826fb63be6d07bcb5bb824f94683020
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6009
Tested-by: jenkins
Reviewed-by: Marc Schink <dev@zapb.de>
2021-01-18 15:32:34 +00:00
Antonio Borneo cc79bcd587 configure.ac: fix build with libusb0 and without libusb1
Driver 'openjtag' requires both libftdi and libusb1.
The current check is incorrect and the driver is built when
libftdi is present with libusb0 and without libusb1, which causes
the linker to fail resolving the required libusb1 symbols.

Remove the check for libusb0 on driver 'openjtag'.
Create a new adapters group LIBFTDI_USB1_ADAPTERS to hold the
driver 'openjtag'.

Change-Id: I1f5e554b519e51c829d116ede894639cb55a26aa
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5989
Tested-by: jenkins
2021-01-08 10:23:31 +00:00
Paul Fertser 2c82d9ea7d configure: do not make Capstone dependency automagic
This adds regular ./configure options to control dependency on the
Capstone disassembly engine. See [0] for the rationale.

[0] https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Automagic_dependencies

Change-Id: I3e16dc5255d650aa1949ccf896b26dc96e522a75
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/5985
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-01-08 10:23:26 +00:00
Paul Fertser 0dd3b7fa6c Restore +dev suffix
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2020-12-10 01:43:12 +03:00
Antonio Borneo 77f468893e The openocd-0.11.0-rc1 release candidate
Change-Id: I111fec1304482f5c0f9d6ee988be8a2ea3de3981
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-12-09 20:34:22 +03:00
Antonio Borneo 1d3d87695c target/register: use an array of uint8_t for register's value
The use of 'void *' makes the pointer arithmetic incompatible with
standard C, even if this is allowed by GCC extensions.
The use of 'void *' can also hide incorrect pointer assignments.

Switch to 'uint8_t *' and add GCC warning flag to track any use of
pointer arithmetic extension.

Change-Id: Ic4d15a232834cd6b374330f70e2473a359b1607f
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5937
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2020-12-05 23:18:37 +00:00
Mickaël Thomas 8f927d5164 Add CMSIS-DAP v2 support
This change implements CMSIS-DAP v2 which works with raw USB bulk transfers.

The old driver is now split into a generic CMSIS part and a HID backend,
with a new raw USB backend for CMSIS-DAP v2.

New commands:
- cmsis_dap_backend (usb_bulk | hid | auto)
- cmsis_dap_usb interface <interface number>

Change-Id: I4218477b12ccbfe19c9b332321cd21394bf44e30
Signed-off-by: Mickaël Thomas <mickael9@gmail.com>
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/4831
Tested-by: jenkins
2020-11-15 21:36:56 +00:00
Antonio Borneo c2311cc18f configure.ac: add libutil to the dependency list
Jimtcl 0.80 (2020-10-29) adds dependency to libutil, which is part
of the GNU libc.
The library is searched and used by jimtcl build, but still has to
be linked in by OpenOCD as indirect dependency.

While OpenOCD is still using jimtcl 0.79, let's prepare to switch
to the next version.
Add libutil search in configure.ac.

Change-Id: I5a8952161b0e5b93fc00d23be256b5274d31e08c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5922
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
2020-11-07 20:53:01 +00:00
Antonio Borneo 5bb0f6befb openocd: add support for libftdi 1.5
The new libftdi 1.5 (2020-07-07) changes some API, deprecating the
old ones. This cause a warning at compile time.

Detect in configure the version of libftdi.
Use the new API in the driver's code.
Add an helper include file 'libftdi_helper.h' that wraps the old
API for backward compatibility with old libftdi.

Change-Id: I7800fbebe17dd0ce62e55b3598d8c08be8875bb7
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: https://sourceforge.net/p/openocd/tickets/286/
Reviewed-on: http://openocd.zylin.com/5891
Tested-by: jenkins
2020-11-04 17:38:45 +00:00
Antonio Borneo 1718e733d6 configure.ac: stop automake to search for scripts in parent dirs
Automake will search for the helper scripts in the folder that
contains the current Makefile.am (typically '.'), then some of the
scripts will be also searched in '..' and '../..'.

If the parent folders '..' or '../..' of OpenOCD source code
contain a file named 'install.sh', then automake will use it and
will assume that the same folder should contains also 'ltmain.sh'.
This situation can either cause the build to fail or automake to
use incorrect helper scripts.

Force automake to only search for helper scripts in the current
directory.

Change-Id: I00bbd6bf9057c94cf5007e5ecda3fefd683481f5
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: https://sourceforge.net/p/openocd/tickets/285/
Reviewed-on: http://openocd.zylin.com/5890
Tested-by: jenkins
2020-11-04 17:38:40 +00:00
Kevin Burke cbbec2dce5 ARM|Driver: Add DPI Driver for emulation
This driver provides support for Cadence JTAG BFM

The "jtag_dpi" driver implements a JTAG driver acting as a client for the
SystemVerilog Direct Programming Interface (DPI) for JTAG devices.
DPI allows OpenOCD to connect to the JTAG interface of a hardware model
written in SystemVerilog, for example, on an emulation model of
target hardware.

Tested on Ampere emulation with Altra and Altra Max models

Change-Id: Iaef8ba5cc1398ee2c888f39a606e8cb592484625
Signed-off-by: Kevin Burke <kevinb@os.amperecomputing.com>
Signed-off-by: Daniel Goehring <dgoehrin@os.amperecomputing.com>
Reviewed-on: http://openocd.zylin.com/5573
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-10-03 11:21:51 +01:00
Marc Schink 67008e1bea Use capstone for ARM disassembler
Change-Id: I1c9bf3f8178d4a06babe23a918e4411833ebc418
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: http://openocd.zylin.com/4812
Tested-by: jenkins
Reviewed-by: Fredrik Hederstierna <fredrik@hederstierna.com>
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-09-27 17:39:44 +01:00
R. Diez 86777768eb Fix 2 warnings about obsolete Autoconf macros.
Those changes were automatically suggested by tool "autoupdate".

Change-Id: Id70bdeacc3c80816f3f5c65d1abceabb5cdf3873
Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Reviewed-on: http://openocd.zylin.com/5638
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-08-08 22:16:49 +01:00
Zale Yu b12fca236d jtag/drivers: add support for Nu-Link (Nuvoton ICE) over usb
Add support for Nu-Link1 over usb hidapi and config file.

The original work is fetched from Nuvoton github.
Code cleanup, fix merge conflicts, compile and runtime issues.
Switch the code from libusb to hidapi, being the device HID based.
Add documentation.
Merge fixes for multi-word memory read.

Reset is not fully compatible with openocd framework; currently
the target is reset and then halt at openocd start.

Change-Id: I9738de4e26783ba462ea3e39ec32069fd5bb7d94
Signed-off-by: Zale Yu <cyyu@nuvoton.com>
Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5635
Tested-by: jenkins
Reviewed-by: Marc Schink <dev@zapb.de>
2020-08-02 10:47:02 +01:00
Antonio Borneo 93be480c90 jtag/drivers: add linuxgpiod driver
New adapter driver for GPIO bitbanging over Linux GPIO descriptors
through the library libgpiod.
On Debian based distribution, the package libgpiod-dev is required
for build.

Change-Id: I1ce1a4f1ca79096d6d476b01b523c8c10f2cac07
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5559
Tested-by: jenkins
2020-07-14 00:38:48 +01:00
Antonio Borneo 6a81bad3b9 configure: split build of hla layouts
Current hla driver supports two "layout": stlink and ti-icdi.
The configure script allows to independently enable/disable the
the two layout. But in reality by selecting only one of them the
whole hla driver is built, including both "layouts".
This is currently not a big issue because the dependencies of the
two layout are the same (libusb), so we are sure that selecting
one of them would permit to build both.
This is going to change with the merge of a third "layout" for
Nuvoton Nu-Link, because it would be based on hidapi.
We need, at least, to decouple the build of libusb and hidapi
"layouts". A full decouple of each "layout" is also welcome to
match the selection done during configure.

Introduce a new automake macro for each of the two "layout" and
use them to conditionally build the "layout" files.
Use the existing autoconf macros to conditionally compile the code
that depends by the "layout".

Change-Id: Ia20da7a260002a8d2af883425aa401b8920d3f36
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5719
Tested-by: jenkins
2020-07-08 22:07:21 +01:00
Florian Fainelli 5c6e32612d Remove BUILD_TARGET64
BUILD_TARGET64 creates a larger test matrix and mostly gates the
building of the aarch64/armv8 target, make that unconditional, which
would help fixing any issues with 64-bit address types anyway.

Rebased by Antonio Borneo after commit 1fbe8450a9 ("mips: Add
MIPS64 support")

Change-Id: I219f62b744d540d9dde9a42e6b63fd7d91df3dbb
Suggested-by: Matthias Welwarsky <matthias@welwarsky.de>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5240
Tested-by: jenkins
2020-04-21 12:55:41 +01:00
Liming Sun 5c8de6a725 jtag/drivers/rshim: Disable the driver by default
This is a follow-up change of commit 6d6a69d5 to disable it by
default. The driver was introduced in 6d6a69d5 and enabled by
default in order to run the jenkins build.

Signed-off-by: Liming Sun <lsun@mellanox.com>
Change-Id: I5c5fc6711b971b65dd5846a6163025879044ec40
Reviewed-on: http://openocd.zylin.com/5563
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-04-21 11:18:25 +01:00
Liming Sun 699a8475a1 jtag/drivers: add debugging support for Mellanox BlueField SoC
This commits adds debugging support for the Mellanox BlueField
SoC via rshim, which is an interface accessible from external USB
or PCIe (for SmartNIC case) via the rshim driver. It implements
the arm dap interfaces based on the existing dapdirect framework.

Change-Id: I18eb1c54293ec2c581f853e0e55b3f96d7978b56
Signed-off-by: Liming Sun <lsun@mellanox.com>
Reviewed-on: http://openocd.zylin.com/5457
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-04-21 11:18:11 +01:00