openocd.git
13 years agohelper: add stacktrace command that returns error stacktrace
Øyvind Harboe [Sun, 12 Sep 2010 17:29:37 +0000 (19:29 +0200)]
helper: add stacktrace command that returns error stacktrace

Ability to access the stacktrace from a script is quite
handy.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agojim: fix crash when using Jim_ListInsertElements
Øyvind Harboe [Sun, 12 Sep 2010 18:16:55 +0000 (20:16 +0200)]
jim: fix crash when using Jim_ListInsertElements

Jim_ListInsertElements was simply forgotten from the
fn that registered all the APIs.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoversion command: make it scriptable
Øyvind Harboe [Fri, 10 Sep 2010 11:16:13 +0000 (13:16 +0200)]
version command: make it scriptable

you can now set a variable in a script like set version [version].

Also version takes an optional argument "git" to show git version
of source. If git is not installed during the build, then this
will yield an error that is ignored during the build and "version git"
returns an empty string.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agocommand: capture command now handles both types commands
Øyvind Harboe [Fri, 10 Sep 2010 17:28:11 +0000 (19:28 +0200)]
command: capture command now handles both types commands

Commands that output progress output and no return value
will have the progress output captured.

Commands that do not output progress output(tcl commands)
will return the tcl return value instead.

The advantage here is that it is no longer necessary to
consider which command one is capturing, it works for
either.

Example #1: capture progress output:

set foo [capture help]

Example #2: capture tcl return value

set foo [capture {set abc def}]

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agocfi: random crash in cfi_probe() fixed
Øyvind Harboe [Fri, 10 Sep 2010 08:22:14 +0000 (10:22 +0200)]
cfi: random crash in cfi_probe() fixed

for non_cfi cfi chips free() was invoked on rodata.

The mystery is why this bug has survived for so long.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agocfi: tighten up type usage a bit
Øyvind Harboe [Fri, 10 Sep 2010 08:20:06 +0000 (10:20 +0200)]
cfi: tighten up type usage a bit

sizeof() is a bit less scary than seing assumption
about size of type, no bug as such.

Use NULL instead of 0 for pointers. More obvious that
it is a pointer from code inspection.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoxscale: mark xscale registers invalid on debug entry
Mike Dunn [Thu, 9 Sep 2010 02:13:14 +0000 (19:13 -0700)]
xscale: mark xscale registers invalid on debug entry

Hi everyone,

This simple patch fixes a problem I noticed on the xscale where incorrect values
are sometimes reported by the reg command.  The problem can occur when
requesting the value of registers in the xscale-specific register cache.  With a
couple of exceptions, none of the registers in the xscale register cache are
automatically retrieved on debug entry.  This is probably fine, as they are
unlikely to be needed on a regular basis during a typical debug session, and
they can be retrieved when explicitly requested by name using the reg command.
The problem is that once this is done, the register remains marked as valid for
the remainder of the OpenOCD session, and the reg command will henceforth always
report the same value because it is obtained from the cache and is never again
retrieved from the debug handler on the target.

The fix is to mark all registers in the xscale register cache as invalid on
debug entry (before the two exceptions are retrieved), thus forcing retrieval
(when requested) from the target across resumptions in execution, and avoiding
the reporting of stale values.

Small addition change by Øyvind: change 'i' to unsigned to fix compiler
warning for xscale_debug_entry() fn.

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoRemove duplicated initialization
Alexander Stein [Wed, 8 Sep 2010 08:17:54 +0000 (10:17 +0200)]
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>
13 years agowarning: fix silly -O3 warning
Øyvind Harboe [Tue, 7 Sep 2010 16:38:06 +0000 (18:38 +0200)]
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>
13 years agojtag: fix regression with dummy driver and when starting OpenOCD with target powered...
Øyvind Harboe [Wed, 1 Sep 2010 21:36:31 +0000 (23:36 +0200)]
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>
13 years agoNumonyx M29W160ET patch
Wookey [Tue, 31 Aug 2010 12:53:50 +0000 (13:53 +0100)]
Numonyx M29W160ET patch

Someone called David Carne popped up on IRC and offered a fix (as he's not
on this list so can;t post here). I am just passing it on. (thanx David)

 10:54 < davidc__> Basically; the Numonyx M29W160ET has an incorrect CFI PRI
             block; it describes the erase blocks backwards
 10:54 < davidc__> the linked patch has a fixup for that part [really trivial]:

