openocd.git
9 years agovector_catch and watchpoint TODO items.
Øyvind Harboe [Sat, 24 Oct 2009 11:06:13 +0000 (13:06 +0200)]
vector_catch and watchpoint TODO items.

9 years agoarm9tdmi vector_catch: reserved means "don't use"
David Brownell [Fri, 23 Oct 2009 19:28:03 +0000 (12:28 -0700)]
arm9tdmi vector_catch:  reserved means "don't use"

Bit 5 shouldn't be used.  Remove all support for modifying it.
Matches the exception vector table, of course ... more than one
bootloader uses that non-vector to help distinguish valid boot
images from random garbage in flash.

9 years agoImprove help for arm9 vector_catch.
Øyvind Harboe [Fri, 23 Oct 2009 14:02:42 +0000 (16:02 +0200)]
Improve help for arm9 vector_catch.

9 years agoRemove debug output that could cause compile warnings.
Øyvind Harboe [Fri, 23 Oct 2009 11:09:16 +0000 (13:09 +0200)]
Remove debug output that could cause compile warnings.

9 years agomcr/mrc interface work. Implemented for arm926ejs and arm720t. mcr/mrc commands added.
Øyvind Harboe [Fri, 23 Oct 2009 10:38:19 +0000 (12:38 +0200)]
mcr/mrc interface work. Implemented for arm926ejs and arm720t. mcr/mrc commands added.

9 years agoEmbedded ICE version is now dumped with debug_level 1
Øyvind Harboe [Fri, 23 Oct 2009 07:54:43 +0000 (09:54 +0200)]
Embedded ICE version is now dumped with debug_level 1

9 years agojtag: clean up TAP state name handling
David Brownell [Fri, 23 Oct 2009 08:02:22 +0000 (01:02 -0700)]
jtag: clean up TAP state name handling

Some cosmetic cleanup, and switch to a single table mapping
between state names and symbols (vs two routines which only
share that state with difficulty).

Get rid of TAP_NUM_STATES, and some related knowledge about
how TAP numbers are assigned.  Later on, this will help us
get rid of more such hardwired knowlege.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
9 years agoSVF: clean up, mostly for TAP state name handling
David Brownell [Fri, 23 Oct 2009 08:00:32 +0000 (01:00 -0700)]
SVF: clean up, mostly for TAP state name handling

 - Use the name mappings all the other code uses:
    + name-to-state ... needed to add one special case
    + state-to-name
 - Improve various diagnostics:
    + don't complain about a "valid" state when the issue
      is actually that it must be "stable"
    + say which command was affected
 - Misc:
    + make more private data and code be static
    + use public DIM() not private dimof()
    + shorten the affected lines

Re the mappings, this means we're more generous in inputs we
accept, since case won't matter.  Also our output diagnostics
will be a smidgeon more informative, saying "RUN/IDLE" not
just "IDLE" (emphasizing that there can be side effects).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
9 years agoFerocion: fix corruption of r0 when resuming Thumb mode
Nicolas Pitre [Fri, 23 Oct 2009 03:23:44 +0000 (23:23 -0400)]
Ferocion: fix corruption of r0 when resuming Thumb mode

The wrong variable (pc instead of r0) was used.  Furthermore, someone
did cover this error by stupidly silencing the compiler warning that
occurred before a dummy void reference to r0 was added to the code.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
9 years agohave "reg" command print cache names too
David Brownell [Thu, 22 Oct 2009 19:05:04 +0000 (12:05 -0700)]
have "reg" command print cache names too

When dumping over 100 registers (as on most ARM9 + ETM cores),
aid readability by splitting them into logical groups.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
9 years agoETM: rename registers, doc tweaks
David Brownell [Thu, 22 Oct 2009 19:01:27 +0000 (12:01 -0700)]
ETM: rename registers, doc tweaks

The register names are perversely not documented as zero-indexed,
so rename them to match that convention.  Also switch to lowercase
suffixes and infix numbering, matching ETB and EmbeddedICE usage.

Update docs to be a bit more accurate, especially regarding what
the "trigger" event can cause; and to split the issues into a few
more paragraphs, for clarity.

