aboutsummaryrefslogtreecommitdiff
path: root/src/jtag
AgeCommit message (Collapse)Author
2013-09-13nds32: change default valueHsiangkai Wang
Change-Id: I0505bdc0e75543a3b205981339c5b9fa78a080ca Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1575 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-09-13nds32: support Andes profiling functionHsiangkai Wang
Change-Id: Ibc45ec5777d6841956c02de6b4ae8e74c2a6de37 Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1585 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-09-13aice: support batch commandsHsiangkai Wang
Change-Id: I6846362d98374c93f45f339fb1279fc71721e696 Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1584 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-09-13aice: Always setup SDP basic modeHsiangkai Wang
Change-Id: I1c0c11c2b9097b25324da0591edf036af207dbe9 Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1567 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-09-13aice: use keep_alive() to avoid timeout warning messagesHsiangkai Wang
As polling $dbger, call keep_alive() to avoid timeout messages. Change-Id: Ia03d90535c2bd6049763209194c21f70fd8b7e8b Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1566 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-09-10sysfsgpio: fix a typo in the informational outputPaul Fertser
Change-Id: I0c9bc281e4e913f9eacba3b8b60585217a1caf2e Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1616 Tested-by: jenkins Reviewed-by: Peter Stuge <peter@stuge.se>
2013-09-08jtag: drivers: Add JTAP VPI client driverFranck Jullien
This patch adds a driver for the jtag_vpi server [1]. This server is now part of the ORPSoC version 3 (OpenRISC Reference Platform SoC). The jtag_vpi server provides an interface between OpenOCD and a simulated core. [1] http://github.com/fjullien/jtag_vpi Change-Id: I717b72cace4845f66c878581345074f99002e21a Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Reviewed-on: http://openocd.zylin.com/1609 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-08-29stlink: Add workaround for intermittent FW info retrieval failureAndrey Smirnov
It appears that on some host USB configurations(2012 MacBook Air) multiple restarts of openocd tool cause the FW on STLINKv2 dongle to go into a weird state in which it will no longer respond to STLINK_GET_VERSION command. This patch adds code that, if said request fails for the first time, attempts to reset the device and retry to initialize it and obtain FW information one more time. Change-Id: I7227fc972adb49d52ae700ad48ab9f66b2aaa72c Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Reviewed-on: http://openocd.zylin.com/1561 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-08-29stlink_usb: remove gcc-specific constantAndrey Yurovsky
Replace 0b10 with 0x02, 0b is a GCC extension and isn't supported by clang, for instance, so compiling on OS X will fail. No functional changes. Change-Id: Ie882be1563df03e7ad3da0bc9aee65a907a29549 Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-on: http://openocd.zylin.com/1560 Tested-by: jenkins Reviewed-by: Xiaofan <xiaofanc@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-08-07stlink: add SWO tracing supportAndrey Yurovsky
Enable reading the SWO trace output via STLinkv2 dongles that support it. This adds an optional initialization parameter "trace" with which the user specifies a destination file where SWO trace output is appended as it comes in as well as the trace module's source clock rate. STLink will be configured for a 2MHz SWO data rate (STLink's highest supported rate) if the source clock is > 2MHz, otherwise the source clock is used as the data rate directly. For example: trace swo.log 168000000 If "trace" is specified with a usable file path, the stlink_usb driver will attempt to configure and read SWO trace data as follows: - on _run(), the target's TPI and TMI are configured and the STLinkv2 is told to enable tracing. Only generic ARM TPI and TMI registers are configured, any MCU-specific settings (ex: pin routing) are the responsibility of the target firmware. The configuration applied is based on the STLinkv2's capabilities (UART emulation). - on _v2_get_status(), the trace data (if any) is fetched from the STLink after the target status is checked and the target is found to be running. - on _halt(), the STLink is told to disable tracing. When fetching trace data, the entire trace frame is written to the output file and that data is flushed. An external tool may be used to parse the trace data into a more human-readable format. Tested on ARM Cortex M4F and M3 MCUs (STM32F407 and STM32L152). Change-Id: Ic3983d46c82ba77010c23b0e18ce7b275d917f12 Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-on: http://openocd.zylin.com/1524 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-08-05jtag/drivers: usb_blaster cheap clone documentationRobert Jarzmik
Add documentation about the cheap clone based on the Cypress chip. The documentation has schematics data, and throughtput mesures. Change-Id: I51bf19ff9229565e178dd4c1231682bd9b4b7a8b Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Reviewed-on: http://openocd.zylin.com/1520 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-08-01mpsse: Add missing read buffer checksAndreas Fritiofson
These two unused functions added reads without checking for available space. Change-Id: I17dbbe9988b057e5a3a1768f405fc9d1027d1c01 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1500 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-08-01mpsse: Defer errors until flushAndreas Fritiofson
Simplify the API by making all MPSSE command functions return void instead of an error code. If there is an error during an implicit flush in a command call, further commands are ignored until an explicit flush is performed. The flush function returns and clears any error code set. The only command functions that still return an error code are those that can fail directly based on the type of the FTDI chip, i.e. when trying to enable RCLK or divide-by-5 on a non-high-speed chip. Adapt the ftdi adapter driver to the new API. Change-Id: I12979c723c81f7fd022c25821b029112f02b3f95 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1499 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17OpenULINK firmware: update firmware hex imageMartin Schmölzer
This image has been re-compiled with SDCC 3.3.0 and achieves slightly better performance (50-100 Byte/s for STM32F103 flash write) due to new/improved compiler optimizations. Successfully tested with ULINK probe and STM32F103 (debug, erase and write flash). Change-Id: I4329aa42f50461fa3719fd63d0054d8e86982727 Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at> Reviewed-on: http://openocd.zylin.com/1486 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17OpenULINK firmware: change .lnk file extension to .lk in "make clean"Martin Schmölzer
Recent versions of SDCC generate .lk files instead of .lnk - change the OpenULINK Makefile "clean" target and top level .gitignore file to reflect this. Change-Id: I36f38638b712b962498c69c362f123378e1aa045 Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at> Reviewed-on: http://openocd.zylin.com/1485 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17OpenULINK firmware: Use C99 designated struct initializersMartin Schmölzer
Recent versions of SDCC added support for C99 designated struct initializers. This provides better code readability (no functional changes). Successfully tested with ULINK probe and STM32F103 (debug, erase and write flash). Change-Id: Idfa35147d2c3043baaa21a811b926b3845c85f9b Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at> Reviewed-on: http://openocd.zylin.com/1484 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17ULINK driver and OpenULINK firmware: whitespace and comment fixes (trivial)Martin Schmölzer
In commit de0130a0aad83c1ef692ee4d68ab996a8668424d, some doxygen documentation blocks of the form "///< ..." (documentation after member) got changed to "/* /< ...", which is not recognized by doxygen. This commit changes them to the correct form "/**< ...". Also, remove some leading whitespace characters and fix alignment of comment blocks where appropriate. Change-Id: I73a5cf55753722fa0e1d6551f05c47ee88172f0f Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at> Reviewed-on: http://openocd.zylin.com/1483 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17OpenULINK firmware: fix name of USB Jump Table symbolMartin Schmölzer
Fix a case mistake in the name of the USB Jump Table ("USB_jump_table" vs. "USB_Jump_Table") which led to an assembler error when attempting to build the firmware with recent SDCC versions, because the assembler now treats symbol names as case-sensitive. Successfully tested with ULINK probe and STM32F103 (debug, erase and write flash). Change-Id: I979667b9130efcdccc3ac73269c38f06e0590048 Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at> Reviewed-on: http://openocd.zylin.com/1482 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17ULINK driver: port from libusb-0.1 to libusb-1.0 APIMartin Schmölzer
The ULINK driver now uses libusb-1.0 calls (synchronous device I/O) directly (not the common layer provided by libusb1_common.c) Successfully tested with ULINK probe and STM32F103 (debug, erase and write flash). Change-Id: Ic037a3582db85e49a8cc1ec0dd36f629e4757929 Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at> Reviewed-on: http://openocd.zylin.com/1459 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-15jtag/drivers: trivial variable renamingRobert Jarzmik
Rename ublast_sleep() time variable from ms to us as the unit is in micro-seconds. Change-Id: I07ff9c36d302d5d59edb8a5faa73d78cdd6145a4 Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Reviewed-on: http://openocd.zylin.com/1457 Tested-by: jenkins Reviewed-by: Xiaofan <xiaofanc@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-15ulink: Move firmware install from pkglibdir to pkgdatadirAndreas Fritiofson
The precompiled OpenULINK firmware is just data to OpenOCD so I think it belongs in $(prefix)/share/openocd rather than in $(prefix)/lib. Change-Id: Id84c32cd0ddfb96861e903e8f23c16a81e1a0ca1 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1487 Tested-by: jenkins Reviewed-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-15ftdi: Fix error in calloc retval checkAndreas Fritiofson
Found by clang. Change-Id: Iaa952b063779f4d392d8bdc62a3e7ce9daef2740 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1498 Tested-by: jenkins Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-15versaloon: remove bogus assignmentPaul Fertser
This fixes the build with Clang 3.3. Change-Id: I729b4791c16178cdd4a87f7e1c04019da2c84b26 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1488 Reviewed-by: Laszlo Papp <lpapp@kde.org> Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-15aice: fix FTBFS on ARMPaul Fertser
This fixes a bunch of errors like this: aice_usb.c: In function 'aice_pack_htdc': aice_usb.c:63:4: error: cast increases required alignment of target type [-Werror=cast-align] Compile-tested only. I think this can be seen as another justification for an ARM Jenkins build target. Also, the aice code I've seen so far seems to be assuming it runs on a little-endian machine so probably there're some endianness issues hiding. Hsiangkai, please get an old PowerPC Mac (or at least some fast usb-equipped MIPS SOHO WiFi AP/router for which you can cross-compile OpenOCD with OpenWrt) and do some real-life testing for your code on Big-Endian. I propose it to be a requirement for any non-trivial code submitted by a commercial entity of reasonable size. Change-Id: I45e05257687d0020d7172b26a8666ebc1950e00c Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1477 Tested-by: jenkins Reviewed-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-08usb_blaster: maintainer-clean Makefile.inAndreas Fritiofson
Change-Id: I120fc13a353c63e12d89698869b30c8e751db074 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1480 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-01Allow autoscan up to 64 bit IR lengthsAndreas Fritiofson
Change-Id: Ib15ff67b57606fe6c7997f3f9bd90e096acd5f3d Signed-off-by: Evan Hunter <ehunter@broadcom.com> Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/832 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-01Add support for 64 bit parameter to irscanEvan Hunter
Change-Id: I89e0422456c59ee86c4b6d9bd3b3ad32051b31ac Signed-off-by: Evan Hunter <ehunter@broadcom.com> Reviewed-on: http://openocd.zylin.com/831 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-06-29drivers/jtag: usb_blaster add pin controlsRobert Jarzmik
Add pin controls (pin6 and pin8). These pins can be controled either : - with a fixed value (0 or 1) - by TRST or SRST reset signal (driven low when signal activated). Change-Id: Ie6a3e57fc6ba6a38fdb9a009c976e3febab8f578 Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Reviewed-on: http://openocd.zylin.com/1448 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2013-06-21Bus Pirate driver: Small assorted fixes.R. Diez
Fixes are: - Discard any stale data from the previous connection. - Disable CR/LF translation on the (virtual USB) serial port. - Increase the average USB packet size. The 1 KiB buffer was underutilised. - Option "buspirate_speed fast" now works out of the box. - Some extra comments, error checking, etc. Change-Id: I72c49d943a8ce9c5e5d1644ef90cb1482f93c618 Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de> Reviewed-on: http://openocd.zylin.com/1437 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-06-12configure: remove --enable-libusb0 option, rework libusb selectionPaul Fertser
This makes libusb handling more consistent: if any driver requires libusb, first check for libusb-1 availability, if not found and libusb0 is ok for this case, try libusb0. A user-visible bug fixed by this is that when a user was selecting a driver that required libusb-1 but was lacking the necessary dev files or libraries, configure didn't complain (but the build was failing of course). --enable-stlink doesn't really require libusb-1 but since it's using the same automake symbol HLAADAPTER, ti_icdi is getting built too which needs libusb1 unconditionally. Since using libusb-0.1 makes little sense anyway, leave that as is. Signed-off-by: Paul Fertser <fercerpav@gmail.com> Change-Id: I630a4ad9e4583743d45b2233bf5d8f4e5c0aab82 Reviewed-on: http://openocd.zylin.com/1434 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-06-12libusb1_common, ftdi: clarify libusb_open error messagePaul Fertser
Print a user-friendly message when libusb_open() fails, e.g. Error: libusb_open() failed with LIBUSB_ERROR_ACCESS when there's a permissions problem. Also output a configure warning if libusb older than 1.0.9 is detected. Change-Id: I800f71f06672fe06c0a98a4e469f853b5021bcfe Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1430 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-06-10build: fix incorrect GPL address from last commitSpencer Oliver
962b3eb40cc5b69d9b3d6fcc4c5d56c4d204a307 included the old GPL address. Change-Id: I7affbdc3fc1c9251ea90796ab9eeef4d56ba4308 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1440 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2013-06-10Add BCM2835 (as found in Raspberry Pi) interface driverPaul Fertser
This adds support for JTAG programming by bitbanging GPIOs exposed on the RaspberryPi's expansion header. Tested by connecting directly to an STM32VLDiscovery board, without any additional circuity. I observed maximum about 4MHz on the TCK pin with an old analogue 'scope and about 100kHz when setting the speed to 100kHz. Busyloop waiting is needed because even with a single 0ns nanosleep call (with FIFO priority) it lowers the TCK speed to ~30kHz which is way too low to be useful. The speed testing with adapter_khz 2000 gave the following results: sudo chrt -f 1 nice -n -19 ./src/openocd \ -f interface/raspberrypi-native.cfg \ -c "set WORKAREASIZE 0x2000" \ -f target/stm32f1x.cfg -c "adapter_khz 2000" wrote 131072 bytes from file random.bin in 3.973677s (32.212 KiB/s) dumped 131072 bytes in 1.445699s (88.538 KiB/s) This is 3.7 times faster for writing and 14.3 times faster for reading compared to the generic sysfsgpio driver; probably the writing speed is limited by the target itself here and reading speed might be considerably higher too with appropriate connection and a capable target. BCM2835 name is choosen over BCM2708 because the published peripherals datasheet uses the particular model name and not family name. Change-Id: Ib78168be27f53c2a3c88c3dd8154d1190c318c78 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/758 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-06-05update files to correct FSF addressSpencer Oliver
Change-Id: I429f7fd51f77b0e7c86d7a7f110ca31afd76c173 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1426 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2013-06-05Added OpenJTAG DriverRyan Corbin
Updated OpenJTAG driver from www.openjtag.org to work with latest version of OpenOCD. Change-Id: I2917f4e5835fb9ca5265e81dc38515fa97ae9503 Signed-off-by: Ryan Corbin <corbin.ryan@gmail.com> Reviewed-on: http://openocd.zylin.com/1406 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-06-05aice: add Andes AICE supportHsiangkai Wang
Andes AICE uses USB to transfer packets between OpenOCD and AICE. It uses high-level USB commands to control targets instead of using JTAG signals. I define an interface as aice_port_api_s. It contains all basic operations needed by target-dependent code. Change-Id: I117bc4f938fab2732e44c509ea68b30172d6fdb9 Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1256 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-06-04drivers/jtag: rewrite usb_blaster driverRobert Jarzmik
Rewrite the Altera USB Blaster dongle driver : - make extensive use of byte-shift mode, to improve JTAG speed. This is the main reason of the rewrite. It improves the memory dumps with a factor 3 at least, and upload 100 times, from 1 kBytes/sec to 100 kBytes/sec with a USB-Blaster connected to an Altera Virtual JTAG TAP + OpenRISC CPU. - split the low level API part (between FTDI and FTD2xx) from core driver, so that in the future, if both libftdi and ftd2xx can coexist, the driver will be able to switch dynamically from one access to the other. Change-Id: I2ee9cedf4a5eb27501f337993ee0cdee52517e7c Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Marek Czerski <ma.czerski@gmail.com> Tested-by: Franck Jullien <franck.jullien@gmail.com> Reviewed-on: http://openocd.zylin.com/467 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Alexandre Becoulet <alexandre.becoulet@free.fr> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-06-03rlink: fix speed table generationPaul Fertser
The speed table generation (by using explicit make -f Makefile.rlink) was broken since 865efd828a267992db0f2a92a731c5ce23a34236 Dec 2 2009 which did a bunch of renaming and included hand-editing of a generated rlink_speed_table.c file. This patch is compile-tested, i.e. the new generated rlink_speed_table.c links fine with the rlink driver. Change-Id: I1789a2f2f5bf20183b772d55c55fe68a0bd05cf5 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1431 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-05-10remote_bitbang: De-duplicate init code and clean up on errorAndreas Fritiofson
Change-Id: I8be413a9e1683f96f835232f9ff25d9bd42099de Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1380 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-05-10remote_bitbang: Convert to use getaddrinfo()Andreas Fritiofson
Since gethostbyname() is deprecated and inconvenient, rewrite to use getaddrinfo() using an implementation more or less copied from its man page. This automatically enables support for IPv6. This also fixes a FTBFS on ARM due to alignment issues. Change-Id: I990a49506cac4b26faf77587937e506138371f7c Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1379 Reviewed-by: Paul Fertser <fercerpav@gmail.com> Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-05-08sysfsgpio: do not try to initialise absent signalsPaul Fertser
When e.g. SRST is not specified, the current code results in assigning 0 to srst_fd and subsequently a stray '1' is output on screen on reset. Avoid this by not doing bogus initialisation. Change-Id: Iadb847a384a927ae746124cf6e4e3c6cc8b11406 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1375 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-05-06jtag/adapter: add connect_[de]assert_srst to reset_config usagePaul Fertser
Add the connect under reset options to the online help for reset_config. Change-Id: I4b9a87b234de01531390b39b898a848841d1e834 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1377 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-04-28build fix: ft2232Oleksij Rempel
fix build with-ftd2xx-lib Change-Id: I4a9b5d204c29b7a0714a59494b2b5f959c73f99b Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Reviewed-on: http://openocd.zylin.com/1359 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-04-21Support newer OSBDM firmwareR. Steve McKown
OSBDM: add new VID:PID implemented in OSJTAG/OSBDM firmware somewhere between versions 30.13 and 31.21. PFLASH programming works with this patch, tested on a Freescale Kinetis TWR-K20D72M using its onboard OSBDM JTAG adapter. Note: flash program testing required hacking kinetis_write() to force longword programming, as the FTFL program section commands formulated by kinetis_write() currently fail on this board's PK20DX256VLL7 processor. Change-Id: Ib7b92ff2fe9ebf6158fb1489f554a19e96cd9651 Signed-off-by: R. Steve McKown <rsmckown@gmail.com> Reviewed-on: http://openocd.zylin.com/1348 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-04-17stlink: fix connect under reset issuesSpencer Oliver
We need to make sure that srst is asserted before we attempt to switch into jtag or swd mode otherwise we receive a error (-9) - invalid device id. Change-Id: I625166c751cfba8e8a5290f40122bb9afc9dbb39 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1315 Tested-by: jenkins
2013-04-17parport: fix parport_toggling_time regressionSpencer Oliver
If parport_toggling_time is called before the adapter speed has been configured then the call fails. Probably not the best fix, but does at least enable parport_toggling_time to be used again. This regression was added in commit 740b9e25b410c164e661d0334a9ea4168406726b Change-Id: I90300916d6bda5ef053c557e5ac136c4f002bdd1 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1309 Tested-by: jenkins
2013-04-17ft2232: remove ft2232_large_scan memory leakAndreas Fritiofson
This is a very long outstanding issue see: http://lists.berlios.de/pipermail/openocd-development/2011-June/019404.html As this driver is deprecated the fix is added to purely to reduce the warnings reported by clang. Change-Id: I3a16a704e0e8db27efda50fdcfdd35abf5ebed0f Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1278 Tested-by: jenkins
2013-04-17libusb: disable debug messages by defaultSpencer Oliver
Change-Id: I15dec0f521502139b57adaff576516af7883a74b Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1314 Tested-by: jenkins
2013-04-11ft2232: fix input scan ending in drshift/irshiftYann Vernier
The final bit was incorrectly added as output data, even if no data was to be written. Changed it to match handling of other bits. Change-Id: I91e5ba0c932876bfb579c22e6c7ef0300baa1534 Signed-off-by: Yann Vernier <yann.vernier@orsoc.se> Reviewed-on: http://openocd.zylin.com/1049 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-03-31ti_icdi: add icdi_usb_query result checkSpencer Oliver
Change-Id: I0b40586677a77ee6ae46fe120a677616bde22d1e Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1279 Tested-by: jenkins Reviewed-by: Xiaofan <xiaofanc@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>