13 years agocortex m3: add cortex_m3 reset_config cmd
Spencer Oliver [Wed, 25 Aug 2010 19:29:22 +0000 (20:29 +0100)]
cortex m3: add cortex_m3 reset_config cmd

This new cmd adds the ability to choose the Cortex-M3
reset method used.
It defaults to using SRST for reset if available otherwise
it falls back to using NVIC VECTRESET. This is known to work
on all cores.

Move any luminary specific reset handling to the stellaris cfg file.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agoflash: increase stellaris flash loader buffer
Spencer Oliver [Tue, 24 Aug 2010 19:52:04 +0000 (20:52 +0100)]
flash: increase stellaris flash loader buffer

This speeds up programming for targets with more working area,

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agocfg: update Luminary config files
Spencer Oliver [Tue, 24 Aug 2010 19:50:20 +0000 (20:50 +0100)]
cfg: update Luminary config files

 - Update all Luminary config's to use a common target/stellaris.cfg.
 - Add Luminary ek-lm3s6965 config.
 - Increase working area for boards with more ram.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agobitq: unshadow pause()
David Brownell [Fri, 27 Aug 2010 22:16:39 +0000 (15:16 -0700)]
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>
13 years agoimx35pdk: fix clock and reset delays
Øyvind Harboe [Thu, 19 Aug 2010 14:06:45 +0000 (16:06 +0200)]
imx35pdk: fix clock and reset delays

Use rclk and 100ms delay on ntrst

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agomcb1700: Keil MCB1700 w/1768 config script
Øyvind Harboe [Tue, 17 Aug 2010 19:51:36 +0000 (21:51 +0200)]
mcb1700: Keil MCB1700 w/1768 config script

Ca. 93kBytes/s flashing speed @ 10MHz JTAG clock

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoupdate more Stellaris EK board comments
David Brownell [Mon, 16 Aug 2010 12:25:37 +0000 (08:25 -0400)]
update more Stellaris EK board comments

Using the bundled JTAG/SWD debug support in JTAG mode
is optional on *all* of the EK boards.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
13 years agotwo NEWS updates
David Brownell [Mon, 16 Aug 2010 05:11:39 +0000 (01:11 -0400)]
two NEWS updates

Mention AVR32 AP7000 support.
Clarify ARM semihosting update was for V7M (not ARM9 etc).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
13 years agoUpdate comments for some Stellaris EK boards.
David Brownell [Mon, 16 Aug 2010 04:36:52 +0000 (00:36 -0400)]
Update comments for some Stellaris EK boards.

These  don't need to use the on-board debuggers in JTAG mode.
Off-board is OK, as would be SWD mode.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
13 years agoavr32: basic target script
Oleksandr Tymoshenko [Sun, 15 Aug 2010 19:55:17 +0000 (21:55 +0200)]
avr32: basic target script

13 years agoat32ap7000 config file
David Brownell [Sun, 15 Aug 2010 19:54:01 +0000 (21:54 +0200)]
at32ap7000 config file

nice board to play with.

13 years agoavr32: work-in-progress
Oleksandr Tymoshenko [Sun, 15 Aug 2010 19:51:34 +0000 (21:51 +0200)]
avr32: work-in-progress

committed so as to ease cooperation and to let it be improved
over time.

So far it supports:
- halt/resume
- registers inspection
- memory inspection/modification

I'm still getting up to speed with OpenOCD internals and AVR32 so code is a little
bit messy and I'd appreciate any feedback.

13 years agoFix typo in usb_blaster_vid_pid error message
Catalin Patulea [Fri, 13 Aug 2010 22:41:18 +0000 (18:41 -0400)]
Fix typo in usb_blaster_vid_pid error message

13 years agoFix typo in documentation of usb_blaster_vid_pid command
Catalin Patulea [Fri, 13 Aug 2010 20:57:37 +0000 (16:57 -0400)]
Fix typo in documentation of usb_blaster_vid_pid command

13 years agolpc1768: turn down the jtag clock
Øyvind Harboe [Fri, 13 Aug 2010 10:59:36 +0000 (12:59 +0200)]
lpc1768: turn down the jtag clock

