summaryrefslogtreecommitdiff
path: root/src/jtag/jlink.c
Commit message (Collapse)AuthorAgeFilesLines
* Submitted by Magnus Lundin <lundin@mlu.mine.nu>:zwelch2009-05-231-21/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates to the J-Link interface driver to support more device versions: - Add capability detection: - if capable, detect protocol version; otherwise, assume v2 protocol. - if capable, detect buffer size; otherwise, assume minimal. - Disable command result queries for devices using v2 protocol. - Defined and use JTAG2 command with v2 protocol; JTAG3 is v3 protocol. - Add TCL command to allow explicit setting of J-Link protocol version. With approval, I revised the patch to make the following changes: - add static keywords to new jlink-specific variables - factor calculation of major_version to be more readable - remove braces around simple one-line statements in if/else clauses - remove (rather than #if 0) duplicate reset code; it is in SVN - use &function to be clearer when passing function pointers - add symbols for EMU_CMD_GET_CAPS bits; do not hard-code constants! - almost renamed jlink_handle_jlink_hw_jtag_command (seriously?!?!) - rewrote that function using a switch statement. - made version request processing easier to understand and modify - improve alternate endpoint detection: - make code easier to read by using temporary variables - eliminate extra level of indentation and redundant logging - use ternary conditional to select JTAG2 or JTAG3 command - reverse version test in jlink_usb_message to reduce indentation - this had the biggest effect in cleaning up this patch - use C99's ability to declare new/changed variables with less scope - add spaces around binary operators in new/changed code - revert other superfluous whitespace/comment style changes git-svn-id: svn://svn.berlios.de/openocd/trunk@1889 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* JLink support for non-7-cycle state moves by Dick Hollenbeck <dick@softplc.com>kc8apf2009-05-181-4/+10
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1826 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Michael Bruck <mbruck@digenius.de> change 'ir_scan' from 'int' to 'bool' to ↵oharboe2009-05-161-2/+2
| | | | | | document its semantics git-svn-id: svn://svn.berlios.de/openocd/trunk@1800 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Audit and eliminate redundant #include directives from src/jtag.zwelch2009-05-111-5/+0
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1707 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Small changes that might improve stability.mlu2009-05-061-19/+43
| | | | | | Implemented new jtag sequences tap_get_tms_path and tap_get_tms_path_len git-svn-id: svn://svn.berlios.de/openocd/trunk@1616 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Fix jlink usb_bulk_with_retries to return actual error codes.zwelch2009-04-291-13/+10
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1564 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Remove vestigial last_tms variable from jlink driver.zwelch2009-04-291-3/+0
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1563 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Fix jlink for Debian/Ubuntu (by Ben Dooks <ben-openocd@fluff.org>).zwelch2009-04-291-1/+10
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1561 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Correctedout buffer size and missing jlink_tap_init() call.mlu2009-04-281-17/+45
| | | | | | | Expanded JLink adapter info at startup. git-svn-id: svn://svn.berlios.de/openocd/trunk@1556 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* add jtag_debug_state_machineoharboe2009-04-241-0/+5
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1525 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Zach Welch <zw@superlucidity.net> add TAP_SCAN_BYTES macro (1 of 2)oharboe2009-04-241-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1524 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Zach Welch <zw@superlucidity.net> use memcpyoharboe2009-04-241-17/+3
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1521 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Zach Welch <zw@superlucidity.net> do not pad TMSoharboe2009-04-221-9/+6
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1509 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Zach Welch <zw@superlucidity.net> set speed in initoharboe2009-04-221-0/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1508 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Zach Welch <zw@superlucidity.net> fix jlink resetoharboe2009-04-221-0/+4
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1507 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Shrink JLink buffer sizes to specified 2KB courtesy of Jeff Williams ↵kc8apf2009-04-221-2/+3
| | | | | | <jeffw@gadgetworks.com> and Zach Welch <zw@superlucidity.net> git-svn-id: svn://svn.berlios.de/openocd/trunk@1504 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* refactor jlink_execute_queue courtesy of Zach Welch <zw@superlucidity.net>kc8apf2009-04-221-81/+99
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1500 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Zach Welch <zw@superlucidity.net> refactoroharboe2009-04-211-177/+154
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1498 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Zach Welch <zw@superlucidity.net> add --enable-verbose* optionsoharboe2009-04-211-12/+0
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1495 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Zach Welch <zw@superlucidity.net> fix jlink format warningoharboe2009-04-211-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1493 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Zach Welch <zw@superlucidity.net> factor jlink usb_bulk_*_ex functionsoharboe2009-04-211-31/+18
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1492 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Zach Welch <zw@superlucidity.net> fix -Wformat-security warnings (1 of 4)oharboe2009-04-211-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1481 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Zach Welch <zw@superlucidity.net> use static keyword in jtag layer and driversoharboe2009-04-211-61/+61
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1479 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Nikolay Shadrin whoney at gmail.com, Zach Welch <zw@superlucidity.net> ↵oharboe2009-04-191-11/+59
| | | | | | unstable USB J-Link in OpenOCD (revised patch provided) git-svn-id: svn://svn.berlios.de/openocd/trunk@1475 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Partially fix USBprog and JLink adapters on XScale targetmifi2009-04-191-1/+4
| | | | | | Thanks to Peter Denison <openwrt(at)marshadder.org> git-svn-id: svn://svn.berlios.de/openocd/trunk@1471 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Added functionality to support jtag_khz for the jlink.mifi2009-04-191-0/+9
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1470 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* The following patches was applied:mifi2009-04-181-11/+12
| | | | | | | | | | | | | - openocd-flash-static-keyword-v3.patch - openocd-lpc2000-fix-erase-obo.patch - openocd-jlink-fix-sign-ptr-warn.patch - openocd-wextra-etm.patch - openocd-wextra-jtag.patch - openocd-add-new-tap-symbols-v6.patch Many thanks to Zach Welch <zw(at)superlucidity.net> git-svn-id: svn://svn.berlios.de/openocd/trunk@1462 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Use C89/C99/C++ compliant boolean typeskc8apf2009-02-101-2/+2
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1370 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Cable driver helper API courtesy of Dick Hollenbeck <dick@softplc.com>kc8apf2009-02-031-21/+21
| | | | | | | - Formatting changes from uncrustify git-svn-id: svn://svn.berlios.de/openocd/trunk@1366 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Update tap_state_strings to correspond to SVF state nameskc8apf2008-12-141-1/+1
| | | | | | | - Use new jtag_state_name() instead of global tap_state_strings[] git-svn-id: svn://svn.berlios.de/openocd/trunk@1240 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Clean up references to old tap_state nameskc8apf2008-12-131-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1235 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Change tap_state naming to be consistent with SVF documentation.kc8apf2008-12-131-111/+111
| | | | | | | Courtesy of Dick Hollenbeck <dick@softplc.com> git-svn-id: svn://svn.berlios.de/openocd/trunk@1232 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - fix issue with jlink/libusb timeout under linuxntfreak2008-11-031-1/+1
| | | | | | - add missing svn props git-svn-id: svn://svn.berlios.de/openocd/trunk@1128 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - added myself to copyright on files i remember adding large contributions ↵ntfreak2008-09-201-0/+3
| | | | | | | | | for over the years - cleaned up headers to match rest of code - added missing svn props for previously added files git-svn-id: svn://svn.berlios.de/openocd/trunk@987 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - fix target_examine declarationntfreak2008-08-061-4/+4
| | | | | | | | - remove build warnings - added --enable-gccwarnings to docs - update mips_m4k_examine function git-svn-id: svn://svn.berlios.de/openocd/trunk@893 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - error message cleanup in jlink driverntfreak2008-06-101-9/+8
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@707 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - fix jlink accessing incorrect buffer elementntfreak2008-06-041-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@701 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - fix issue if jlink sends result in single usb in packetntfreak2008-05-271-20/+32
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@691 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - renamed EMU_CMD_HW_JTAG to EMU_CMD_HW_JTAG3mifi2008-05-261-2/+2
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@689 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - changed some buffer defines to increase performancemifi2008-05-251-5/+5
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@685 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - comment out usb_set_altinterface, because it is not working under Mac OS X.mifi2008-05-241-0/+7
| | | | | | And not needed for Windows. Hopefully it will not break a Linux build. git-svn-id: svn://svn.berlios.de/openocd/trunk@684 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - swap processing of reset handling. First srst and than trst.mifi2008-05-241-8/+8
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@680 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - corrected copy/paste type and renamed jlink_usb_read_result to ↵mifi2008-05-241-5/+5
| | | | | | jlink_usb_read_emu_result git-svn-id: svn://svn.berlios.de/openocd/trunk@678 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - removed obsolete cmd JLINK_TAP_SEQUENCE_COMMAND, use EMU_CMD_HW_JTAG insteadmifi2008-05-241-13/+48
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@677 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - jlink jlink_execute_queue returns resultntfreak2008-05-241-68/+56
| | | | | | | - added jlink_get_version_info function - reformatted spaces to tabs git-svn-id: svn://svn.berlios.de/openocd/trunk@676 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - replaced JLINK_xxxx command defines by EMU_CMD_ from themifi2008-05-241-27/+58
| | | | | | | J-Link USB Protocol specification - added functionality to jlink_init to display the version. git-svn-id: svn://svn.berlios.de/openocd/trunk@675 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - added jlink support, based on Jürgen Stuber patchntfreak2008-05-141-0/+846
git-svn-id: svn://svn.berlios.de/openocd/trunk@658 b42882b7-edfa-0310-969c-e2dbd0fdcd60