aboutsummaryrefslogtreecommitdiff
path: root/src/jtag
AgeCommit message (Collapse)Author
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-29jim-nvp: Make Jim_GetOpt_String const-correctAndreas Fritiofson
Change-Id: Iae9824f6ff47a1944e674e59bfaa970904645082 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3178 Tested-by: jenkins
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-22helper: Add converter from JEP106 ID to manufacturer nameAndreas Fritiofson
Use it to print the manufacturer of detected TAPs Change-Id: Ic4384c61c7f6f7ae2a9b860a805a5997542f72cc Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3177 Tested-by: jenkins Reviewed-by: Jiri Kastner <cz172638@gmail.com> 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-23jtag: commands: save a pointer to list tailFelipe Balbi
By saving a pointer to the tail of the list, we don't need to traverse the entire command queue before we're able to append an item to it. With this patch, I see a 10% improvement when using the embedded XDS100v2 on AM437x IDK board to load a 4MiB binary (linux zImage) to DDR with load_image. IOW, we went from ~305kB/sec to ~336kb/sec. Change-Id: Idb55d49f0d0106043374ab520b2f3b6b32f2c50f Signed-off-by: Felipe Balbi <balbi@ti.com> Reviewed-on: http://openocd.zylin.com/2709 Tested-by: jenkins Reviewed-by: Stian Skjelstad <stian@nixia.no> Reviewed-by: Daniele Emancipato <daniele12457@hotmail.com> Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de> 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>
2015-04-16stlink_usb.c: Decode some more errors.Uwe Bonnes
Change-Id: I637cb63bd39120554aa184eaa48fd00a4852359f Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Reviewed-on: http://openocd.zylin.com/2706 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-04-16cmsis-dap: print vendor and product id on open failureSpencer Oliver
Change-Id: Iae7ed8d59a722b805536550a8033f5fb7c85c5fc Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/2708 Tested-by: jenkins Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com>
2015-04-14jtag/startup.tcl: fix regression with autoselecting JTAGPaul Fertser
This regression was introduced with d90b86d8. "transport select" doesn't throw an error anymore and autoselects the first available transport on its own. Reported by moyix on IRC. Change-Id: I3f303c0372e915931cca4b28af450694abc1a63e Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2693 Tested-by: jenkins
2015-04-14jtag/tcl: fix incorrect memcpy in jim_newtap_expected_idPaul Fertser
Found by clang static checker. On the very first call of jim_newtap_expected_id() pTap->expected_ids and expected_len are null, and there's nothing to copy. This patch changes this cryptic code to use realloc() instead. Change-Id: Ic0b5140d08257a906f15b55a2ae64db7bc06d5f1 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2562 Reviewed-by: Stian Skjelstad <stian@nixia.no> Tested-by: jenkins
2015-04-14startup: Fixed measure_clk to return kHz instead of MHz.Ed Beroset
The original code had iterated 10,000,000 times and taken the elapsed time divided by 10,000, to yield kHz which is mathematically correct only if we were measuring time in seconds, but we are measuring time in milliseconds, so the correct divisor is actually 10,000,000. Previous code would report 0.500 for actual measured speed of 500 kHz. Change-Id: Iba4c4961fe3973e7ccfa6dfa11d606a966ceb50c Signed-off-by: Ed Beroset <beroset@ieee.org> Reviewed-on: http://openocd.zylin.com/2573 Tested-by: jenkins Reviewed-by: Jens Bauer <jens@gpio.dk> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-04-14jtag/core: honour SRST timings in SWD modePaul Fertser
Since SWD is currently abusing the JTAG command queue for reset and sleep handling (and all other operations are performed in a different way), sleep needs to be forced explicitly to ensure correct timings. Change-Id: I5b0da6cbb7d0560154e4077b261aa6828cefc892 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2591 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-25jtag/drivers/ftdi.c: removed memory leakMateusz Manowiecki
swd_cmd_queue buffer memory leak removed Change-Id: Iafcdf034d32a37d577b58b6256c8fd9b064ce228 Signed-off-by: Mateusz Manowiecki <segmentation@fault.pl> Reviewed-on: http://openocd.zylin.com/2563 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-25drivers/cmsis-dap: port to common SWD frameworkPaul Fertser
Valgrind-tested. Comparison of flashing performance on an FRDM-KL25Z board running mbed CMSIS-DAP variant, 5MHz clock, old driver: wrote 28096 bytes from file demo.elf in 26.833590s (1.023 KiB/s) verified 27264 bytes in 1.754972s (15.171 KiB/s) this implementation: wrote 28096 bytes from file demo.elf in 3.691939s (7.432 KiB/s) verified 27264 bytes in 0.598987s (44.450 KiB/s) Also tested "Keil ULINK-ME CMSIS-DAP" with an STM32F100 target, 5MHz clock, results reading from flash, old driver: dumped 131072 bytes in 98.445305s (1.300 KiB/s) this implementation: dumped 131072 bytes in 8.242686s (15.529 KiB/s) Change-Id: Ic64d3124b1d6cd9dd1016445bb627c71e189ae95 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2356 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-25armv7m_trace, stlink: provide APIs to capture trace with an adapterPaul Fertser
Change-Id: I9d193dd5af382912e4fe838bd4f612cffd11b295 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2540 Tested-by: jenkins
2015-03-25armv7m: add generic trace support (TPIU, ITM, etc.)Paul Fertser
This provides support for various trace-related subsystems in a generic and expandable way. Change-Id: I3a27fa7b8cfb111753088bb8c3d760dd12d1395f Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2538 Tested-by: jenkins
2015-03-09jlink: Add variant "J-Link Lite-XMC4000"Andreas Färber
Avoids "J-Link hw type unknown 0x10" on the Infineon Relax Lite Kit. Change-Id: I3091623ead2e84b67ac20d9866307ccbb3f26f66 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/2568 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-09jlink: Add variant "J-Link Lite-XMC4200"Andreas Färber
Avoids "J-Link hw type unknown 0x11" on various Infineon boards. Change-Id: If20b9e21110d2acc02be57f5faf28c5e6a39e2c9 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/2565 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-09hla/hla_interface: call HLA layout API close() on quitPaul Fertser
This bug was exposed by Valgrind. Change-Id: I2e2bc036b49ca3ff22f78f765ee4537763350096 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2543 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-09stlink: avoid null pointer dereference in stlink_usb_close()Paul Fertser
Otherwise it happens if stlink can not be opened on start. Change-Id: I7088f10e61508dae230eccfe576a51498c92f5b8 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2550 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Stian Skjelstad <stian@nixia.no>
2015-03-09jtag/drivers/buspirate: add JTAG_STABLECLOCKS cmdMateusz Manowiecki
Solution found on the internet Change-Id: Ied6f7d9b28131a7ac83b203e4c64d4e9ffec0595 Signed-off-by: Mateusz Manowiecki <segmentation@fault.pl> Reviewed-on: http://openocd.zylin.com/2496 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-02-22Add SWD protocol support to sysfsgpioJean-Christian de Rivaz
Based on the initial work on bcm2835gpio.c by Paul Fertser with many additions. Modifications to the GPIO handling was minimal in this patch. A more big modification is required before cleanup the interface between bitbang and sysfsgpio. Change-Id: I54bf2a2aa2ca059368b0e0e105dff6084b73d624 Signed-off-by: Jean-Christian de Rivaz <jc@eclis.ch> Reviewed-on: http://openocd.zylin.com/2438 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-02-22Add SWD protocol support to bitbangJean-Christian de Rivaz
This is based on the initial work by Paul Fertser with addition of the switch sequences and new ACK handling. In case of WAIT response, the sticky bits are cleared and the last operation is repeated. The ACK handling is based on the interpretation of the 8 February 2006 ARM Debug Interface v5 Architecture Specification Change-Id: Id50855b1ffff310177ccf9883dc9eb0d1b4458c8 Signed-off-by: Jean-Christian de Rivaz <jc@eclis.ch> Reviewed-on: http://openocd.zylin.com/2437 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Paul Fertser <fercerpav@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-02-11J-Link serial number config optionJoerg Fischer
Add serial option to jlink config commands, handy when there is more than one adapter connected. To select adapter 0123456 for OpenOCD, use jlink serial 0123456 Change-Id: Ib29ce3f0c4975e1169211721a4531bf4db61f1ee Signed-off-by: Joerg Fischer <turboj@gmx.de> Reviewed-on: http://openocd.zylin.com/2521 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-02-11jlink: Added hardware version number for JLink firmware on LPC-Link2Nemui Trinomius
JLink firmware on LPC-Link2 has unique hardware version number(0x12). Change-Id: I76b6e27c47d236da75c61dd6b83d6a823615968d Signed-off-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp> Reviewed-on: http://openocd.zylin.com/2298 Tested-by: jenkins Reviewed-by: Anders Oleson <anders@openpuma.org> Reviewed-by: Xiaofan <xiaofanc@gmail.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-01-30drivers/stlink: clarify "init mode failed" messagePaul Fertser
The message as it was didn't let the user know that something was wrong with the target or wiring. Change-Id: Ib609c2d31959e77413e61c348d0e31d7269d5c58 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2365 Tested-by: jenkins Reviewed-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Reviewed-by: Jens Bauer <jens@gpio.dk>
2015-01-30jtag/drivers: remove useless checks causing build failure with clang 3.5.0Paul Fertser
Change-Id: Icafab6ac1e3e79c6da1bc163c30744eee4bde8d3 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2482 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de>
2015-01-30Use (uint8_t *) for buf_(set|get)_u(32|64) instead of (void *)Paul Fertser
This helps to uncover incorrect usage when a pointer to uint32_t is passed to those functions which leads to subtle bugs on BE systems. The reason is that it's normally assumed that any uint32_t variable holds its value in host byte order, but using but_set_u32 on it silently does implicit pointer conversion to (void *) and the assumption ends up broken without any indication. Change-Id: I48ffd190583d8aa32ec1fef8f1cdc0b4184e4546 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2467 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-01-28jtag: Rewrite TAP verification/auto-probe logicAndreas Fritiofson
Enable auto-creating additional discovered TAPs even if some TAPs are predefined, avoiding initialization failure when it's not necessary. Also, drop the arbitrary limit on the number of predefined TAPs. Still, don't auto-create any if there are more than 20 TAPs already, to stop a noisy connection from creating unlimited TAPs. Create auto-probed TAPs with less noise. Reduce code duplication between verification and auto-probing. Change-Id: I82a504d92dbcc0060206e71f10c5158256b5f561 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2236 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-01-26jtag/drivers/cmsis-dap-usb: fix cmsis_dap_serialJaakko Kukkohovi
Previously the serial wasn't actually used in hid_open() call, which meant that the first device with matching vid:pid was opened irrespective of the actual serial number. Change-Id: I45216ae5d9e0798e97be693c30e2f03c89b9a02b Signed-off-by: Jaakko Kukkohovi <jkukkohovi@gmail.com> Reviewed-on: http://openocd.zylin.com/2487 Tested-by: jenkins Reviewed-by: Jörg Wunsch <openocd@uriah.heep.sax.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-01-26jtag/drivers/stlink: demote the output of available speeds to DEBUGPaul Fertser
Change-Id: If0afb6fb1cb2f39619e4e614573065c145255c3e Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2469 Reviewed-by: Jens Bauer <jens@gpio.dk> Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-01-26jtag/hla_interface: avoid segfault with adapters that do not have ↵Paul Fertser
configurable speed Change-Id: I0386cbfc85ba8b28d3819530f9950b31545d6821 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2468 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>