Commit Graph

110 Commits

Author SHA1 Message Date
dbrownell
7035b37e71 Remove much #ifdeffery around _DEBUG_JTAG_IO_ usage.
Have DEBUG_JTAG_IO() always trigger necessary warnings.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2822 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-10-07 17:30:51 +00:00
oharboe
e3a0647558 if srst pulls trst, then set state to TAP_RESET.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2767 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-28 12:22:20 +00:00
dbrownell
817ea3f4e4 Update FT2232 driver so that it reliably enters TAP_RESET.
When the OpenOCD server starts up it records its state as TAP_RESET,
even though it could be anything.  Then when it starts to examine
the scan chain, it calls jtag_add_tlr() which sees it doesn't have
any work to do, and so it does nothing.  This can make the next
operations fail because they start from the wrong TAP state...

Instead of caring about the current recorded state, always enter
TAP_RESET by forcing five clocks with TMS high.

(NOTE:  it seems most other JTAG adapter drivers have this same bug.)


git-svn-id: svn://svn.berlios.de/openocd/trunk@2763 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-27 16:55:52 +00:00
dbrownell
3e87fc20ab Style cleanup for the updated ft2232_add_pathmove().
Indentation, whitespace, line lengths.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2731 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-19 06:54:01 +00:00
oharboe
84f51bf50c michal smulski <michal.smulski@ooma.com> fix regression in jtag_add_pathmove() which broke arm11 in r1825. Other uses of jtag_add_pathmove are svn + xsvf + xscale...
git-svn-id: svn://svn.berlios.de/openocd/trunk@2722 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-17 12:25:53 +00:00
ntfreak
ef30f22fd3 - remove enable-ft2232-highspeed configure option, high speed ftdi support is now detected during the configure stage
- warning now issued if high speed ftdi device found and openocd was built using an old driver

git-svn-id: svn://svn.berlios.de/openocd/trunk@2599 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-08-20 07:54:49 +00:00
ntfreak
c2f593bdc1 Jonas Horberg [jhorberg@sauer-danfoss.com]:
Fix small typo in ftd2xx type detection

git-svn-id: svn://svn.berlios.de/openocd/trunk@2597 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-08-19 08:39:06 +00:00
ntfreak
a634b5d52e Jonas Horberg [jhorberg@sauer-danfoss.com]
https://lists.berlios.de/pipermail/openocd-development/2009-August/009939.html

1. It can only be built with the FTD2XX driver. libftdi supports FT2232H/FT4232H 
since version 0.16 

2. A speed value of 0 is used as a RTCK request indicator. This clashes with the 
valid clock division value 0 that provide the highest fixed clock frequency. 

3. The ft2232_speed_div function return the maximum selectable frequency (30MHz) 
when RTCK is activated. It should return 0. 

4. The ft2232_khz function return ERROR_OK when RTCK is requested even for 
devices lacking RTCK support. It should return ERROR_FAIL so the upper driver layers 
can detect this and try to fallback to a fixed frequency. 

5. FT2232H/FT4232H have a backward compatibility function that divide the clock 
by 5 to get the same frequency range as FT2232D. There is no code that disable 
this functionality. I can not find anything about if this is enabled or disabled by default. 
I think it is safest to actively disable it. 


git-svn-id: svn://svn.berlios.de/openocd/trunk@2591 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-08-18 14:41:58 +00:00
zwelch
a239d6b334 Fix FTD2XX build for CygWin.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2454 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-07-02 11:16:57 +00:00
zwelch
f130f95d45 Marcel Jost <marcel.jost@bfh.ch>:
This patch adds support for the Luminary Micro LM3S9B90 target and
LM3S9B92 Evaluation Kit.  These kits include a new ft2232 adapter, the
Luminary In-Circuit Debug Interface (ICDI) Board, so this is added as a
new ft2232 layout called "luminary_icdi".


