Commit Graph

48 Commits

Author SHA1 Message Date
Zachary T Welch 3a660e2293 add jtag/usb_common.[ch] files
Begins to consolidate code used by several USB JTAG interfaces.
This first patch provides the required build system changes and
a common jtag_usb_open routine, which will replace the guts for
probing the busses and devices for possible VID/PID matches.
The following patches convert each driver to use it.
2009-11-24 07:30:19 -08:00
Zachary T Welch cb7dbc1af4 split startup.tcl file across modules
Moves definitions for each layer into their own file, eliminating
layering violations in the built-in TCL code.  Updates src/Makefile.am
rules to include all files in the final startup.tcl input file, and
others Makefile.am rules to distribute the new files in our packages.
2009-11-18 07:21:42 -08:00
zwelch c2cecc74b0 Move JTAG interface list to new files.
- Adds new source files to encapsulate static/dynamic module handling.
- Further work should implement the jtag_interface_modules_load routine,
  to populate the jtag_interfaces list from shared libraries in a path.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2413 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-29 00:00:50 +00:00
oharboe 8d8937f1a6 dummy driver now works under eCos
git-svn-id: svn://svn.berlios.de/openocd/trunk@2268 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-17 10:51:34 +00:00
zwelch 82aa9af1ad Improve use of automake conditionals for FTDI-based JTAG drivers:
- Remove once-used XXX_FTD2XX symbols; replace with XXX_DRIVER symbols.
- Enabled when either libftdi or FTD2xx driver should be built.
- Eliminates redundant DRIVERSFILE assignment in JTAG automake input.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2177 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-09 14:18:28 +00:00
zwelch 0bc53e73cc Simplify JTAG automake input file:
- Consolidate all individual driver variables into DRIVERFILES.
  - Eliminates all empty 'else' conditional clauses.
- Move minidriver files to top of file.
- Use MINIDRIVER conditional to build only driver(s) that will be linked.
- Eliminate superfluous whitespace.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2176 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-09 14:18:23 +00:00
zwelch b8034bd9ee Rename jtag_driver.c as driver.c to remove duplicate name component.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2175 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-09 12:47:49 +00:00
zwelch 00228aa839 Fix make maintainer-clean for out-of-tree builds.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2172 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-09 10:28:16 +00:00
zwelch 66707c94d7 Split main jtag.c file into two layers:
- src/jtag/core.c: contains the low-level JTAG TAP and scanning routines.
- src/jtag/tcl.c: contains high-level JTAG TCL commands that use the core.
- Remove static keywords from routines in core.c, extern from tcl.c:
  - jtag, jtag_interface global variables
  - jtag_{examine,validate}_chain and jtag_tap_{init,free} functions
- Added myself to the copyright header in both of these files.
- Used 'svn cp' to add files, so versioning was preserved for both.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2149 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-09 04:15:13 +00:00
oharboe 3245a0cd5f update zy1000 to latest minidriver work
git-svn-id: svn://svn.berlios.de/openocd/trunk@2132 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 14:13:32 +00:00
zwelch 1419a72892 Move minidummy source file, as was supposed to happen in last commit.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2103 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 01:14:04 +00:00
zwelch f84c78a2e1 Finish off the dummy minidriver integration:
- Try to disambiguates minidriver options from "standard" driver options.
  - Make minidummy symbols more explict about being a minidriver.
  - Move minidummy.c into minidummy directory to put it with its header.

In configure.in:
- Improve configuration option to allow new minidriver implementations:
  - Change option from --enable-minidummy to --enable-minidriver-dummy.
  - Move it to the end of the list of options.
  - Provides a clear pattern for future minidrivers.
- Update handling of HAVE_JTAG_MINIDRIVER_H:
  - Check for external jtag_minidriver.h only with --enable-ecosboard.
  - Otherwise, define it when --enable-minidriver-dummy is provided.
- Add check to ensure only one minidriver is enabled.
- When a minidriver is enabled, warn user that standard drivers are not built.
- Use proper AC_DEFINE semantics with MINIDRIVER_DUMMY.

In src/jtag/Makefile.am:
- Restructure handling of minidummy source files.
- Include minidummy driver header in the distribution.

In src/jtag/jtag.c:
- Restructure preprocessor logic to include:
  - only one minidriver, or
  - all configured standard drivers.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2102 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 00:42:15 +00:00