Make "configure" helptext point out that "oocd_trace" is prototype
hardware, not anything "real".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
9 years agodisable ZY1000's UART forwarding test code.
Øyvind Harboe [Thu, 22 Oct 2009 08:22:34 +0000 (10:22 +0200)]
disable ZY1000's UART forwarding test code.

9 years agomww_phys retired. Replaced by generic mww phys in target.c
Øyvind Harboe [Wed, 21 Oct 2009 18:19:47 +0000 (20:19 +0200)]
mww_phys retired. Replaced by generic mww phys in target.c

9 years agovirt2phys is now implemented by target.c globally, retire target specific documentation.
Øyvind Harboe [Wed, 21 Oct 2009 18:16:31 +0000 (20:16 +0200)]
virt2phys is now implemented by target.c globally, retire target specific documentation.

9 years agoretire obsolete mXY_phys commands. Handled by generic memory read/modify commands...
Øyvind Harboe [Wed, 21 Oct 2009 13:36:31 +0000 (15:36 +0200)]
retire obsolete mXY_phys commands. Handled by generic memory read/modify commands and target read/write physical memory callbacks.

9 years agoread/write physical target fn's
Øyvind Harboe [Wed, 21 Oct 2009 13:32:29 +0000 (15:32 +0200)]
read/write physical target fn's

9 years agoadd support for target_read/write_phys_memory callbacks.
Øyvind Harboe [Wed, 21 Oct 2009 12:46:12 +0000 (14:46 +0200)]
add support for target_read/write_phys_memory callbacks.

9 years agoAdded target_read/write_phys_memory() fn's. mdX/mwX commands updated to support phys...
Øyvind Harboe [Wed, 21 Oct 2009 12:45:39 +0000 (14:45 +0200)]
Added target_read/write_phys_memory() fn's. mdX/mwX commands updated to support phys flag to specify bypassing of MMU.

9 years agoMerge branch 'master' of ssh://gowinex@openocd.git.sourceforge.net/gitroot/openocd...
Øyvind Harboe [Wed, 21 Oct 2009 11:20:29 +0000 (13:20 +0200)]
Merge branch 'master' of ssh://gowinex@openocd.git.sourceforge.net/gitroot/openocd/openocd into HEAD

9 years agoRetire obsolete and superfluous implementations of virt2phys in each target. This...
Øyvind Harboe [Wed, 21 Oct 2009 11:10:32 +0000 (13:10 +0200)]
Retire obsolete and superfluous implementations of virt2phys in each target. This is done in a polymorphic implementation in target.c

9 years agoRetire obsolete and superfluous implementations of virt2phys in each target. This...
Øyvind Harboe [Wed, 21 Oct 2009 11:10:32 +0000 (13:10 +0200)]
Retire obsolete and superfluous implementations of virt2phys in each target. This is done in a polymorphic implementation in target.c

9 years agoFirst cut at implementing software breakpoints for mmu read only memory
Øyvind Harboe [Wed, 21 Oct 2009 11:07:44 +0000 (13:07 +0200)]
First cut at implementing software breakpoints for mmu read only memory

