remote_bitbang: Add SWD support This adds new command characters to make SWD work with the new split jtag and swd operations of bitbang. The command characters are as follows: O - SWDIO drive 1 o - SWDIO drive 0 c - SWDIO read request d - SWD write 0 0 e - SWD write 0 1 f - SWD write 1 0 g - SWD write 1 1 Documentation has been updated accordingly. The new commands will be used by an adapted version of the jtag-openocd applet of the "Glasgow Debug Tool" (https://github.com/glasgowEmbedded/Glasgow). It has been tested against an stm32f103 and an at91samd21 target. contrib/remote/bitbang/remote_bitbang_sysfsgpio.c has also been adapted to support SWD via the new command set. Some limited testing has been done using a Raspberry Pi 2 with an stm32f103 and an at91samd21 target attached. Change-Id: I8e998a2cb36905142cb16e534483094cd99e8fa7 Signed-off-by: Manuel Wick <manuel@matronix.de> Signed-off-by: David Ryskalczyk <david.rysk@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6044 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
jtag/drivers: Add dmem driver Direct memory driver support for CoreSight Access Port(AP). Even though we emulate SWD (serial wire debug), we aren't actually using swd. Instead, we are using a direct memory access to get to the register set. This is similar in approach to other fast access native drivers such as am335xgpio drivers. Example operation on Texas Instrument's AM62x K3 SoC: +-----------+ | OpenOCD | SoC mem map | on |--------------+ | Cortex-A53| | +-----------+ | | +-----------+ +-----v-----+ |Cortex-M4F |<───────| | +-----------+ | | | DebugSS | +-----------+ | | |Cortex-M4F |<───────| | +-----------+ +-----------+ Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Jason Peck <jpeck@ti.com> Change-Id: I8470cb15348863dd844b2c0e3f63a9063cb032c6 Reviewed-on: https://review.openocd.org/c/openocd/+/7088 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
jtag/drivers: Add new driver for ANGIE USB-JTAG Adapter This is the driver code for NanoXplore's ANGIE USB-JTAG Adapter. The driver is based on the openULINK project. This driver communicate with ANGIE's firmware in order to establish JTAG protocol to debug the target chip. Since the ANGIE Adapter has a Spartan-6 FPGA in addition to the FX2 microcontroller, the driver adds two functions, one to download the firmware (embedded C) to the FX2, and the second to program the FPGA with its bitstream. Add ANGIE's configuration file to tcl/interface/ Add the device VID/PID to 60-openocd.rules file. Add ANGIE to OpenOCD's documentation Change-Id: Id17111c74073da01450d43d466e11b0cc086691f Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7702 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
jimtcl: update to version 0.82 The new version modifies it's auto configure in change https://github.com/msteveb/jimtcl/commit/ccd47be13019 stating: configure: Default to --full Now use --minimal and/or --without-ext to disable things. With such change jimtcl doesn't build anymore as OpenOCD submodule because of errors linking with new dependencies openssl and zlib. Use option --minimal to keep the same build configuration as with former jimtcl 0.81. Add option --disable-ssl to avoid a build error on system with no ssl libraries installed. This is already fixed in jimtcl upstream but not part of 0.82. Note that ssl is not currently used by OpenOCD. Change-Id: I0879891dbd083bfbff1e904daf6cd549c3329bbf Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7517 Tested-by: jenkins
nds32: drop 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 nds32 code triggers ~50 errors/warnings with scan-build. The arch nds32 has been dropped from Linux kernel v5.18-rc1. For all the reasons above, this code has been deprecated with commit 2e5df83de7f2 ("nds32: deprecate it, together with aice adapter driver") and tagged to be dropped before v0.13.0. Let it r.i.p. in OpenOCD git history. While there, drop from checkpatch list the camelcase symbols that where only used in this code. Change-Id: Ide52a217f2228e9da2f1cc5036c48f3536f26952 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7382 Tested-by: jenkins
Deprecate libjaylink Git submodule libjaylink was integrated into OpenOCD as a Git submodule, because at that time there was no official release and no packages for it. Today there are libjaylink packages for most popular distributions [1]. Removing libjaylink from OpenOCD reduces build complexity in both projects and makes them more flexible with respect to the build system, for example. Disable the libjaylink submodule by default and announce it as deprecated feature that will be removed in the future. This gives package maintainers time to package libjaylink if not already done. [1] https://repology.org/project/libjaylink/versions Change-Id: I6166ba4757aee5c89a0506de867072f58fa5ec4b Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/7129 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Restore normal development cycle Signed-off-by: Paul Fertser <fercerpav@gmail.com>
The openocd-0.12.0 release Signed-off-by: Paul Fertser <fercerpav@gmail.com>
configure.ac: fix check for jimtcl submodule The file configure.ac checks if jimtcl submodule is present by looking for the file jimtcl/configure.ac . But jimtcl has switched to its own build system in 2011 and thus dropped configure.ac . This cause a build issue on OpenOCD that was incorrectly fixed by adding a dummy configure.ac in jimtcl. Fix OpenOCD configure.ac to look for the correct file jimtcl/configure . After this fix, another fix would be proposed to jimtcl to drop its useless dummy file configure.ac . Change-Id: I705f72d83e374c8dd700baaa0c0bbe041f153605 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reported-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7437 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Restore +dev suffix Signed-off-by: Paul Fertser <fercerpav@gmail.com>
The openocd-0.12.0-rc3 release candidate Change-Id: Id7ddf232593e1aa7cb36f2b30fe832ebf79c1535 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Restore +dev suffix Signed-off-by: Paul Fertser <fercerpav@gmail.com>
The openocd-0.12.0-rc2 release candidate Signed-off-by: Paul Fertser <fercerpav@gmail.com>
openocd: fix build with 'configure --without-capstone' When configure option --without-capstone is used, the macro HAVE_CAPSTONE is not defined in config.h, and the following lines are instead present: /* 1 if you have Capstone disassembly framework. */ /* #undef HAVE_CAPSTONE */ This cause compile error with message: arm_disassembler.h:190:5: error: "HAVE_CAPSTONE" is not defined, evaluates to 0 [-Werror=undef] 190 | #if HAVE_CAPSTONE | ^~~~~~~~~~~~~ This is caused by configure.ac that does not call AC_DEFINE when --without-capstone option is present. Fix configure.ac to always provide the autoconf macro HAVE_CAPSTONE, with either value 0 or 1. Change-Id: Ie5ac98b2c25746dd721812c91baaac61ec877ecd Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7224 Tested-by: jenkins
Restore +dev suffix Signed-off-by: Paul Fertser <fercerpav@gmail.com>
The openocd-0.12.0-rc1 release candidate Change-Id: I790a6b13962649037c97e32d562dffd58d3daf3c Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
configure.ac: drop unneeded dependency check The script configure.ac checks for the presence of system include files required to build OpenOCD. It incorrectly check for: dirent.h pthread.h ifaddrs.h net/if.h that are never included by OpenOCD source code, plus the generated macros: HAVE_DIRENT_H HAVE_PTHREAD_H HAVE_IFADDRS_H HAVE_NET_IF_H are never used in OpenOCD source code. It also checks for the system function: vasprintf() that is never called by OpenOCD source code, plus the generated macro: HAVE_VASPRINTF is never used in OpenOCD source code. Drop the checks for the unused system include files and the unused system function. Change-Id: I68c1b1a1be268a830247fc489f210877c32d7d23 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7175 Tested-by: jenkins
helper/jim-nvp: avoid camelcase error by deprecated API Commit b8e18d292eb6 ("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
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
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