oharboe 14d6605cc9 minidriver build test driver "minidriver"
git-svn-id: svn://svn.berlios.de/openocd/trunk@2092 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 13:55:29 +00:00
zwelch 80d66c9fcb Move JTAG command handling implementation into its own source file.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2030 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 07:06:37 +00:00
zwelch 4bc3af0374 Move JTAG command APIs into new jtag/commands.h header file.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2027 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 06:08:07 +00:00
zwelch 4ecf2c7dd8 Move the JTAG cable interface API implementation
- Cloned the src/jtag/jtag.c file to src/jtag/interface.c.
- For each for of those files, deleted the contents of the other.
- Add new source file to automake input.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2012 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 00:45:21 +00:00
zwelch def4ed3b2a Add private src/jtag/interface.h for use by JTAG interface drivers:
- Move the jtag_interface structure definition.
- Move the Cable API declarations.
- Add new header file to automake input.

The next patch will move the implementation to interface.c.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2008 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 23:59:13 +00:00
zwelch a546729609 Add header file for JTAG minidriver:
- Wraps all minidriver API functions using API front-ends:
  - Outlines jtag_add_dr_out() and jtag_alloc_in_value32().
  - Adds interface_ prefix to existing jtag_alloc_invalue_32 routines.
  - Re-inline these interface definitions in new header file.
- Re-inline parts of the (mini)driver implementations in minidriver.h.
- Replace INCLUDE_JTAG_MINIDRIVER_H with #include directives.

The next patch will finish removing '#ifdef HAVE_JTAG_MINIDRIVER_H'
from jtag.h.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2006 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 23:15:12 +00:00
zwelch 34b6fc3ce4 Only include jtag_driver.c in the build when minidriver is not in use.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2000 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 08:29:03 +00:00
zwelch a372074d21 Continue clean-up of JTAG driver interface:
- Move all interface_jtag_* functions to jtag_driver.c.
- Extern command queue routines in jtag.h (with INCLUDE_JTAG_INTERFACE_H).
- Add new source file to automake inputs.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1996 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 07:05:54 +00:00
zwelch e8e0af3956 Whitespace-only updates to automake input files:
- use continuations to break long lines of variable assignments
- makes these variables more patch-friendly and conform to style guide


git-svn-id: svn://svn.berlios.de/openocd/trunk@1970 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 12:10:57 +00:00
zwelch 647e61cc6d Extend autotools build to create shared library libopenocd with libtool:
- Add libtoolize step too bootstrap script; creates ltmain.sh script.
- Add AC_PROG_LIBTOOL to configure.in to add libtool support to build.
- Change Makefile.am library rules from static (_a) to libtool (_la).
- Install libopenocd.{la,so,a} in $(libdir); update openocd link rules.
- Extend MAINTAINERCLEANFILES in top-level Makefile.am to remove ltmain.sh.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1695 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-10 22:03:57 +00:00
zwelch 66add57aa5 Update autotools scripts to require automake 1.6. The configure.in script
already required autoconf 2.59 (circa 2006), so there is no reason to
support versions of automake older than 1.6 (circa 2002).

