Commit Graph

969 Commits

Author SHA1 Message Date
Øyvind Harboe
559d08c19e jim tests: use installed
Delete obsolete jim that comes with OpenOCD.
2010-10-29 15:10:51 +02:00
Michal Demin
1ceb2c7e7a buspirate: change handling of communication speed setting + create serial port open function
Signed-off-by: Michal Demin <michaldemin@gmail.com>
2010-10-25 08:01:44 +02:00
Michal Demin
d4de14dafe buspirate: Serial port was not correctly closed.
Signed-off-by: Michal Demin <michaldemin@gmail.com>
2010-10-25 08:01:44 +02:00
David Brownell
3864da1ab8 add JLINK protocol doc ref
Provide URL for a recent
version of JLINK protocol.
Signed-Off-By: David Brownell <dbrownell@users.sourceforge.net>
2010-10-10 14:27:35 -07:00
Luca Bruno
fb7235f12a Update ep93xx and at91rm9200 drivers
ep93xx and at91rm9200 are conditionally built only on arm and were not
updated to reflect changes in command registration handler.
This patch makes them properly compile again, fixing a build failure
experienced on Debian armel.

Signed-off-by: Luca Bruno <lucab@debian.org>
Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
2010-09-30 18:14:36 -07:00
Øyvind Harboe
6468c593c7 zy1000: fix non-JTAG master build
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-26 20:38:29 +02:00
Øyvind Harboe
61780558e1 zy1000: add support for Linux host
used /dev/mem and mmem() to memory map JTAG registers
into user space and used new configure options to exclude
eCos specific code.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-20 20:45:16 +02:00
Øyvind Harboe
1dbb7ba472 zy1000: remove obsolete debug code
Obsolete code clutter

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-20 13:08:16 +02:00
Alexander Stein
a40f12d626 Remove duplicated initialization
I a mail conversation with Øyvind we stated that speed may not be set at
all on case CLOCK_MODE_KHZ and CLOCK_MODE_RCLK. Also there isn't proper
error propagation adapter_khz_to_speed or jtag_rclk_to_speed.
So jtag_get_speed may need some rewrite for error propagation.

CC: Øyvind Harboe <oyvind.harboe@zylin.com>
Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-08 10:34:43 +02:00
Øyvind Harboe
98a66c4809 warning: fix silly -O3 warning
Some versions of GCC don't pick up that local variables
are set in all code paths.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-07 18:39:04 +02:00
Øyvind Harboe
35af12d3e7 jtag: fix regression with dummy driver and when starting OpenOCD with target powered down
Do not fail startup if communication with target is
not possible.

OpenOCD supports launching without a target connected
or the target powered down.

The user will typically power up the target and issue
a "reset init" + load his application after OpenOCD
is started then.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-03 22:13:50 +02:00
David Brownell
6f84198841 bitq: unshadow pause()
bitq.c: In function ‘bitq_scan_field’:
bitq.c:224: error: declaration of ‘pause’ shadows a global declaration
/usr/include/unistd.h:429: error: shadowed declaration is here

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-08-27 15:16:39 -07:00
Catalin Patulea
bb88f3f470 Fix typo in usb_blaster_vid_pid error message 2010-08-14 07:59:41 +02:00
Piotr Esden-Tempski
dce422516a Added support for the Lisa/L jtag LEDs. 2010-08-13 09:52:35 +02:00
Piotr Esden-Tempski
c3ee26d272 Added support for Lisa/L builtin JTAG interface. 2010-08-13 09:52:27 +02:00
Thomas Koeller
07e0bd4685 jtag: fix handling of 'tap enable' error
if a tap could not be _enabled_, the error message was
'failed to disable tap'. Fixed that. Also, display the failing
tap's name.

Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
2010-08-12 08:59:05 +02:00
Øyvind Harboe
c49d4c9f7f zy1000: use correct base clock when calculating speed divisor
revc uses 60MHz and revb 64MHz, use this in calculations.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-02 22:22:03 +02:00
Øyvind Harboe
4e27305ed5 zy1000: print out khz correctly in response to setting JTAG speed
Calculate printout based on same core routines.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-02 22:22:02 +02:00
Øyvind Harboe
ab818f6898 jtag: measure_clk debug proc
It can be useful to get an approximate measurement of
rtck frequency for debugging purposes.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-02 11:15:21 +02:00
Øyvind Harboe
803351ec59 jtag: add jtag_flush_queue_sleep debug command
it can be useful to throttle performance: test
differences in behavior, test performance effect
of long roundtrips.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-02 09:54:06 +02:00
David Brownell
a463670c31 "transport select" returns Jim value
Make it scriptable, so code can be conditionalized based on
what transport is in use for the session.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-07-24 14:38:46 -04:00
Michal Demin
51d9b56861 Buspirate: fix shadow 2010-07-23 19:13:29 +02:00
David Brownell
612184176f more careful luminary init
Set up more of the Luminary-specific signals, and stop cloning
a few of the JTAG defaults.  More comments too.