9 years agoDefined target_write_memory() to be able to handle implementing breakpoints for read...
Øyvind Harboe [Wed, 21 Oct 2009 10:54:41 +0000 (12:54 +0200)]
Defined target_write_memory() to be able to handle implementing breakpoints for read only ram(e.g. MMU write protected.

9 years agoeCos synthetic target updates.
Øyvind Harboe [Wed, 21 Oct 2009 10:02:04 +0000 (12:02 +0200)]
eCos synthetic target updates.

9 years agoXSVF: use svf_add_statemove()
David Brownell [Wed, 21 Oct 2009 03:04:36 +0000 (20:04 -0700)]
XSVF: use svf_add_statemove()

XSVF improvements:

 - Layer parts of XSVF directly over SVF, calling svf_add_statemove()
   instead of expecting jtag_add_statemove() to conform to the SVF/XSVF
   requirements (which it doesn't).

   This should improve XSTATE handling a lot; it removes most users of
   jtag_add_statemove(), and the comments about how it should really do
   what svf_add_statemove() does.

 - Update XSTATE logic to be a closer match to the XSVF spec.  The main
   open issue here is (still) that this implementation doesn't know how
   to build and submit paths from single-state transitions ... but now
   it will report that error case.

 - Update the User's Guide to mention the two utility scripts for
   working with XSVF, and to mention the five extension opcodes.

Handling of state transition paths is, overall, still a mess.  I think
they should all be specified as paths not unlike SVF uses, and compiled
to the bitstrings later ... so that we can actually make sense of the
paths.  (And see the extra clocks, detours through RUN, etc.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
9 years agoRemoved unused interface_jtag_set_end_state and wrote down some notes on TCP/IP clien...
Øyvind Harboe [Tue, 20 Oct 2009 13:54:53 +0000 (15:54 +0200)]
Removed unused interface_jtag_set_end_state and wrote down some notes on TCP/IP client/server scheme.

9 years agoAdded the faux flash driver and target. Used for testing.
Øyvind Harboe [Tue, 20 Oct 2009 10:22:55 +0000 (12:22 +0200)]
Added the faux flash driver and target. Used for testing.

9 years agoAdded 'unlock' option to flash write_image
Øyvind Harboe [Tue, 20 Oct 2009 10:03:36 +0000 (12:03 +0200)]
Added 'unlock' option to flash write_image

9 years agoMore svn to git version string fixes.
Øyvind Harboe [Tue, 20 Oct 2009 07:46:23 +0000 (09:46 +0200)]
More svn to git version string fixes.

9 years agoSVF: better spec conformance for STATE switch
David Brownell [Tue, 20 Oct 2009 06:33:08 +0000 (23:33 -0700)]
SVF: better spec conformance for STATE switch

Don't add extra TCK in current state; exit from RESET had four extras.
Only IDLE --> IDLE needs such an extra clock.  (At least one TCK must
be issued.)

Allow entry to RESET; SVF allows it, so must we (despite those entries
being commented out of the statemove table).

When entering RESET, always use TLR ... we might end up with extra clocks
in reset that way, which is harmless, but we'll never end up in any other
state than RESET, which is useful paranoia.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
9 years agodavinci: add watchdog reset method
David Brownell [Tue, 20 Oct 2009 05:50:51 +0000 (22:50 -0700)]
davinci: add watchdog reset method

Lightly tested on dm365.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
9 years agojtag_add_statemove() always uses TLR to get to RESET
David Brownell [Tue, 20 Oct 2009 05:50:51 +0000 (22:50 -0700)]
jtag_add_statemove() always uses TLR to get to RESET

As decided a while back, this isn't a transition we want to chance.
Whenever someone wants to got to RESET, force it.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
9 years agoSVF/XSVF: comment and whitespace fixes
David Brownell [Tue, 20 Oct 2009 05:50:51 +0000 (22:50 -0700)]
SVF/XSVF: comment and whitespace fixes

SVF: comment the predefined/default paths; make them static const

SVF, XSVF: whitespace fixes, mostly so copyrights display sanely

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
9 years agoImprove Makefile rules for XScale debug handler; fixes 'make distcheck'.
Zachary T Welch [Tue, 20 Oct 2009 02:59:02 +0000 (19:59 -0700)]
Improve Makefile rules for XScale debug handler; fixes 'make distcheck'.

9 years agoMinGW: always use "-D__USE_MINGW_ANSI_STDIO"
Redirect 'Slash' NIL [Tue, 20 Oct 2009 00:55:40 +0000 (17:55 -0700)]
MinGW: always use "-D__USE_MINGW_ANSI_STDIO"

This is unfortunately needed to make stdio work like OpenOCD expects -- matching
the ANSI-C standard, instead of MS-Windows.

I tested it in both MinGW-W64 on Vista 64 and MinGW-W32 on XP, and I don't
see any adverse effects to enabling it for all MinGW versions.

9 years agoMinGW: use WinSock2
Redirect 'Slash' NIL [Tue, 20 Oct 2009 00:48:19 +0000 (17:48 -0700)]
MinGW: use WinSock2

After reading a bit further, it appears that ws2_32 (Windows Sockets 2)
is included in all versions of Windows and backwards compatible with
wsock32, at least according to

 http://msdn.microsoft.com/en-us/library/ms740673%28VS.85%29.aspx.

Only Win95 seems to require a manual installation; is not a big deal.

So I think we can drop this whole business of detecting 64 bit MinGW and
just use -lws2_32 for all MinGW platforms.

9 years agoDoc: jtag_init must validate scan chain too
David Brownell [Mon, 19 Oct 2009 21:45:43 +0000 (14:45 -0700)]
Doc: jtag_init must validate scan chain too

Same requirement as like init_reset, and for the same reason:
we need to start with a known and working state.

9 years agofix single step of bx instruction going into Thumb mode
Nicolas Pitre [Mon, 19 Oct 2009 19:49:46 +0000 (15:49 -0400)]
fix single step of bx instruction going into Thumb mode

Without this fix, the following code cannot be single stepped:

add ip, pc, #1
bx ip
[thumb code here]

9 years agoIgnore openocd.exe for "git status"
David Brownell [Mon, 19 Oct 2009 16:53:45 +0000 (09:53 -0700)]
Ignore openocd.exe for "git status"

9 years agocorrective fix for MinGW GNU C99 printf compliance
Redirect 'Slash' NIL [Mon, 19 Oct 2009 16:49:34 +0000 (09:49 -0700)]
corrective fix for MinGW GNU C99 printf compliance

Compilation on cygwin, using gcc v3 with option -mno-cygwin,
currently produces a large number of the following warnings:

   warning: `gnu_printf' is an unrecognized format function type

These have been introduced with the recent MinGW GNU C99 printf
compliance patch, as gnu_printf was only introduced with gcc v4.4
and is not recognized with earlier versions.

The attached fix adds gcc version detection to the previous patch
to avoid the problem.

9 years agoSync with official Jim Tcl repository.
oyvind [Mon, 19 Oct 2009 13:16:42 +0000 (15:16 +0200)]
Sync with official Jim Tcl repository.

9 years agoSwitch from svn to git version string handling.
oyvind [Mon, 19 Oct 2009 13:08:52 +0000 (15:08 +0200)]
Switch from svn to git version string handling.

9 years agoSDRAM and clock configuration for the SAM9-L9260 board from Olimex
Dean Glazeski [Sun, 18 Oct 2009 20:26:38 +0000 (22:26 +0200)]
SDRAM and clock configuration for the SAM9-L9260 board from Olimex

9 years agosafer conversion to HANDLER on MinGW-W64
Redirect 'Slash' NIL [Sun, 18 Oct 2009 05:18:38 +0000 (22:18 -0700)]
safer conversion to HANDLER on MinGW-W64

Assign to "intptr_t", which on some versions of MS-Windows
will widen the variable; then cast to HANDLE.

9 years agoIgnore two more generated files
David Brownell [Sun, 18 Oct 2009 00:50:23 +0000 (17:50 -0700)]
Ignore two more generated files

On Windows the name is "bin2char.exe".
All operating systems now have "xscale_handler.h".

9 years agoMore MinGW C99 printf compliance
Redirect 'Slash' NIL [Sun, 18 Oct 2009 00:47:52 +0000 (17:47 -0700)]
More MinGW C99 printf compliance

Passing "--std=gun99" is unfortunately not sufficient to make current
MinGW compilers conform with respect to checking printf format strings.
(The C runtime seems not to have problems.)

Fix by using a "gnu_printf" format specifier not "printf".

9 years agojim-eventloop for MinGW-w64
Redirect \"Slash\" NIL [Sat, 17 Oct 2009 19:15:13 +0000 (12:15 -0700)]
jim-eventloop for MinGW-w64

Use JIM_WIDE_MODIFIER for the sscanf format, and apply it for MINGW32 as
well as other Windows environments.  (Microsoft doesn't conform to the
C99 standard, and uses "%I64d" not "%lld" for "long long".)

NB: __MINGW32__ should work on both w32 and w64,.

9 years agobuild tweak for bin2char
David Brownell [Sat, 17 Oct 2009 19:14:19 +0000 (12:14 -0700)]
build tweak for bin2char

Work better when building outside the source tree.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoxscale: better fix for debug_handler.bin
David Brownell [Fri, 16 Oct 2009 20:52:40 +0000 (13:52 -0700)]
xscale: better fix for debug_handler.bin

Generate a C struct with the data, and use that, instead of an
assembly language file.  The assembly language causes issues on
Darwin and MS-Windows, which don't necessarily use GNU AS; or
if they do, don't necessarily use its ELF syntax.

It's also better in two other ways:  fewer global symbols; and
the init-time size check gets optimized away at compile time.
(Unless it fails, in which case bigger chunks of the file vanish.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoanother portability update
David Brownell [Thu, 15 Oct 2009 03:24:31 +0000 (20:24 -0700)]
another portability update

Just use "%p" instead of consing up some integral type for pointer printf.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoportability updates
David Brownell [Thu, 15 Oct 2009 03:04:33 +0000 (20:04 -0700)]
portability updates

Based on some patches from <redirect.slash.nil@gmail.com>
for preliminary Win64 compilation.  More such updates are
needed, but they need work.  Compile tested on 64 and 32 bit
Linuxes, and Cygwin.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agodoc updates to match "help" better
David Brownell [Wed, 14 Oct 2009 22:18:00 +0000 (15:18 -0700)]
doc updates to match "help" better

This makes the documentation a closer match to "help" output:

 - "pathmove" somehow was not documented in the User's Guide

 - "jtag_nsrst_assert_width" and "jtag_ntrst_assert_width"
   are new; both needed descriptions.

 - Removed two undocumented and fairly useless script mechanisms:
    * production/production_info/production_test ... using it,
      requires replacing everything; so having it adds no value.
    * cpu ... way out of date; hopeless to keep that current

Note that anyone using that "production" stuff already defines
their own procedures, and can keep using them with no change.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoFw: [PATCH] OpenRD board configuration
Wookey [Wed, 14 Oct 2009 13:27:41 +0000 (14:27 +0100)]
Fw: [PATCH] OpenRD board configuration

Ofrwarded from Ron, who's not subscribed.

----- Forwarded message from Ron <ron@debian.org> -----

From: Ron <ron@debian.org>
Date: Wed, 14 Oct 2009 04:50:17 +1030
To: wookey@debian.org
Subject: [PATCH] OpenRD board configuration
X-Spam-Status: No, score=-3.6 required=4.5 tests=BAYES_00,RCVD_IN_DNSWL_LOW
autolearn=ham version=3.2.5

This piggybacks on the 'sheevaplug' layout which uses the same Kirkwood SoC.

Signed-off-by: Ron Lee <ron@debian.org>
10 years agoS29WS-N CFI query fix is to try 0x555 if 0x55 fails.
Øyvind Harboe [Wed, 14 Oct 2009 10:01:52 +0000 (12:01 +0200)]
S29WS-N CFI query fix is to try 0x555 if 0x55 fails.

10 years agoWork in progress on arm11 reset. Assert srst.
Øyvind Harboe [Wed, 14 Oct 2009 09:14:04 +0000 (11:14 +0200)]
Work in progress on arm11 reset. Assert srst.

10 years agoiMX target config script's ported from Freescale BSP.
Øyvind Harboe [Wed, 14 Oct 2009 08:34:41 +0000 (10:34 +0200)]
iMX target config script's ported from Freescale BSP.

10 years agoFix problems building xscale_debug.S
David Brownell [Wed, 14 Oct 2009 07:32:42 +0000 (09:32 +0200)]
Fix problems building xscale_debug.S

10 years agoomap2420.cfg updates
David Brownell [Wed, 14 Oct 2009 09:00:34 +0000 (02:00 -0700)]
omap2420.cfg updates

Remove ircapture/mask attributes.  Add "srst_nogate".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agofix detection of PLD instructions
Lennert Buytenhek [Tue, 13 Oct 2009 20:48:18 +0000 (22:48 +0200)]
fix detection of PLD instructions

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agofix pass_condition() LE condition code check
Lennert Buytenhek [Tue, 13 Oct 2009 18:27:03 +0000 (20:27 +0200)]
fix pass_condition() LE condition code check

The LE check is obviously buggy (as easily triggered during some
testing), but I didn't audit the rest of the cases.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agocosmetic cleanup in TMS tables
David Brownell [Tue, 13 Oct 2009 17:55:24 +0000 (10:55 -0700)]
cosmetic cleanup in TMS tables

Cleanup comments and layout/whitespace in the TMS tables.
Table contents stayed the same (ignoring whitespace).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoCleanup: nuke trailling whitespaces
Yauheni Kaliuta [Tue, 13 Oct 2009 17:00:46 +0000 (20:00 +0300)]
Cleanup: nuke trailling whitespaces

Signed-off-by: Yauheni Kaliuta <y.kaliuta@gmail.com>
10 years agoDo not replace virt2phys with the default one if it was assigned
Yauheni Kaliuta [Sun, 11 Oct 2009 15:27:27 +0000 (18:27 +0300)]
Do not replace virt2phys with the default one if it was assigned

Signed-off-by: Yauheni Kaliuta <y.kaliuta@gmail.com>
10 years agoRetired gdb_attach. gdb-detach event covers this functionality.
Øyvind Harboe [Tue, 13 Oct 2009 11:44:15 +0000 (13:44 +0200)]
Retired gdb_attach. gdb-detach event covers this functionality.

10 years agoMissing type for eCos.
Øyvind Harboe [Tue, 13 Oct 2009 11:13:29 +0000 (13:13 +0200)]
Missing type for eCos.

10 years agoFix warning.
Øyvind Harboe [Tue, 13 Oct 2009 10:22:23 +0000 (12:22 +0200)]
Fix warning.

10 years agoDelete commented out code. Add a bit of error checking.
Øyvind Harboe [Tue, 13 Oct 2009 10:06:55 +0000 (12:06 +0200)]
Delete commented out code. Add a bit of error checking.

10 years agoarm11 seems to gate JTAG when srst is asserted
Øyvind Harboe [Tue, 13 Oct 2009 10:02:09 +0000 (12:02 +0200)]
arm11 seems to gate JTAG when srst is asserted

10 years agoPropagate error from assert, deassert and halt on tcl target object.
Øyvind Harboe [Tue, 13 Oct 2009 09:29:05 +0000 (11:29 +0200)]
Propagate error from assert, deassert and halt on tcl target object.

10 years agoxscale: stackframe corruption bugfix
David Brownell [Tue, 13 Oct 2009 08:21:24 +0000 (01:21 -0700)]
xscale: stackframe corruption bugfix

Resolve a "FIX" comment; yes that was superfluous given that the
JTAG core does that check by default.  It was also buggy since it
wrote to a stack frame that went away before the write happened!!

Other fixes:  remove pointless malloc(); zero-init scan_field_t
values wherever they appear; whitespace scrub; spelling fix.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoMore error propagation fixes.
Øyvind Harboe [Mon, 12 Oct 2009 13:25:00 +0000 (15:25 +0200)]
More error propagation fixes.

10 years agoarm11 burst writes are now only enabled for writes larger than 1 word. Single word...
Øyvind Harboe [Mon, 12 Oct 2009 13:13:44 +0000 (15:13 +0200)]
arm11 burst writes are now only enabled for writes larger than 1 word. Single word writes are frequently used from reset init scripts to non-memory peripherals.

10 years agoXilinx xcr3256.cfg basic config script
Wookey [Mon, 12 Oct 2009 13:12:35 +0000 (15:12 +0200)]
Xilinx xcr3256.cfg basic config script

10 years agoRetire arm11 no_increment. Intended for future expansion to read/write to ports....
Øyvind Harboe [Mon, 12 Oct 2009 12:21:38 +0000 (14:21 +0200)]
Retire arm11 no_increment. Intended for future expansion to read/write to ports. New arm11 commands would have to be added to exploit it.

10 years agoPropagate wDTR/rDTR failure immediately, otherwise it's followed up by timeout errors.
Øyvind Harboe [Mon, 12 Oct 2009 12:10:49 +0000 (14:10 +0200)]
Propagate wDTR/rDTR failure immediately, otherwise it's followed up by timeout errors.

10 years agoFix warning and improve error message upon burst transfer failure
Øyvind Harboe [Mon, 12 Oct 2009 12:09:10 +0000 (14:09 +0200)]
Fix warning and improve error message upon burst transfer failure

10 years agoburst writes work fine. clean up junk.
Øyvind Harboe [Mon, 12 Oct 2009 12:08:29 +0000 (14:08 +0200)]
burst writes work fine. clean up junk.

10 years agoFix bogus 'transfer errors' with arm11 'memwrite burst enable'. A regression introduc...
Øyvind Harboe [Mon, 12 Oct 2009 09:57:59 +0000 (11:57 +0200)]
Fix bogus 'transfer errors' with arm11 'memwrite burst enable'. A regression introduced in b8103660fa36a77158bd77379572c09913d85c00

10 years agosimplify XScale debug handler installation
David Brownell [Mon, 12 Oct 2009 09:39:18 +0000 (02:39 -0700)]
simplify XScale debug handler installation

Load the XScale debug handler from the read-only data section
instead of from a separate file that can get lost or garbaged.
This eliminates installation and versioning issues, and also
speeds up reset handling a bit.

Plus some minor bits of cleanup related to loading that handler:
comments about just what this handler does, and check fault codes
while writing it into the mini-icache.

The only behavioral changes should be cleaner failure modes after
errors during handler loading, and being a bit faster.

NOTE:  presumes GNU assembly syntax, with ".incbin"; and ELF,
because of the syntax of the ".size" directive.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agomore xscale cleanup (mostly removing JTAG hooks)
David Brownell [Mon, 12 Oct 2009 09:39:01 +0000 (02:39 -0700)]
more xscale cleanup (mostly removing JTAG hooks)

Streamline/shrink some needless JTAG stuff:

 - Use #defines for the JTAG instructions; they can't ever change
 - Remove an unused (!) shadow of tap->ir_length
 - Stop using a copy of target->tap
 - Don't bother saving the variant after sanity checking ir_length

Also, make target_create() work as on other targets:  build the
register cache later, making init_target() no longer be a NOP.
Handle malloc failure; remove a comment that was obsoleted by the
not-so-new target syntax.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoMerge commit 'origin/master'
Øyvind Harboe [Mon, 12 Oct 2009 07:28:56 +0000 (09:28 +0200)]
Merge commit 'origin/master'

10 years agoIf halt times out, stop GDB. Allows e.g. manual reset via monitor commands.
Øyvind Harboe [Mon, 12 Oct 2009 07:27:27 +0000 (09:27 +0200)]
If halt times out, stop GDB. Allows e.g. manual reset via monitor commands.

10 years agoSupply default reset_config statement to make target scripts useful standalone and...
Øyvind Harboe [Mon, 12 Oct 2009 07:25:08 +0000 (09:25 +0200)]
Supply default reset_config statement to make target scripts useful standalone and provide sensible default

10 years agoxscale_load_ic cleanup
David Brownell [Sun, 11 Oct 2009 17:35:52 +0000 (10:35 -0700)]
xscale_load_ic cleanup

Remove unused and deprecated (in the arch spec) mode for loading
code into the *main* icache (vs the "mini" icache).  Disable some
extremely noisy (and rarely useful) low-level debug messages

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoxscale.c cleanup
David Brownell [Sun, 11 Oct 2009 17:35:28 +0000 (10:35 -0700)]
xscale.c cleanup

Declare almost everything as static.
Move stuff to remove most forward references.
Remove most forward declarations.
Warn if the unimplemented register functions get called.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoxscale bugfix to handler loading
David Brownell [Sun, 11 Oct 2009 17:06:08 +0000 (10:06 -0700)]
xscale bugfix to handler loading

Just fill out the rest of the cache line with NOPs; don't change
the record of how much data we consumed.  Otherwise the count of
how much data is left can roll over from positive to negative
("VERY positive") and skip the loop termination of zero.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoxscale minor cleanup
David Brownell [Sun, 11 Oct 2009 09:52:00 +0000 (02:52 -0700)]
xscale minor cleanup

Add a header comment referencing useful XScale specs.
Make most data static, and the tables readonly.
Scrub extra blank lines.
Return fault codes from one routine.
Remove a needless NOP methood.

(BUGFIX) When we update R0, mark R0 as dirty/valid ... not R15/PC!

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoprintf format warning fixes
David Brownell [Sat, 10 Oct 2009 18:32:39 +0000 (11:32 -0700)]
printf format warning fixes

Observed on a Cygwin build.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoFix reset delays and tinker with ID's
Wookey [Sat, 10 Oct 2009 07:08:06 +0000 (09:08 +0200)]
Fix reset delays and tinker with ID's

10 years agotweak new "translating ..." text
David Brownell [Fri, 9 Oct 2009 22:51:16 +0000 (15:51 -0700)]
tweak new "translating ..." text

Fix formatting and layout bugs in the new "translating configuration
files" bit.  Make it a section within the chapter about config files.
Add a crossreference.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoadd documentation about reset customization
David Brownell [Fri, 9 Oct 2009 19:52:42 +0000 (12:52 -0700)]
add documentation about reset customization

We added two overridable procedures; document them, and the
two jtag arp_* operations they necessarily expose.

Update the comment about the jtag_init_reset() routine; it's
been obsolete for as long as it's had SRST support.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoStop debug session if halt fails
Øyvind Harboe [Fri, 9 Oct 2009 08:31:40 +0000 (10:31 +0200)]
Stop debug session if halt fails

10 years agoARM11 error checking
Øyvind Harboe [Fri, 9 Oct 2009 08:00:05 +0000 (10:00 +0200)]
ARM11 error checking

10 years agoMerge commit 'origin/master'
Øyvind Harboe [Fri, 9 Oct 2009 07:14:27 +0000 (09:14 +0200)]
Merge commit 'origin/master'

10 years agoAdded tip in documentation on how to translate quirky syntax
Øyvind Harboe [Fri, 9 Oct 2009 07:03:53 +0000 (09:03 +0200)]
Added tip in documentation on how to translate quirky syntax

10 years agomake PXA255 targets enumerate sort-of-OK
David Brownell [Fri, 9 Oct 2009 06:51:50 +0000 (23:51 -0700)]
make PXA255 targets enumerate sort-of-OK

Startup now mostly works, except that the initial target state
is "unknown" ... previously, it refused to even start.

Getting that far required fixing the ircapture value (which
can never have been correct!) and the default JTAG clock rate,
then providing custom reset script.

The "reset" command is still iffy.  DCSR updates, and loading
the debug handler, report numerous DR/IR capture failures.
But once that's done, "poll" reports that the CPU is halted
(which it shouldn't be, this was "reset run"!), due to the
rather curious reason "target-not-halted".

Summary:  you still can't debug these parts, but it's closer.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoadd overridable Tcl "init_reset"
David Brownell [Fri, 9 Oct 2009 06:51:50 +0000 (23:51 -0700)]
add overridable Tcl "init_reset"

This abstracts the "jtag arp_init-reset" call into a method
called from OpenOCD startup and reset processing.

Platforms which have different requirements for how such hard
resets must be performed can now override "init_reset" instead
of needing to rebuild custom hacked versions of the server.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agominor JTAG init messaging tweaks
David Brownell [Fri, 9 Oct 2009 06:51:50 +0000 (23:51 -0700)]
minor JTAG init messaging tweaks

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoFunction to flash SheevaPlug u-boot sectors
Rabeeh Khoury [Fri, 9 Oct 2009 00:10:52 +0000 (17:10 -0700)]
Function to flash SheevaPlug u-boot sectors

This function is used by the SheevaPlug installer to flash the
erase and re-flash the U-Boot environment in the NAND Flash.

10 years agoinitial builds of OSK5912 boards need srst_pulls_trst
David Brownell [Thu, 8 Oct 2009 20:15:18 +0000 (13:15 -0700)]
initial builds of OSK5912 boards need srst_pulls_trst

This is clearly noted in the hardware spec (section 5.2.3); it
works around a chip erratum:  "If the MPU_RESET signal is used,
it may cause the EMIFS bus to lock."

I seem to have a board with such an initial build.  The chip
is labeled XOMAP.  Presumably, parts without that "X" prefix
(eXperimental) resolve this.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>