The first part of this patch upgrades the configure.in script:

     1. Use current calling conventions for the AC_INIT and
        AM_INIT_AUTOMAKE macros, bringing their usage up-to-date with
        the version of autoconf already specified by AC_PREREQ.
     2. Add AC_CONFIG_SRCDIR macro, required by new version of AC_INIT.
     3. Automatically enable all of automake's warnings except Makefile
        portability (which OpenOCD violates by using GNU make's $(wildcard)).
        [[ While automake has its own -Werror option, I did not enabled it
        due to existing warnings. ]]
     4. Add the missing AM_PROG_C_O check, required by the build rules for
        openocd.o in src/Makefile.am.
     5. Adjust version number to show progress toward the next release.
     6. Include a bug reporting e-mail address to direct users to this list.

This patch makes the following adjustments to the Makefile.am files:

     1. Update AUTOMAKE_OPTIONS to require automake version 1.6
     2. Rewrite all deprecated INCLUDES assignments as AM_CPPFLAGS
     3. Clean-up all AM_CPPFLAGS declarations to be patch-friendly.
     4. Remove vestigial references to $(all_includes)
     5. Remove erroneous references to @CPPFLAGS@ (only use AM_CPPFLAGS)
     6. Remove unused -I and -D directives in helper/, flash/, target/


git-svn-id: svn://svn.berlios.de/openocd/trunk@1591 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-02 22:35:02 +00:00
duane e211e4c6d2 Patch from Dimitar Dimitrov adding support for Olimex ARM-JTAG-EW
git-svn-id: svn://svn.berlios.de/openocd/trunk@1402 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-03-08 15:14:18 +00:00
kc8apf 93180753be Fix 'make maintainer-clean' courtesy of Zach Welch <zw@superlucidity.net>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1345 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-01-20 03:55:38 +00:00
ntfreak a021735db4 - add missing bitq and rlink files to distribution
git-svn-id: svn://svn.berlios.de/openocd/trunk@1331 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-01-16 10:48:55 +00:00
duane 21eff7095c Added dongle VSLLINK - from Simon Qian
git-svn-id: svn://svn.berlios.de/openocd/trunk@1280 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-27 02:56:55 +00:00
duane f7274784a2 Build Permutations with ftd2xx and libftdi addressed. Also added a new se of regression makefiles to build openocd in multiple ways
git-svn-id: svn://svn.berlios.de/openocd/trunk@1275 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-27 01:15:50 +00:00
kc8apf 063f4c182c - rlink interface support from Lou Deluxe <lou.openocd012@fixit.nospammail.net>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1258 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-19 04:25:22 +00:00
oharboe e127fb3a5a ZY1000 code
git-svn-id: svn://svn.berlios.de/openocd/trunk@1005 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-09-25 14:31:10 +00:00
oharboe 161deacc06 take path to eCos files from environment variable
git-svn-id: svn://svn.berlios.de/openocd/trunk@869 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-24 13:49:56 +00:00
oharboe c5b718f5e8 - retired variable stuff.
- drscan is now a low level tcl command:
 execute DR scan <device> <num_bits> <value> <num_bits1> <value2> 
- removed obsolete partial command text support

git-svn-id: svn://svn.berlios.de/openocd/trunk@791 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-11 12:17:56 +00:00
ntfreak 548bb19aa2 - added jlink support, based on Jürgen Stuber patch
git-svn-id: svn://svn.berlios.de/openocd/trunk@658 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-05-14 14:13:38 +00:00
oharboe 7280d4a2c7 A dummy driver to test codepath w/no contact w/target.
git-svn-id: svn://svn.berlios.de/openocd/trunk@572 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-13 13:21:49 +00:00
oharboe ff53e47b54 - fixes for jtag_khz committed.
- wip, flash fillw/h/b. For testing purposes.

git-svn-id: svn://svn.berlios.de/openocd/trunk@531 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-01 17:48:09 +00:00
oharboe 0313c59555 reduce compare noise. If someone should be crazy enough to try to run OpenOCD under eCos, then they'v got some hooks to point them in the general direction.
git-svn-id: svn://svn.berlios.de/openocd/trunk@499 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-11 21:32:03 +00:00
oharboe e6dac739cf - the jtag chain is examined and validated after GDB & telnet servers
are up and running. The examination and validation is actually
 "optional" from the point of view of GDB + telnet servers.
 Multiple targets should work fine with this.
- jtag_speed is dropped(divisor is increased), if jtag examination and
 validation fails.
- the chain is validated 10x to catch the worst jtag_speed offences
- added LOG_SILENT that can be used to shut up log. Feeble
 ersatz for try+catch.
- GDB register packets are now always replied in order to make sure
 that GDB connect works. If the target is not halted, then these
 packets contain dummy values.



git-svn-id: svn://svn.berlios.de/openocd/trunk@483 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-10 14:07:28 +00:00
mifi 1242505997 - removed "starting point" for ngw100, will add it again if it is working
git-svn-id: svn://svn.berlios.de/openocd/trunk@291 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-11 17:53:14 +00:00
mifi fdf58f74e0 - added starting point for development on a ngw100 eval board
git-svn-id: svn://svn.berlios.de/openocd/trunk@289 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-10 19:04:31 +00:00
drath 708535960c - corrected automake script
git-svn-id: svn://svn.berlios.de/openocd/trunk@195 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-08-14 10:05:40 +00:00
drath 29000b204d - reworked presto.c to allow use of either FTD2XX or libftdi (libftdi not functional yet). Configure option changed from --enable-presto to
--enable-presto_ftd2xx and --enable-presto_libftdi
- completed trace point support for use with ARM7/9 DCC
- completed debug message output with support for HEX dumps (1, 2 or 4 byte quantities)
- fixed bug in delete_debug_msg_receiver (thanks to Pavel Chromy)
- fixed bug in image_add_section (thanks to Pavel Chromy)
- at91sam7 sector erase reworked (thanks to Pavel Chromy)
- merge consecutive sections during flash image write to work around possible section alignment issues with LPC2000 targets



git-svn-id: svn://svn.berlios.de/openocd/trunk@194 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-08-14 09:48:54 +00:00
drath 1429d2c659 - added support for Asix Presto JTAG interface (thanks to Pavel Chromy and Asix for making this addition possible)
- added support for usbprog (thanks to Benedikt Sauter)
- make OpenOCD listen for WM_QUIT messages on windows (thanks to Pavel Chromy)
- register at_exit handler to do necessary unregistering (thanks to Pavel Chromy)
- added dummy ETM capture driver to allow ETM to be registered without a capture driver


git-svn-id: svn://svn.berlios.de/openocd/trunk@180 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-07-15 11:19:33 +00:00
drath a4f2e1eaac - disabled FT2232 debug output (that code should be fairly stable)
- fixed bug in jtag.c where JTAG command type was wrong for PATHMOVE commands
- added lattice ISP cable (experimental)
- properly initialize parallel port (clear tristate bit)
- fixed jtag/Makefile.am that failed with some versions of autotools
- print error number if read() in gdbserver.c failed on Windows
- fixed handling of opcodes with bits 27-25 b011 (comment was correct, code had a bug)
- added support for AT91SAM7SE internal flash


git-svn-id: svn://svn.berlios.de/openocd/trunk@122 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-01-09 17:19:41 +00:00
drath e9297b40b9 - added a PLD (programmable logic device) subsystem for FPGA, CPLD etc. configuration
- added support for loading .bit files into Xilinx Virtex-II devices
- added support for the Gateworks GW16012 JTAG dongle
- merged CFI fixes from XScale branch
- a few minor fixes


git-svn-id: svn://svn.berlios.de/openocd/trunk@116 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2006-11-22 13:03:10 +00:00
drath 3acb107b9a - endianess fixes everywhere but in the flash code. flashing might still be broken on big-endian targets and/or hosts
- added access to ARM920T vector catch register (via generic register mechanism)
- don't disable linefills on ARM920T cores - this lead to lockups when accessing lines already contained in cache
- read content of ARM920T cache and tlb into file (arm920t read_flash/read_mmu commands)
- memory reading improved on ARM7/9, can be further accelerated with new "arm7_9 fast_memory_access enable" command (renamed from fast_writes)
- made in_handler independent from in field (makes the handler more flexible)
- added timeout to ft2232 when using D2XX library
- fixed STR7x protection bit handling on second bank (thanks to Bernard)
- added support for using the OpenOCD on AT91RM9200 systems (thanks to Anders Larsen)
- fixed AT91SAM7 flash handling when not running from 32kHz clock (thanks to Anders Larsen)


git-svn-id: svn://svn.berlios.de/openocd/trunk@90 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2006-08-31 12:41:49 +00:00
drath ec0f06db11 - added support for FreeBSD ppi (parallel port access similar to /dev/parport on linux) (thanks to Darius for this patch)
- unified 'ftd2xx' and 'ftdi2232' into a single interface 'ft2232'. The library used to access the hardware is choosen during configure with --enable-ft2232_ftd2xx or --enable-ft2232-libftdi.


git-svn-id: svn://svn.berlios.de/openocd/trunk@83 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2006-08-11 17:49:41 +00:00
drath 82d2633b5f - Added support for native MinGW builds (thanks to Spencer Oliver and Michael Fischer) - you still need to install GiveIO (not part of OpenOCD)
- Added state-move support to ftd2xx and bitbang JTAG drivers (required for XScale, possibly useful for other targets, too)
- various fixes


git-svn-id: svn://svn.berlios.de/openocd/trunk@78 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2006-07-17 14:13:27 +00:00
drath 8b4e882a16 - prepare OpenOCD for branching, created ./trunk/
git-svn-id: svn://svn.berlios.de/openocd/trunk@64 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2006-06-02 10:36:31 +00:00