Still leaves the "dap info 0" bugs unresolved (presumably coupled
to this particular adapter family) where TPIU, ITM, DWT, and other
debug modules wrongly display as extra NVICs.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-07-19 16:08:09 -04:00
David Brownell
d10f0def80 comments for Luminary ICDI layout
Provide $defines for more of the signals involved in the
Luminary ICDI hardware, and comment some of what's going on.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-07-18 17:29:25 -04:00
Øyvind Harboe
495ef923ef debug-feature: jtagtcpip, improve jtag performance
postpone callbacks until jtag execute queue time.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-18 16:33:02 +02:00
Øyvind Harboe
d16f9259c2 fix warnings
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-16 16:03:32 +02:00
Øyvind Harboe
9cbf0723d5 debug-feature: jtagtcpip, reduce performance impact of ping times
queue read back of data

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-16 16:03:25 +02:00
Øyvind Harboe
01b2a3091a debug feature: jtagtcpip, improve performance
waiting for ZY1000 fifo to idle is now queued as
an asynchronous command. This radically improves
performance when waitIdle() is interspersed with
writes as no readback is required over TCP/IP.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-16 12:18:59 +02:00
Øyvind Harboe
bb588bdaec debug feature: jtagtcpip, improved performance
only check error flag when rclk is actually enabled.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-16 12:18:35 +02:00
Spencer Oliver
f129ef67dc jtag: fix shadow issues in adapter_init
Use global jtag_only rather than local static.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-12 20:04:57 +01:00
Spencer Oliver
1c79432061 adapter.c: missing space in handle_interface_command
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-12 09:34:03 +01:00
David Brownell
e8445c9c9f transport selection tweaks
* Bugfix and simplify legacy jtag-only defaulting
* Make "dummy" declare its jtag-only nature
* likewise update ft2232
* warn if selection is _required_ (multi-transport adapters),

fixes the "only ft2232 works" bug for at least dummy, with
other drivers going the "legacy" path (submit patches).

Signed-off-by: David Brownell <db@helium.(none)>
2010-07-09 18:34:31 -04:00
Spencer Oliver
ac5ad4ad8d transport: fix bug/typo in transport_register cmd
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-09 22:02:52 +01:00
Øyvind Harboe
daa02f7d84 transport: fix segfault in transport select
String compare against addresses in range 0 or so due
to not checking if there was an active session first.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-07 17:33:04 +02:00
Øyvind Harboe
ccaa9edf29 transport: fix bug/typo in interface_transports command
Classic manifestation of weakness of dangling {
formatting :-) Hard to spot these sort of mistakes visually.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-07 15:09:13 +02:00
David Brownell
93f2afa45f initial "transport" framework
This adds the guts of a transport framework with initialization,
which should work with current JTAG-only configurations (tested
with FT2232).