git-svn-id: svn://svn.berlios.de/openocd/trunk@2429 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-30 09:09:30 +00:00
zwelch
c97caebccd Remove whitespace at end of lines, step 2.
- Replace '\s*$' with ''.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2380 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:50:08 +00:00
zwelch
dc575dc5bf Remove whitespace that occurs before ')'.
- Replace '[ \t]*[)]' with ')'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2377 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:47:42 +00:00
zwelch
f90d8fa45f Remove whitespace that occurs after '('.
- Replace '([ \t]*' with '('.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2376 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:46:23 +00:00
zwelch
6d1d58a1fc - 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@2375 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:45:47 +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
aea6815462 - 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@2370 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:41:13 +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
f876d5e9c7 Transform 'u16' to 'uint16_t'
- Replace '\([^_]\)u16' with '\1uint16_t'.
- Replace '^u16' with 'uint16_t'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2277 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18 07:07:59 +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
ea95cdb8e2 Improve VID/PID command argument handling in FTDI driver:
- Bug fix: Return a syntax error when less than two arguments are given.
- Bug fix: Use parse_u16 helper to ensure vales are parsed properly.
- Simplify loop termination logic by ensuring argc is always even.
- Move loop induction variable declaration to where it is used.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2215 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-12 01:40:48 +00:00
zwelch
6dc2c2ce97 Encapsulate jtag_reset_config using accessors:
- Update handle_reset_config_command in tcl.c to use new helpers.
- Replace direct accesses in JTAG interface and target drivers.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2161 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-09 08:40:31 +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
e7d6306b23 David Brownell <david-b@pacbell.net>:
Remove pernicious whitespace from ft2232 driver; as usual,
end-of-line noise, but here also much line-internal stuff.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2038 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 01:17:27 +00:00
zwelch
ec2bc2259c David Brownell <david-b@pacbell.net>:
Minor cleanup of FT2232:
  - make Olimex glue warn about Olimex issues instead of JTAGkey issues;
  - make some data static+const;
  - don't export some internal symbols.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2037 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 01:16:43 +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
9a5acdc161 Improve in-source documentation that was causing Doxygen warnings.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2025 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 04:37:51 +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
zwelch
6625e926fd Add high-speed device support in FT2232 driver:
- Initial support for FT2232H/FT4232H devices from FTDI.
- Add --enable-ftd2xx-highspeed option to configure script.
- Original patch submitted by Joern Kaipf <lists@joernline.de>.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1998 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 07:51:16 +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
oharboe
9557d8a9b1 remove unused JTAG_END_STATE part 2
git-svn-id: svn://svn.berlios.de/openocd/trunk@1950 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-30 11:55:14 +00:00
ntfreak
ff2737b429 - add support for cortino jtag interface
git-svn-id: svn://svn.berlios.de/openocd/trunk@1925 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-27 11:58:19 +00:00
zwelch
ad8f1b4295 David Brownell <david-b@pacbell.net>:
Doc (mostly) update for jtag_khz:
 - switch to @deffn syntax
 - add entry for "jtag_rclk"
 - move deprecated "jtag_speed" into collection of deprecated calls

And for ft2232, don't be the only adapter to *log* an error if RTCK
is requested; it's already reported properly, like any other nonfatal
command parameter.  "jtag_rclk" just works as expected, without any
scarey messages.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1910 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-24 21:13:29 +00:00
zwelch
ce55905fb7 Submitted by Magnus Lundin <lundin@mlu.mine.nu>:
- Remove FTDI driver tap_set_state call; performed by jtag_add_reset.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1893 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-23 20:52:18 +00:00
kc8apf
869ef01f3c Author: Holger Schurig <hs4233@mail.mn-solutions.de>
-Prevent freezing of target when doing a 'shutdown'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1869 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-21 05:07:06 +00:00
kc8apf
9a990a3591 FT2232 support for non-7-cycle state moves by Dick Hollenbeck <dick@softplc.com>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1825 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 17:41:27 +00:00
kc8apf
9b4295b059 ftdi_set_interface correctness by Strontium <strntydog@gmail.com>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1814 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 17:23:52 +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
265b0a9fca Fix ft2232 for CygWin, provided by Michael Bruck <mbruck@digenius.de>.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1734 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11 08:26:42 +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
zwelch
850121f255 Michael Bruck <mbruck@digenius.de>: sys/select.h must preceed windows.h.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1573 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-30 00:59:46 +00:00
zwelch
3368bb5a81 Sten <debian@sansys-electronic.com>: add support for ICEbear FDTI-based interface.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1565 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-29 07:38:35 +00:00
mlu
39f76220a8 Corrected statement order
git-svn-id: svn://svn.berlios.de/openocd/trunk@1528 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-25 02:53:07 +00:00
mlu
773ebb6bba Fix ft2232 TX buffer overflow
git-svn-id: svn://svn.berlios.de/openocd/trunk@1527 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-25 00:58:49 +00:00
mlu
4b9f6fcdb7 Break ft2232_execute_quie into smaller functions, follows restructure of jlink.c
git-svn-id: svn://svn.berlios.de/openocd/trunk@1526 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-25 00:54:21 +00:00
oharboe
97a5e7a608 Zach Welch <zw@superlucidity.net> fix ft2232 usb io format warning
git-svn-id: svn://svn.berlios.de/openocd/trunk@1497 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-21 12:10:29 +00:00