Tests should that it needs to be as low as 100kHz to be
stable.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoAdded support for the Lisa/L jtag LEDs.
Piotr Esden-Tempski [Wed, 4 Aug 2010 05:04:46 +0000 (22:04 -0700)]
Added support for the Lisa/L jtag LEDs.

13 years agoAdded Lisa/L script as a target board.
Piotr Esden-Tempski [Wed, 4 Aug 2010 04:00:09 +0000 (21:00 -0700)]
Added Lisa/L script as a target board.

13 years agoAdded support for Lisa/L builtin JTAG interface.
Piotr Esden-Tempski [Wed, 4 Aug 2010 03:58:29 +0000 (20:58 -0700)]
Added support for Lisa/L builtin JTAG interface.

13 years agoat91cap7a-stk-sdram.cfg: faster reset
Øyvind Harboe [Thu, 12 Aug 2010 13:01:23 +0000 (15:01 +0200)]
at91cap7a-stk-sdram.cfg: faster reset

crank up JTAG speed as soon as clocks are set up.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agojtag: fix handling of 'tap enable' error
Thomas Koeller [Tue, 10 Aug 2010 12:56:45 +0000 (14:56 +0200)]
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>
13 years agoDM36x: Set OSCDIV divider
Thomas Koeller [Tue, 10 Aug 2010 12:56:44 +0000 (14:56 +0200)]
DM36x: Set OSCDIV divider

The ability to set up the OSCDIV divider was missing.

Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
13 years agoDM36x: Disable unused SYSCLKs
Thomas Koeller [Tue, 10 Aug 2010 12:56:43 +0000 (14:56 +0200)]
DM36x: Disable unused SYSCLKs

Clear the enable bits for all clocks that are not set explicitly.
This is done to increase robustness by removing pre-existing
state.

Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
13 years agoDM36x: Use enable bit for PLL pre-divider
Thomas Koeller [Tue, 10 Aug 2010 12:56:42 +0000 (14:56 +0200)]
DM36x: Use enable bit for PLL pre-divider

The PLL pre- and postdividers seem to have enable bits, although
these are not mentioned in the chip documentation.

Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
13 years agostr9x: faster flash erase of entire chip
Fredrik Hederstierna [Thu, 12 Aug 2010 06:53:29 +0000 (08:53 +0200)]
str9x: faster flash erase of entire chip

The patch improves flash erase for STR9x in case of a full bank erase.
Then the chip erase command is used instead which improves speed significantly.

Also I think it might help if e.g. STR912 enters some state where flash banks are locked, and a chip erase command is the key for unlocking the flash.

13 years agotcl: remove silly ocd_ prefix to array2mem and mem2array
Øyvind Harboe [Wed, 11 Aug 2010 15:24:55 +0000 (17:24 +0200)]
tcl: remove silly ocd_ prefix to array2mem and mem2array

ocd_ prefix is used internally in OpenOCD as a kludge more
or less to deal with the two kinds of commands that OpenOCD
has.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoboard: added at91cap7a stk w/sdram config scripts
Øyvind Harboe [Wed, 11 Aug 2010 15:09:44 +0000 (17:09 +0200)]
board: added at91cap7a stk w/sdram config scripts

The strange thing here with this board is that 16MHz kinda
works, but only 2MHz is really stable.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agodebug: use assert's when approperiate
Øyvind Harboe [Wed, 11 Aug 2010 09:00:02 +0000 (11:00 +0200)]
debug: use assert's when approperiate

error was returned instead of using assert.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoarm: add missing error reporting
Øyvind Harboe [Wed, 11 Aug 2010 08:58:49 +0000 (10:58 +0200)]
arm: add missing error reporting

when an unknown core mode is read from the target,
report error. Can be communication failure.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoconfig scripts: remove useless reference to OpenOCD docs
Øyvind Harboe [Wed, 11 Aug 2010 08:53:54 +0000 (10:53 +0200)]
config scripts: remove useless reference to OpenOCD docs

clutters config scripts.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agocfg: add omapl138 support and da850evm preliminary support
Ben Gardiner [Mon, 9 Aug 2010 18:41:56 +0000 (14:41 -0400)]
cfg: add omapl138 support and da850evm preliminary support

