Commit Graph

70 Commits

Author SHA1 Message Date
dbrownell
86a7d813a1 Remove annoying end-of-line whitespace from most src/*
files; omitted src/httpd


git-svn-id: svn://svn.berlios.de/openocd/trunk@2742 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-21 18:40:55 +00:00
ntfreak
d40fd9e0f4 Gary Carlson [gcarlson@carlson-minot.com]:
- revert patch from rev1507 as it was causing reset issues with arm9 cores

git-svn-id: svn://svn.berlios.de/openocd/trunk@2574 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-08-06 23:34:34 +00:00
ntfreak
ebd46e23b3 Gary Carlson <gcarlson@carlson-minot.com>
Spencer Oliver <spen@spen-soft.co.uk>

- fix jlink win32/linux/darwin startup issues
- see https://lists.berlios.de/pipermail/openocd-development/2009-July/009438.html

git-svn-id: svn://svn.berlios.de/openocd/trunk@2513 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-07-13 06:36:51 +00:00
ntfreak
cd1b2c15ab - change sleep to usleep - fixes issue under win32 build
git-svn-id: svn://svn.berlios.de/openocd/trunk@2483 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-07-06 15:41:55 +00:00
zwelch
a604b570da Gary Carlson <gcarlson@carlson-minot.com>:
Fix intermittent J-Link interface startup failures:
- Use usb_reset to ensure selected dongle is in known good state.
- Assert emulator reset durning status check to prevent supurious failures.
- Eliminate status check loop; not needed due to other fixes.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2471 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-07-06 10:34:33 +00:00
zwelch
fb1a9b2cb2 - Fixes '[|]' whitespace
- Replace ')\([|]\)(' with ') \1 ('.
- Replace ')\([|]\)\(\w\)' with ') \1 \2'.
- Replace '\(\w\)\([|]\)(' with '\1 \2 ('.
- Replace '\(\w\)\([|]\)\(\w\)' with '\1 \2 \3'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2374 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:45:15 +00:00
zwelch
8959de9f67 - Fixes '+' whitespace
- Replace ')\(+\)(' with ') \1 ('.
- Replace ')\(+\)\(\w\)' with ') \1 \2'.
- Replace '\(\w\)\(+\)(' with '\1 \2 ('.
- Replace '\(\w\)\(+\)\(\w\)' with '\1 \2 \3'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2373 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:44:17 +00:00
zwelch
84df52f9ea - Fixes '=' whitespace
- Replace ')\(=\)\(\w\)' with ') \1 \2'.
- Replace '\(\w\)\(=\)(' with '\1 \2 ('.
- Replace '\(\w\)\(=\)\(\w\)' with '\1 \2 \3'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2372 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:42:54 +00:00
zwelch
3813fda44a - Fixes '==' whitespace
- Replace ')\(==\)\(\w\)' with ') \1 \2'.
- Replace '\(\w\)\(==\)\(\w\)' with '\1 \2 \3'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2371 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:42:03 +00:00
zwelch
53d605e12c - Fixes '!=' whitespace
- Replace ')\(!=\)\(\w\)' with ') \1 \2'.
- Replace '\(\w\)\(!=\)(' with '\1 \2 ('.
- Replace '\(\w\)\(!=\)\(\w\)' with '\1 \2 \3'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2363 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:38:12 +00:00
duane
40d7e81c45 printf() warning fixes due to uint32_t change-over
git-svn-id: svn://svn.berlios.de/openocd/trunk@2293 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-19 23:15:58 +00:00
zwelch
86e4324f1b Finish transforming 'u32' to 'uint32_t'.
- Replace '\([^_]\)u32' with '\1uint32_t'.
- Replace '^u32' with 'uint32_t'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2281 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18 07:11:11 +00:00
zwelch
c18947b947 Transform 'u8' to 'uint8_t'
- Replace '\([^_]\)u8' with '\1uint8_t'.
- Replace '^u8' with 'uint8_t'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2276 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18 07:07:12 +00:00
zwelch
cd7f89f6bc Add get and set accessors for jtag_speed:
- Setter calls the interface driver callback to improve core encapsulation.
- Use getter in standard JTAG interface drivers and ZY1000 minidriver.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2159 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-09 08:40:10 +00:00
zwelch
4123f08263 David Brownell <david-b@pacbell.net>:
Remove pernicious whitespace from src/jtag/*c files; mostly
the end-of-line flavor for now, although there's more.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2036 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 00:56:41 +00:00
zwelch
a3e84343e2 Finish JTAG header file modularization; command factoring follows.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2029 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 06:29:09 +00:00
zwelch
67caf323f7 Remove interface.h from public JTAG header, include it where required.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2016 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 01:26:01 +00:00
ntfreak
88b5c6da2a - hack added to fix a issue with v5/6 jlink
v5/6 jlink seems to have an issue if the first tap move is not divisible by 8, so we send a TLR on first power up

git-svn-id: svn://svn.berlios.de/openocd/trunk@2004 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 16:07:31 +00:00
oharboe
8dab0ecf23 Remove unused code, TAP_INVALID is never passed to drivers.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1997 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 07:21:44 +00:00
zwelch
a88871bc6a Encapsulate JTAG Cable API and interface structure, plan for new header file.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1984 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-01 23:01:24 +00:00
zwelch
79cec48ba2 Peter Denison <openwrt@marshadder.org>:
The debugging code in jlink_tap_execute() called when _DEBUG_USB_COMMS_ is 
defined was using the entire cached scan length to print the results 
buffers, and not the correct length of each individual buffer.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1955 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 01:07:43 +00:00
zwelch
77015d5ae3 Remove unused jlink_execute_end_state (unreferenced after r1949).
git-svn-id: svn://svn.berlios.de/openocd/trunk@1951 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-30 21:53:10 +00:00
oharboe
7992eaf0fc remove unused JTAG_END_STATE
git-svn-id: svn://svn.berlios.de/openocd/trunk@1949 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-30 11:37:21 +00:00
zwelch
b11a5b07c6 Submitted by Magnus Lundin <lundin@mlu.mine.nu>:
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
2009-05-23 03:42:13 +00:00
kc8apf
10923655d6 JLink support for non-7-cycle state moves by Dick Hollenbeck <dick@softplc.com>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1826 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 17:42:36 +00:00
oharboe
231a71b7fb Michael Bruck <mbruck@digenius.de> change 'ir_scan' from 'int' to 'bool' to document its semantics
git-svn-id: svn://svn.berlios.de/openocd/trunk@1800 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-16 20:09:07 +00:00
zwelch
004c7124c4 Audit and eliminate redundant #include directives from src/jtag.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1707 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11 04:04:58 +00:00
mlu
0317db97cd Small changes that might improve stability.
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
2009-05-06 17:28:39 +00:00
zwelch
ae719b2706 Fix jlink usb_bulk_with_retries to return actual error codes.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1564 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-29 06:30:44 +00:00
zwelch
5ee99a7e80 Remove vestigial last_tms variable from jlink driver.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1563 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-29 05:22:14 +00:00
zwelch
a8f1307992 Fix jlink for Debian/Ubuntu (by Ben Dooks <ben-openocd@fluff.org>).
git-svn-id: svn://svn.berlios.de/openocd/trunk@1561 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-29 02:18:50 +00:00
mlu
f1864e3e92 Correctedout buffer size and missing jlink_tap_init() call.
Expanded JLink adapter info at startup.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1556 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-28 17:40:02 +00:00
oharboe
479a65e946 add jtag_debug_state_machine
git-svn-id: svn://svn.berlios.de/openocd/trunk@1525 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-24 18:10:04 +00:00
oharboe
447a615dc3 Zach Welch <zw@superlucidity.net> add TAP_SCAN_BYTES macro (1 of 2)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1524 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-24 16:24:55 +00:00
oharboe
caf214935a Zach Welch <zw@superlucidity.net> use memcpy
git-svn-id: svn://svn.berlios.de/openocd/trunk@1521 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-24 11:05:21 +00:00
oharboe
779c44125a Zach Welch <zw@superlucidity.net> do not pad TMS
git-svn-id: svn://svn.berlios.de/openocd/trunk@1509 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-22 13:54:04 +00:00
oharboe
f6fd9bc823 Zach Welch <zw@superlucidity.net> set speed in init
git-svn-id: svn://svn.berlios.de/openocd/trunk@1508 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-22 11:37:27 +00:00
oharboe
7395ca92d4 Zach Welch <zw@superlucidity.net> fix jlink reset
git-svn-id: svn://svn.berlios.de/openocd/trunk@1507 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-22 10:59:23 +00:00
kc8apf
2b90372b79 Shrink JLink buffer sizes to specified 2KB courtesy of Jeff Williams <jeffw@gadgetworks.com> and Zach Welch <zw@superlucidity.net>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1504 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-22 07:34:47 +00:00
kc8apf
f13f52d303 refactor jlink_execute_queue courtesy of Zach Welch <zw@superlucidity.net>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1500 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-22 06:55:34 +00:00
oharboe
66db8e7bb4 Zach Welch <zw@superlucidity.net> refactor
git-svn-id: svn://svn.berlios.de/openocd/trunk@1498 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-21 15:39:49 +00:00
oharboe
5b4679618a Zach Welch <zw@superlucidity.net> add --enable-verbose* options
git-svn-id: svn://svn.berlios.de/openocd/trunk@1495 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-21 11:37:15 +00:00
oharboe
48d9f3bbde Zach Welch <zw@superlucidity.net> fix jlink format warning
git-svn-id: svn://svn.berlios.de/openocd/trunk@1493 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-21 11:33:29 +00:00
oharboe
2c89a1ec5f Zach Welch <zw@superlucidity.net> factor jlink usb_bulk_*_ex functions
git-svn-id: svn://svn.berlios.de/openocd/trunk@1492 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-21 09:41:41 +00:00
oharboe
4f0bd8e8e1 Zach Welch <zw@superlucidity.net> fix -Wformat-security warnings (1 of 4)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1481 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-21 05:33:47 +00:00
oharboe
d2d75efb39 Zach Welch <zw@superlucidity.net> use static keyword in jtag layer and drivers
git-svn-id: svn://svn.berlios.de/openocd/trunk@1479 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-21 05:29:23 +00:00
oharboe
c401b8dd4f Nikolay Shadrin whoney at gmail.com, Zach Welch <zw@superlucidity.net> unstable USB J-Link in OpenOCD (revised patch provided)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1475 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-19 23:30:15 +00:00
mifi
7989000e09 Partially fix USBprog and JLink adapters on XScale target
Thanks to Peter Denison <openwrt(at)marshadder.org> 

git-svn-id: svn://svn.berlios.de/openocd/trunk@1471 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-19 19:15:09 +00:00
mifi
486799e65b Added functionality to support jtag_khz for the jlink.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1470 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-19 14:51:51 +00:00
mifi
0bba832713 The following patches was applied:
- 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
2009-04-18 10:08:13 +00:00