aboutsummaryrefslogtreecommitdiff
path: root/src/jtag/drivers
AgeCommit message (Collapse)Author
2016-12-25jtag: drivers: ulink: fix uninitialised variable warningPaul Fertser
This prevents clean build when --enable-verbose-jtag-io is used. Change-Id: I5c9e6968cfa425b1f6f92f59156b6ae38cb9af18 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/3907 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-12-08Convert to non-recursive makeAndreas Fritiofson
Change-Id: I11f8bc8553957e2ff083c09e72e16881e4d3bb6f Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3865 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-12-08configure: Use same case for libjaylink as for other libsAndreas Fritiofson
Change-Id: I60d91a0543d9b8c580254cdc5f04b2e60209b98b Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3868 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-12-08jlink: Output libjaylink versionMarc Schink
Output the package version of libjaylink to ease debugging. Change-Id: I3b9da6d046d140ba850056c98e67bed22c885ee0 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3887 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-12-08libjaylink: Update to latest master branchMarc Schink
The changes since the last update are mainly related to the build system, preparations and cleanups for the upcoming release. If there are no bugs reported, this will be the last update before the libjaylink 0.1.0 release. Change-Id: I4cec9bb61159f6153690aaf39c1d12ba0baacf9b Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3886 Tested-by: jenkins Reviewed-by: Xiaofan <xiaofanc@gmail.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-12-08jlink: Add EMUCOM supportMarc Schink
EMUCOM is a way to communicate with a J-Link device via so called channels. A channel can either be read or written in a single operation. Beside the reserved channels for SEGGER, there are channels available to implement vendor and/or device specific functionalities. For example, EMUCOM is used on many starter and development kits from Silicon Labs to access power measurements and various other information and settings. Change-Id: I6094109c043b34aed4a40ceabe71f30ff896bf1d Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3794 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-12-08jtag/drivers/openjtag: Add support for Cypress CY7C65215Vianney le Clément de Saint-Marcq
The Cypress CY7C65215 Dual Channel USB-Serial Bridge Controller [1] understands the OpenJTAG protocol over a proprietary USB interface. This patch adds support for the CY7C65215 to the openjtag interface driver. A new configuration option, `openjtag_variant`, allows to select the transport to use. Libusb (1.x or 0.1) is now a hard dependency of the openjtag driver. This should not be a big issue as libftdi also depends on it. [1] http://www.cypress.com/?rID=82870 Change-Id: I55ffb3fd9e006eb311e405d9fb836bb119644bfd Signed-off-by: Vianney le Clément de Saint-Marcq <vianney.leclement@essensium.com> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Reviewed-on: http://openocd.zylin.com/2805 Tested-by: jenkins Reviewed-by: Jiri Kastner <cz172638@gmail.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-12-08helper: Code cleanup for hexify()Marc Schink
Simplify hexify() and do not longer use 0 as special case for the parameter 'count' to determine the string length of the binary input. Instead, use strlen() outside of the function if needed. Additionally, fix the return value and return the length of the converted string. The old function always returned 2 * count. Also, use more appropriate data types for the function parameters and add a small documentation. Change-Id: I133a8ab786b8f7c1296afcaf9c0a0b43881e5112 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3793 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-12-08jtag: drivers: bcm2835gpio: set 4ma drive, slow slew rateSean Cross
Both the drive strength and slew rate are currently set to very high values. This causes the waveforms to overshoot and be less reliable when operating at high speed. This patch lowers the slew rate and sets the drive strength to 4ma, improving the waveform output. Change-Id: I761d35cd64bc54a9e94043904ef00a003b056af0 Signed-off-by: Sean Cross <sean@xobs.io> Reviewed-on: http://openocd.zylin.com/3707 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Philipp Guehring <pg@futureware.at>
2016-12-08jtag: drivers: cmsis-dap: fix operation with SAMD10 Xplained boardPaul Fertser
Change-Id: I9164edeb83c9a9106e74798e98b9517177e83358 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/3856 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-11-06Remove support for the GPL incompatible FTDI D2XX libraryAndreas Fritiofson
Convert Presto, OpenJTAG and USB-Blaster (I) adapter drivers to libftdi only. Change-Id: Ib28887620a3dcbb754b9dbf87b9731acca3ac600 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3237 Tested-by: jenkins Reviewed-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2016-11-06Remove since long deprecated ft2232 driverAndreas Fritiofson
Purge all legacy interface configurations so there's no more confusion over which one to use. Also remove doc/INSTALL.txt which mentions ft2232 but otherwise just duplicates what INSTALL says. Change-Id: Ic94f808f123d4917e600b79309f1272c78a7bb11 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3236 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2016-11-05drivers/Makefile.am: Fix libjaylink integrationMarc Schink
Include libjaylink in DIST_SUBDIRS only if J-Link driver is enabled. Change-Id: Ib32bb6a5d8fe9bb6e93d968802733eb4973f2c25 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3529 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-11-05configure.ac: Fix libjaylink integrationMarc Schink
Do not configure internal libjaylink if libusb-1.0 is not available or if J-Link driver is disabled (--disable-jlink). Change-Id: I021bca91dbbc33888a997c664f7836225306c3ef Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3528 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-10-17helper: Make unhexify() robust on invalid dataMarc Schink
The current implementation is not suitable for user provided data because it does not detect invalid inputs in many cases. For example, the string "aa0xbb" is successfully converted to the 3 bytes: 0xaa, 0x00 and 0xbb. An other example is "aabi" which is successfully converted to the 2 bytes: 0xaa and 0x0b. Both are obviously incorrect. Make unhexify() robust on invalid data and use more appropriate data types for its parameters. Also, add a small documentation for the function. Change-Id: Idb799beb86fc608b066c8a76365021ed44c7f890 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3792 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-10-17jtag: drivers: mpsse: ignore error to detach kernel driverPaul Fertser
This makes it possible to run OpenOCD as unprivileged user on FreeBSD. Change-Id: If1182d09ad2d51f370ae7e6da02f19c7a21c66c9 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/3800 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-10-17jtag: drivers: cmsis-dap: add TRST handlingPaul Fertser
Even when TRST and SRST are not present in reset_config we still should set them appropriately (to 1) as we can't tristate them anyhow. Change-Id: Iec5bcf09340136f5e6ccfb05fa2697c53fa6609f Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/3798 Tested-by: jenkins Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-10-07libjaylink: Update for API changesMarc Schink
Update to latest libjaylink version and incorporate API changes. The major change in libjaylink is a rework of the device discovery. Please test device discovery extensively, especially with multiple devices connected. All other changes in libjaylink are of minor importance for OpenOCD. Change-Id: I9a50e83f59557505ce29809c7762c5df1cec10eb Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3735 Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Steven Stallion <stallion@squareup.com> Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-10-07jlink: Adjust log verbosity of libjaylinkMarc Schink
Currently, the log verbosity of libjaylink is not accessible from the user interface. Therefore, changing the log verbosity of libjaylink is only possible from within the J-Link driver source code which is not acceptable for end users. Output the libjaylink log messages through the logging module of OpenOCD rather than directly to stderr. Change-Id: I6bf7bf8f4c8a12fb9e955eeced68224545fa0b5c Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3701 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-10-04ftdi: don't wait forever if we failAndreas Fritiofson
Currently if ftdi device is removed, OpenOCD will stall forever. Only kill -9 will help in this case. This patch makes use of libusb timeout functions and trying to break out of while loop if some error is detected. [andreas.fritiofson@gmail.com]: Add missing retval check Change-Id: I97506190e376026705f14ef9fe37dc811b99b3ac Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3419 Reviewed-by: Andreas Färber <afaerber@suse.de> Tested-by: jenkins
2016-08-14ftdi: Added a method to read the signal valuesStephen Tridgell
Change-Id: Ie32a372bbc57249b4802d900234a0e8e7d1d1830 Signed-off-by: Stephen Tridgell <stephen.tridgell@exablaze.com> Reviewed-on: http://openocd.zylin.com/2556 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2016-08-14cmsis-dap: add JTAG pass-through modeMatthias Welwarsky
This change adds JTAG transport in pass-through mode to the cmsis-dap driver. The patch is originally from Phillip Pearson <pp@myelin.co.nz>, with additions by Maksym Hilliaka <oter@frozen-team.com> Change-Id: I88d918d6576e9d875c3b611f29f255581e6a5424 Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com> Reviewed-on: http://openocd.zylin.com/3568 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2016-08-13jlink: fix jlink regression introduced by ae8cdc commitSergey A. Borshch
1) wrong last bit was shifted out in the end of IRSHIFT/DRSHIFT in jlink_execute_scan() 2) TDI buffer was not cleared in jlink_tap_init(), results in wrong data shifted out to the TDI and "Bad value '00000000' captured during DR or IR scan" error message. 3) sizeof(tdi_buffer) was used in memset() to clean tms buffer. It is the same as sizeof(tms_buffer), but shoud be fixed to make source code consistent Change-Id: I13f26d1c3e88eefc3856fe2b8542fb0ccea6acb1 Signed-off-by: Sergey A. Borshch <sb-sf@users.sourceforge.net> Reviewed-on: http://openocd.zylin.com/3394 Tested-by: jenkins Reviewed-by: Harry Zhurov <harry.zhurov@gmail.com> Reviewed-by: Anton Gusev Reviewed-by: Михаил Цивинский <mtsivinsky@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-05-24Make #include guard naming consistentMarc Schink
Change-Id: Ie13e8af0bb74ed290f811dcad64ad06c9d8cb4fa Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/2956 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-05-24Remove FSF address from GPL noticesMarc Schink
Also make GPL notices consistent according to: https://www.gnu.org/licenses/gpl-howto.html Change-Id: I84c9df40a774958a7ed91460c5d931cfab9f45ba Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3488 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-05-20Fix spelling of ARM CortexAndreas Färber
It's Cortex-Xn, not Cortex Xn or cortex xn or cortex-xn or CORTEX-Xn or CortexXn. Further it's Cortex-M0+, not M0plus. Cf. http://www.arm.com/products/processors/index.php Consistently write it the official way, so that it stops propagating. Originally spotted in the documentation, it mainly affects code comments but also Atmel SAM3/SAM4/SAMV, NiietCM4 and SiM3x flash driver output. Found via: git grep -i "Cortex " git grep -i "Cortex-" | grep -v "Cortex-" | grep -v ".cpu" git grep -i "CortexM" Change-Id: Ic7b6ca85253e027f6f0f751c628d1a2a391fe914 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3483 Tested-by: jenkins Reviewed-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-05-17jtag ulink: dont compile function when not requiredAlexander Kurz
ulink_calculate_frequency() is used exclusively when _DEBUG_JTAG_IO_ is set, no need to compile this function if it is not used. Declaring it static in the same commit. Change-Id: I243ffdf69a1dc3bee6d16e4bb8d78396b6ea5144 Signed-off-by: Alexander Kurz <akurz@blala.de> Reviewed-on: http://openocd.zylin.com/3241 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-05-14libjaylink: Update to latest master branchMarc Schink
Among other things, this fixes building on Cygwin and MSYS. Change-Id: I8bdceb49dc72b5f666388cfd97876eba8e1d2b13 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3478 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-05-08stlink: Decode more errors.Uwe Bonnes
For STLINK_SWD_AP_FAULT git://git.ac6.fr/openocd commit 657e3e885b9ee10 returns ERROR_OK with the comment: Change in error status when reading outside RAM. This fix allows CDT plugin to visualize memory. Change-Id: Id8e220961b748ef9467fd84de62b1dc84ace63f8 Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Reviewed-on: http://openocd.zylin.com/3373 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2016-05-05ftdi: make ftdi_location command depend on libusb1 versionMatthias Welwarsky
The function libusb_get_port_numbers(), required for the command ftdi_location, is only available in recent version of libusb1. Compilation will break if the function is not available. This patch enables the command only if libusb1 contains the necessary function. Change-Id: I091e72dafa4ed22eea51692751d43246a8152987 Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com> Reviewed-on: http://openocd.zylin.com/3396 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2016-03-24ftdi: allow selecting device by usb bus locationMatthias Welwarsky
This patch adds a 'ftdi_location' command to select an adapter by usb bus number and port path. This is helpful if you have a rack full of adapters in a testing or manufacturing setup where the only constant is the physical usb bus location of the adapter you want to address. Vid:Pid are not unique, serial number _may_ be unique (and maybe not with embedded adapters) but will change when a new target is plugged. Specifying a location allows to understand instantly which board failed bringup or testing. Change-Id: I403c7c6c8e34fe42041b3f967db80f3160a4f1a3 Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com> Reviewed-on: http://openocd.zylin.com/3351 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-02-29Cleanup: removal of obsolete semicolonsAlexander Kurz
Obsolete C source code semicolons were removed using the semantic patch semicolon/semicolon.cocci, see coccinellery.org Change-Id: I153b4995a9e028ebaf5f58c947821dc78345a777 Signed-off-by: Alexander Kurz <akurz@blala.de> Reviewed-on: http://openocd.zylin.com/3367 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-02-13jlink: Update for libjaylink API changesMarc Schink
This patch also addresses a problem with devices where no serial number is available. For further details, see: http://repo.or.cz/libjaylink.git/commit/7e0508d8487f65f71411117dff2e0b093e00bc80 Such devices are now ignored if device selection via serial number is used. Nevertheless, these devices are still usable by using the USB address for device selection or just by omitting device selection. The latter one is only possible if only one device is connected. Change-Id: I5763db25e97ba3d924cb642da7e64e951e09ecb7 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3225 Tested-by: jenkins Reviewed-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2016-02-13cmsis-dap: Fix CMSIS-DAP serial number processing.anpilog
Check CMSIS-DAP adapter has serialnumber before pass it to wcscmp. Keep looking for onother adapter if choosed one doesn't have correct serialnumber. Change-Id: I7d386a03cb49b9baf22073ae1c6b14269ed3b618 Signed-off-by: Andrii Anpilogov <anpilog@gmail.com> Reviewed-on: http://openocd.zylin.com/3226 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2016-02-13jtag ftdi: sample TDO on falling edge of TCKMatthias Welwarsky
Due to signal propagation delays, sampling TDO on rising TCK can become quite peculiar at fast TCK rates. However, FTDI chips offer a possiblity to sample TDO on falling edge. With this change, stable operation can be achieved at 30MHz clock even over 10cm ribbon cable. Change-Id: Icaf240535dae15512e3c60a944e22a5fbc1b0b06 Signed-off-by: Matthias Welwarsky <matthias@welwarsky.de> Reviewed-on: http://openocd.zylin.com/3180 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-01-15drivers: jlink: rework to allow scans of arbitrary length, bump libjaylinkPaul Fertser
Make the J-Link driver handle everything needed for FPGA programming, this includes arbitrary long scans and STABLECLOCKS command. Also, bump to the latest upstream libjaylink to properly support this. This code is heavily inspired by Andreas Fritiofson's ftdi.c. Change-Id: Ic5fd87aa88b58ff1138dc2e0a197bb52321b1541 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2946 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2016-01-06jlink: deconflict local variables from global symbolsPeter A. Bigot
BeagleBone debian 7 builds produce: jlink.c: In function 'jlink_speed': jlink.c:218:11: error: declaration of 'div' shadows a global declaration [-Werror=shadow] jlink.c: In function 'check_trace_freq': jlink.c:1065:54: error: declaration of 'div' shadows a global declaration [-Werror=shadow] jlink.c: In function 'config_trace': jlink.c:1101:11: error: declaration of 'div' shadows a global declaration [-Werror=shadow] Fix this by changing the local variable to 'divider'. Change-Id: I96a0cc0f7d4d4af5a56aa1e918e5416d3c61cbfe Signed-off-by: Peter A. Bigot <pab@pabigot.com> Reviewed-on: http://openocd.zylin.com/3185 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-12-29sysfsgpio: support broken gpio implementationsMatthew Campbell
Change tests when reading from 'value' in sysfs from =='0' to !='1'. This guards against broken sysfs GPIO implementations that return non-zero for high rather than just '1' while still being clean and correct code. Note that sysfs will never output a leading zero even in a very broken implementation as that is covered in gpiolib.c, not the offending driver. Tested against broken Freescale kernel 3.14.38 on i.MX6SL. Change-Id: Id05567bb8504b1babef33d6ee5172bceefeca8b8 Signed-off-by: Matthew Campbell <mcampbell@izotope.com> Reviewed-on: http://openocd.zylin.com/3121 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-12-29swd: Remove DAP from parameter listAndreas Fritiofson
Making the SWD driver aware of the DAP that controls it is a layering violation. The only usage for the DAP pointer is to store the number of idle cycles the AP may need to avoid WAITs. Replace the DAP pointer with a cycle count hint instead to avoid future misuse. Change-Id: I3e64e11a43ba2396bd646a4cf8f9bc331805d802 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3141 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-12-29arm_debug: Support multiple APs per DAP and remove DAP from armv7* structsPatrick Stewart
Separate out the values from adiv5_dap that are associated with a specific AP into a new struct, so we can properly support multiple APs. Remove the DAP struct from the armv7* structs, because we can have multiple CPUs per DAP, and we shouldn't have multiple DAP structs. Tidy up a few places where ap_current is used incorrectly. Change-Id: I0c6ef4b49cc86b140366347aaf9b76c07cbab0a8 Signed-off-by: Patrick Stewart <patstew@gmail.com> Reviewed-on: http://openocd.zylin.com/2984 Tested-by: jenkins Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-12-28jtag: drivers: bcm2835gpio: fix a typo in informational messagePaul Fertser
Change-Id: I70176f9c623e85ba03d8e08992cade232c1bd7fd Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/3176 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-11-26jlink: Retrieve maximum speed from device.Marc Schink
If supported, the maximum transport speed is now retrieved from the device. Change-Id: I614f405ec91cf199c851781785fd26cbd10c37a6 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/2955 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-11-26Improve J-Link driver and introduce libjaylink.Marc Schink
This patch uses libjaylink which is a library to access J-Link devices. As other tools which are not in the scope of OpenOCD also need to access J-Link devices a library is used. A firmware upgrade tool and an advanced configuration tool for J-Link devices are under development. Further versions of libjaylink will support additional features OpenOCD could benefit from. This includes TCP/IP as additional possibility to connect to J-Link devices as well as power tracing and device internal communication. The latter is used to access peripherals on some development boards (e.g EFM32 STK and DVK). Integration of libjaylink is realized with a git submodule like jimtcl. As libjaylink depends on libusb-1.0 only, no additional dependency is introduced for OpenOCD. All low-level JTAG and SWD implementations of the current driver are left untouched and therefore no incompabilities are to be expected. Improvements of this patch: * Support for more USB Product IDs, including those with the new scheme (0x10xx). The corresponding udev rules are also updated. * Device selection with serial number and USB address. * Adaptive clocking is now correctly implemented and only usable for devices with the corresponding capability. * The target power supply can now be switched without the need for changing configuration and power cycling the device. * Device configuration is more restrictive and only allowed if the required capabilities are available. * Device configuration now shows the changes between the current configuration of the device and the values that will be applied. * Device configuration is verified after it is written to the device exactly as the vendor software does. * Connection registration is now handled properly and checks if the maximum number of connections on a device is reached. This is also necessary for devices which are attached via USB to OpenOCD as some device models also support connections on TCP/IP. * Serial Wire Output (SWO) can now be captured. This feature is not documented by SEGGER however it is completely supported by libjaylink. This patch and libjaylink were tested on Ubuntu 14.04 (i386), Debian 7 (amd64), FreeBSD 10.0 (amd64) and Windows XP SP3 (32-bit) with the following device and target configurations: * JTAG: J-Link v8.0, v9.0 and v9.3 with AT91SAM7S256 * SWD: SiLabs EFM32 STK 3700 (EFM32GG990F1024) * SWD: J-Link v8.0, v9.0 and v9.3 with EFM32GG990F1024 * SWD: XMC 2Go (XMC1100) * SWD: XMC1100 Boot Kit (XMC1100) * SWD: IAR Systems / Olimex Eval Board (LPC1343F) * SWD: Nordic Semiconductor nRF51 Dongle (nRF51422) * SWD: SiLabs EZR32 WSTK 6220A (EZR32WG330FG60G) Except for Windows XP all builds are tested with Clang in addition to GCC. This patch and libjaylink are not tested on OSX yet. Change-Id: I8476c57d37c6091c4b892b183da682c548ca1786 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/2598 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Paul Fertser <fercerpav@gmail.com> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-11-20jtag: cmsis-dap: Issue disconnect before reconnectingTomas Vanek
cmsis-dap protocol has both DAP_Connect and DAP_Disconnect commands. Logically if cmsis_dap_swd_switch_seq() calls DAP_Connect in connected state it should call DAP_Disconnect first. Doing so surprisingly solves problems on Atmel EDBG with target SAMD/R/L/C. Without this change SWD communication breaks after reset run/halt in config "reset_config srst_only" and reconnect trials repeatedly fail with "SWD ack not OK: 0 JUNK" Change-Id: Ie951098d5e0c83f388e2df414608aaabec2135c9 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3098 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-09-30stlink_usb: fix typoJim Paris
Change-Id: I3cf5ced568319878b8bf40743e4c07718f630c68 Signed-off-by: Jim Paris <jim@jtan.com> Reviewed-on: http://openocd.zylin.com/2953 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-08-06bcm2835gpio: Add SWD support, Raspberry Pi 2 support.Christoph Pittracher
Added support for SWD transport similar to sysfsgpio driver. Added configurable peripheral base address to support Raspberry Pi 2. Change-Id: If76d45fbe74ce49f1f22af72e5f246e973237e04 Signed-off-by: Christoph Pittracher <pitt@segfault.info> Reviewed-on: http://openocd.zylin.com/2802 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-08-06jlink: Add on-board nRF51-DK USB VID and PIDKyle Manna
* Add USB VID and PID for the J-Link interface running on the Nordic Semiconductor nRF51-DK. Also tested with debug out port to debug external boards. * Elimiantes need for `-c "jlink pid 0x1015"` on the openocd cmd line. Change-Id: Ib23acb72b9f5183b76fc7dc22b556982869ae830 Signed-off-by: Kyle Manna <kyle@kylemanna.com> Reviewed-on: http://openocd.zylin.com/2775 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-05-17jtag/drivers/stlink: fix SRST issue with stlink-v1Paul Fertser
Even though the latest firmware version for stlink-v1 supports "v2" JTAG API, the hardware SRST handling is still broken; amend the check accordingly. Change-Id: I62c662cd7aa209d2d6e9fe260f5c0be81d0ce672 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2761 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-04-24jtag/drivers/ti_icdi: do not segfault when adapter can't be openedPaul Fertser
Change-Id: Id3af8dfd18b13947bca4f3c89c2516ccbcef60b6 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2742 Tested-by: jenkins
2015-04-16configure the SWD frequency when setting adapter speed in SWD mode for versaloonSimon Qian
Change-Id: I99cdc11ba1442e4c9efaa0f1de8e7089ec725e14 Signed-off-by: Simon Qian <openocd@versaloon.com> Reviewed-on: http://openocd.zylin.com/2608 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>