This patch adds support for the omapl138 target and preliminary support for the da850evm. The
target cfg file is based on the icepick routing done by the target/ti_dm6446.cfg file.

I have performed limited testing with this setup. I am posting this patch in the interest of
sharing cfg files and in the hopes that the experts on this list can correct errors I have made or
point out enhancements.

The testing I have performed is debugging uboot with gdb where I also use the following local.cfg
and gdbinit files. Debugging appears to work in so much as 'ni' works.

local.cfg:
gdb_memory_map disable

gdbinit:
target remote localhost:3333
set remote hardware-breakpoint-limit 2
set remote hardware-watchpoint-limit 2
monitor poll on

Comments welcome.

Best Regards,
Ben Gardiner

13 years agoarm7/9: fix "reset run + halt"
Øyvind Harboe [Sun, 8 Aug 2010 17:21:04 +0000 (19:21 +0200)]
arm7/9: fix "reset run + halt"

if polling is off, then "reset run + halt" would fail
since halt incorrectly assumed the target was in the
reset state as it is the internal poll implementation
that moves the sw tracking of the target state out
of the reset state.

To reproduce:

> reset run; halt
JTAG tap: zy1000.cpu tap/device found: 0x1f0f0f0f (mfg: 0x787, part: 0xf0f0, ver: 0x1)
BUG: arm7/9 does not support halt during reset. This is handled in arm7_9_assert_reset()

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agotarget: if polling fails, back off
Øyvind Harboe [Sun, 8 Aug 2010 07:14:54 +0000 (09:14 +0200)]
target: if polling fails, back off

back-off algorithm for polling. Double polling
interval up to 5000ms when it fails.

when polling succeeds, reset backoff.

This avoids flooding logs(as much) when working
with conditions where the target polling will fail.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoLuminary-icdi comment update
David Brownell [Wed, 4 Aug 2010 01:29:05 +0000 (21:29 -0400)]
Luminary-icdi comment update

Clarify that ICDI is the generic logic, but this config is
for the JTAG-only (no-SWD) mode.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
13 years agoxscale documentation: vector table handling
Mike Dunn [Mon, 2 Aug 2010 19:50:29 +0000 (12:50 -0700)]
xscale documentation: vector table handling

Hi everyone.  I noticed some incorrect information in the user manual
regarding how the vector table is handled on the xscale, so for your
consideration, here's a short patch that corrects it, and adds a
little more detail I thought might be helpful.

The documentation states that OpenOCD does not attempt to synchronize
the vector tables in memory with those stored in the "mini instruction
cache".  In fact, on each resume it does copy from memory to the cache
all entries in the high and low tables that were not previously
defined using the 'xscale vector_table' command. (In
src/target/xscale.c, see xscale_update_vectors(), which is invoked by
xscale_resume().)  I take advantage of this during Linux boot-up.  The
extra detail describes in general terms how I do this.

Corrections, comments are of course gratefully received.

Thanks,
Mike

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
13 years agoverify_image: print out a statement that there are no further errors
Øyvind Harboe [Mon, 2 Aug 2010 14:55:46 +0000 (16:55 +0200)]
verify_image: print out a statement that there are no further errors

It is useful to know that the printed errors are *all* the
errors there were.

Added missing error handling(found by inspection).

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agozy1000: use correct base clock when calculating speed divisor
Øyvind Harboe [Mon, 2 Aug 2010 20:12:33 +0000 (22:12 +0200)]
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>
13 years agozy1000: print out khz correctly in response to setting JTAG speed
Øyvind Harboe [Mon, 2 Aug 2010 15:09:57 +0000 (17:09 +0200)]
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>
13 years agolpc1768: even if rclk "works", it isn't necessarily the correct clk
Øyvind Harboe [Mon, 2 Aug 2010 11:21:21 +0000 (13:21 +0200)]
lpc1768: even if rclk "works", it isn't necessarily the correct clk

rclk = 4MHz oon lpc1768, the correct JTAG clk is 666MHz(4MHz/6).

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoioutil: fix internal fn names
Øyvind Harboe [Mon, 2 Aug 2010 09:59:46 +0000 (11:59 +0200)]
ioutil: fix internal fn names