Each debug adapter can declare the transports it supports, and
exactly one transport is initialized.  (with its commands) in
any given OpenOCD session.

  * Define a new "struct transport with init hooks and a few
 "transport"  subcommands to support it:

     "list" ... list the transports configured (just "jtag" for now)
     "select" ... makes the debug session use that transport
     "init" ... initializes the selected transport (internal)

  * "interface_transports" ... declares transports the current interface
    can support.  (Some will do this from C code instead, when there are
    no hardware versioning (or other) issues to prevent it.

Plus some FT2232 tweaks, including a few to streamline upcoming
support for an SWD transport (initially for Luminary adapters).

Eventually src/jtag should probably become src/transport, moving
jtag-specific stuff  to transport/jtag.

Signed-off-by: David Brownell <db@helium.(none)>
2010-07-02 16:45:28 -04:00
Spencer Oliver
deb176d335 ft2232: revert ft2232_read_scan changes
Revert change made in commit dd88b461da.
Caused segfaults when using ftdi driver under win32.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-02 17:00:57 +01:00
Spencer Oliver
f97b6b59ab ft2232: bugfix from previous commit
fix build error with commit dd88b461da

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-01 19:43:58 +01:00
Marc Pignat
dd88b461da ft2232: simplify ft2232_read_scan 2010-07-01 09:32:56 +02:00
Marc Pignat
cd7f443103 ft2232: cleanup ft2232_write
* Include the size check into ft2232_write, so calling it is simpler.
* Use sizeof(buffer) when possible
2010-07-01 09:32:48 +02:00
Øyvind Harboe
2fbb0b5972 jtag: retire jtag_get_error()
This fn is an implementation detail of jtag_execute_queue()
that is not to be exposed externally.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-06-21 13:43:36 +02:00
Andreas Fritiofson
acee9d1c65 arm-jtag-ew: -Wshadow fix
declaration of ‘index’ shadows a global declaration
in /usr/include/string.h

Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2010-06-19 11:37:20 +02:00
Freddie Chopin
ada8f5963d mingw32: -Wshadow fixes in arm-jtag-ew.c
(error: declaration of ‘stat’ shadows a global declaration; /usr/local/lib/gcc/i686-w64-mingw32/4.4.2/../../../../i686-w64-mingw32/include/sys/stat.h:279: error: shadowed declaration is here)

Signed-off-by: Freddie Chopin <freddie_chopin@op.pl>
2010-06-17 21:10:10 +02:00
Freddie Chopin
3eaab9b55b mingw32: -Wshadow fixes in rlink.c
(error: declaration of ‘byte’ shadows a global declaration; /usr/local/lib/gcc/i686-w64-mingw32/4.4.2/../../../../i686-w64-mingw32/include/rpcndr.h:50: error: shadowed declaration is here)

Signed-off-by: Freddie Chopin <freddie_chopin@op.pl>
2010-06-17 21:10:01 +02:00
Freddie Chopin
647fe050db rlink: -Wshadows fixes
(error: declaration of ‘pHDev’ shadows a global declaration; ../../../../src/jtag/drivers/rlink.c:102: error: shadowed declaration is here)

Signed-off-by: Freddie Chopin <freddie_chopin@op.pl>
2010-06-17 21:09:43 +02:00
Antonio Borneo
f2f798fdd3 jlink: fix -Wshadow warning
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-06-17 18:14:20 +02:00
Antonio Borneo
d4e4da0fa1 vsllink: fix -Wshadow warning
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-06-17 18:14:12 +02:00
Øyvind Harboe
80eb7e2a78 zy1000: fix arm11 optimisation
copy & paste error + added FIFO throttling to work around
lockup bug in FPGA.

The arm11 optimisation was introduced post v0.4.0, so this
is not a regression compared to previous release.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-06-17 12:17:12 +02:00
Øyvind Harboe
9161b5fc5c zy1000: -Wshadow warning fix
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-06-15 23:02:46 +02:00
Thomas Koeller
73aaaf4830 jtag: added mising header
Distributions created by 'make dist' were incomplete due to a
missing header file.

Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
2010-06-10 17:29:25 +02:00