prefix w/ioutil_

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agojtag: measure_clk debug proc
Øyvind Harboe [Mon, 2 Aug 2010 09:15:21 +0000 (11:15 +0200)]
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>
13 years agojtag: add jtag_flush_queue_sleep debug command
Øyvind Harboe [Sat, 31 Jul 2010 19:45:56 +0000 (21:45 +0200)]
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>
13 years agoutil: ms command to calculate length of operations
Øyvind Harboe [Sun, 1 Aug 2010 07:35:58 +0000 (09:35 +0200)]
util: ms command to calculate length of operations

This can be used to calculate approximate RTCK frequency
for instance.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoSupport NGX Technologies product NGX ARM USB JTAG
Peter Stuge [Sun, 1 Aug 2010 01:26:48 +0000 (03:26 +0200)]
Support NGX Technologies product NGX ARM USB JTAG

This is a standard FT2232 device. More info at their web page:
http://shop.ngxtechnologies.com/product_info.php?cPath=26&products_id=30

13 years agoRemove srst_pulls_trst from LPC2148 target
Peter Stuge [Sun, 1 Aug 2010 01:26:47 +0000 (03:26 +0200)]
Remove srst_pulls_trst from LPC2148 target

srst_pulls_trst is only true on some (broken) LPC2148 boards, a fact
which is already documented in doc/openocd.texi, so it shouldn't be
set unconditionally in the target tcl.

This patch was needed to reflash when an Abort exception occured very
early after reset, before OpenOCD tried to halt the CPU.

13 years agostellaris flash comment update
David Brownell [Sun, 1 Aug 2010 06:27:14 +0000 (02:27 -0400)]
stellaris flash comment update

This flash driver works on more than just two chips.
(Though it does need work still, e.g. to protect more than 64K.
(On non-'3748-A0 chips where errata allow that.))

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
13 years agolpc7168: make flash available upon reset init
Øyvind Harboe [Fri, 30 Jul 2010 20:34:43 +0000 (22:34 +0200)]
lpc7168: make flash available upon reset init

set user mode to avoid ROM being mapped at address
0 rather than flash.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years ago"transport select" returns Jim value
David Brownell [Sat, 24 Jul 2010 18:38:46 +0000 (14:38 -0400)]
"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>
13 years agoBuspirate: fix shadow
Michal Demin [Sat, 10 Jul 2010 08:08:18 +0000 (10:08 +0200)]
Buspirate: fix shadow

13 years agodocs: removed unused cmd 'fast'
Spencer Oliver [Tue, 20 Jul 2010 09:46:54 +0000 (10:46 +0100)]
docs: removed unused cmd 'fast'

The cmd fast was removed in commit c0d14dc7f19d785702eee5f69de5b1a63902554b

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agoflash: remove algorithm exit_point address for supported targets
Spencer Oliver [Mon, 19 Jul 2010 19:33:04 +0000 (20:33 +0100)]
flash: remove algorithm exit_point address for supported targets

For the above targets the exit_point is
optional when used with run_algorithm, so remove it.

This makes updating the algorithm less error prone.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agomips32: exit_point optional for mips32_run_algorithm
Spencer Oliver [Mon, 19 Jul 2010 19:29:16 +0000 (20:29 +0100)]
mips32: exit_point optional for mips32_run_algorithm

As the mips32 uses instruction breakpoints for algorithms we do not really
need to check the pc on exit.

This now matches the behaviour of the arm codebase.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agoarmv7m: exit_point optional for armv7m_run_algorithm
Spencer Oliver [Mon, 19 Jul 2010 19:28:30 +0000 (20:28 +0100)]
armv7m: exit_point optional for armv7m_run_algorithm

As the armv7m uses instruction breakpoints for algorithms we do not really
need to check the pc on exit.

This now matches the behaviour of the arm4_5 codebase.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agoarmv4_5: add algorithms instruction breakpoint support
Spencer Oliver [Tue, 20 Jul 2010 08:02:10 +0000 (09:02 +0100)]
armv4_5: add algorithms instruction breakpoint support

Update the arm_checksum_memory and arm_blank_check_memory
algorithms to use a breakpoint instruction on v5 arch.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agoarm11 error propagation fixes
Øyvind Harboe [Tue, 20 Jul 2010 06:42:52 +0000 (08:42 +0200)]
arm11 error propagation fixes

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoarm_jtag_scann error propagation fixes
Øyvind Harboe [Tue, 20 Jul 2010 06:23:59 +0000 (08:23 +0200)]
arm_jtag_scann error propagation fixes

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoarm_dpm: error propagation fixes
Øyvind Harboe [Mon, 19 Jul 2010 12:49:41 +0000 (14:49 +0200)]
arm_dpm: error propagation fixes

found by inspection

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoadi_jtag_ error propagation
Øyvind Harboe [Mon, 19 Jul 2010 12:42:54 +0000 (14:42 +0200)]
adi_jtag_ error propagation

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoarm: error propagation of arm_jtag_set_instr
Øyvind Harboe [Mon, 19 Jul 2010 12:37:45 +0000 (14:37 +0200)]
arm: error propagation of arm_jtag_set_instr

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoarm_adi_v5: dap_run() error propagation
Øyvind Harboe [Mon, 19 Jul 2010 12:22:35 +0000 (14:22 +0200)]
arm_adi_v5: dap_run() error propagation

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoarm_adi_v5: mem_ap_write error propagation
Øyvind Harboe [Mon, 19 Jul 2010 12:03:33 +0000 (14:03 +0200)]
arm_adi_v5: mem_ap_write error propagation

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoarm_adi_v5: error propagation of mem_ap_read_atomic_u32 failure
Øyvind Harboe [Mon, 19 Jul 2010 11:56:59 +0000 (13:56 +0200)]
arm_adi_v5: error propagation of mem_ap_read_atomic_u32 failure

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agomem_ap_read_u32 error propagation
Øyvind Harboe [Mon, 19 Jul 2010 11:50:28 +0000 (13:50 +0200)]
mem_ap_read_u32 error propagation

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoarm_adi_v5: add error propagation for dap_setup_accessport
Øyvind Harboe [Mon, 19 Jul 2010 11:45:53 +0000 (13:45 +0200)]
arm_adi_v5: add error propagation for dap_setup_accessport

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agodebug: debug entry error propagation
Øyvind Harboe [Mon, 19 Jul 2010 10:34:54 +0000 (12:34 +0200)]
debug: debug entry error propagation

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agocortex a8: added timeout handling
Øyvind Harboe [Mon, 19 Jul 2010 10:17:11 +0000 (12:17 +0200)]
cortex a8: added timeout handling

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoarm: add error propagation for enable/disable mmu caches
Øyvind Harboe [Mon, 19 Jul 2010 08:58:07 +0000 (10:58 +0200)]
arm: add error propagation for enable/disable mmu caches

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoarm: add error propagation to generic get_ttb fn
Øyvind Harboe [Mon, 19 Jul 2010 06:45:45 +0000 (08:45 +0200)]
arm: add error propagation to generic get_ttb fn

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agomore careful luminary init
David Brownell [Mon, 19 Jul 2010 20:08:09 +0000 (16:08 -0400)]
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>
13 years agocfg: add Amontec JTAGkey2p interface config (Issue #26)
Spencer Oliver [Mon, 19 Jul 2010 16:31:38 +0000 (17:31 +0100)]
cfg: add Amontec JTAGkey2p interface config (Issue #26)

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agoflash: add nuc910 nand driver
Spencer Oliver [Mon, 19 Jul 2010 11:22:18 +0000 (12:22 +0100)]
flash: add nuc910 nand driver

This adds a nand driver support for the nuc910 target.
Note that ECC is not currently supported by this driver, although
it is supported by the peripheral.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agonand: nand probe also outputs manufacturer
Spencer Oliver [Fri, 16 Jul 2010 16:01:32 +0000 (17:01 +0100)]
nand: nand probe also outputs manufacturer

The nand probe now outputs the manufacturer if found.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agocfg: update rsc-w910 script
Spencer Oliver [Fri, 16 Jul 2010 15:59:35 +0000 (16:59 +0100)]
cfg: update rsc-w910 script

 - Only enable the FMI (NAND) and DMA clocks.
 - Select NAND interface on the MFSEL.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agodocs: missing parameter from nand check_bad_blocks
Spencer Oliver [Fri, 16 Jul 2010 15:56:41 +0000 (16:56 +0100)]
docs: missing parameter from nand check_bad_blocks

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agocortex a8: lots of error propagation fixes
Øyvind Harboe [Sun, 18 Jul 2010 21:30:31 +0000 (23:30 +0200)]
cortex a8: lots of error propagation fixes

found by code inspection

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agocortex a8: mem_ap_read_buf_u32() error handling
Øyvind Harboe [Sun, 18 Jul 2010 21:12:25 +0000 (23:12 +0200)]
cortex a8: mem_ap_read_buf_u32() error handling

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agocortex a8: add missing error handling for cortex_a8_dap_write/read_coreregister_u32()
Øyvind Harboe [Sun, 18 Jul 2010 21:10:50 +0000 (23:10 +0200)]
cortex a8: add missing error handling for cortex_a8_dap_write/read_coreregister_u32()

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agocortex a8: add missing error handling from cortex_a8_exec_opcode()
Øyvind Harboe [Sun, 18 Jul 2010 21:08:26 +0000 (23:08 +0200)]
cortex a8: add missing error handling from cortex_a8_exec_opcode()

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agocortex a8: add missing error handling for mem_ap_atomic_write_u32()
Øyvind Harboe [Sun, 18 Jul 2010 21:03:05 +0000 (23:03 +0200)]
cortex a8: add missing error handling for mem_ap_atomic_write_u32()

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agocortex a8: add missing error handling for mem_ap_read_atomic_u32()
Øyvind Harboe [Sun, 18 Jul 2010 21:01:16 +0000 (23:01 +0200)]
cortex a8: add missing error handling for mem_ap_read_atomic_u32()

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agocomments for Luminary ICDI layout
David Brownell [Sun, 18 Jul 2010 21:29:25 +0000 (17:29 -0400)]
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>
13 years agospelling fixes in comments
Øyvind Harboe [Sun, 18 Jul 2010 20:56:01 +0000 (22:56 +0200)]
spelling fixes in comments

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agodebug-feature: jtagtcpip, improve jtag performance
Øyvind Harboe [Sat, 17 Jul 2010 20:22:21 +0000 (22:22 +0200)]
debug-feature: jtagtcpip, improve jtag performance

postpone callbacks until jtag execute queue time.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agolm3s811-ek uses generic stellaris target config
David Brownell [Sat, 17 Jul 2010 06:59:23 +0000 (02:59 -0400)]
lm3s811-ek uses generic stellaris target config

There's no point in an lm3s811-specific target file,
so remove it in favor of the generic "stellaris.cfg".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
13 years agoARM ADI-V5: cleanup CID/PID addressing
David Brownell [Fri, 16 Jul 2010 23:22:15 +0000 (19:22 -0400)]
ARM ADI-V5: cleanup CID/PID addressing

Use addition for offsetting, not masking.  Shorten some lines.
Make "component_start" print-only (unused otherwise; don't save).

Still doesn't resolve the issue where multiple components
are wrongly displaying as NVICs on some Cortex-M3 parts because
many PIDs appear to be zeroes ... maybe adapter related??

Signed-off-by: David Brownell <db@helium.(none)>
13 years agoflash: use bkpt for str9 flash algo algorithm
Spencer Oliver [Fri, 16 Jul 2010 21:52:49 +0000 (22:52 +0100)]
flash: use bkpt for str9 flash algo algorithm

STR9 is ARMv5 arch so use bkpt instruction rather than
waste a breakpoint.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agofix warnings
Øyvind Harboe [Fri, 16 Jul 2010 14:02:42 +0000 (16:02 +0200)]
fix warnings

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agodebug-feature: jtagtcpip, reduce performance impact of ping times
Øyvind Harboe [Fri, 16 Jul 2010 13:44:12 +0000 (15:44 +0200)]
debug-feature: jtagtcpip, reduce performance impact of ping times

queue read back of data

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agodebug feature: jtagtcpip, improve performance
Øyvind Harboe [Fri, 16 Jul 2010 08:57:28 +0000 (10:57 +0200)]
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>
13 years agodebug feature: jtagtcpip, improved performance
Øyvind Harboe [Fri, 16 Jul 2010 08:51:14 +0000 (10:51 +0200)]
debug feature: jtagtcpip, improved performance

only check error flag when rclk is actually enabled.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)